Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a 'recompile' button #141

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

BarryNolte
Copy link
Collaborator

Fixes #133

Also fixes type bug in refreshTimer.ts (newer versions of node/lint warn)

Copy link
Contributor

@alixander alixander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preview shouldn't open new preview windows and should never change the active preview window.

Here I have a preview window for hi.d2, which imports yo.d2, but every time I hit recompile, it opens up the preview window for yo.d2 and switches that to the active.

Kapture.2024-04-09.at.14.38.46.mp4

pages/previewPage.html Outdated Show resolved Hide resolved
Fixes terrastruct#133

This was fun.  Tasks *really* want to be asynchronous, but I needed them to be synchronous.
@BarryNolte BarryNolte requested a review from alixander April 23, 2024 01:56
@BarryNolte BarryNolte self-assigned this May 7, 2024
Copy link
Contributor

@alixander alixander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got an error trying to build, i think some incompatibility in package.json

▶ osascript -e 'quit app "Visual Studio Code"'; yarn dev && code ~/dev/d2-demo
yarn run v1.22.21
warning d2@0.8.8: The engine "vscode" appears to be invalid.
$ code --uninstall-extension terrastruct.d2; yarn gen && yarn pkg && code --install-extension d2.vsix
Extension 'terrastruct.d2' is not installed.
Make sure you use the full extension ID, including the publisher, e.g.: ms-dotnettools.csharp
warning d2@0.8.8: The engine "vscode" appears to be invalid.
$ yq -o=json . syntaxes/d2.tmLanguage.yaml > syntaxes/d2.tmLanguage.json
warning d2@0.8.8: The engine "vscode" appears to be invalid.
$ vsce package --out d2.vsix
(node:13800) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
 ERROR  @types/vscode ^1.89.0 greater than engines.vscode ^1.73.0. Consider upgrade engines.vscode or use an older @types/vscode version
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@BarryNolte
Copy link
Collaborator Author

Had to update the vscode module in two places, error only happens on package, not build

package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@alixander alixander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't switch the preview anymore.

Kapture.2024-05-18.at.08.23.06.mp4

@BarryNolte
Copy link
Collaborator Author

I'm not able to reproduce this.

@alixander
Copy link
Contributor

Hmm can you screen record with it working?

@BarryNolte
Copy link
Collaborator Author

Untitled.video.mp4

@BarryNolte BarryNolte requested review from alixander and removed request for gavin-ts December 14, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a 'recompile' button
2 participants