-
Notifications
You must be signed in to change notification settings - Fork 628
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
Make configuration more reliable right after starting VSCode #7326
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the issue.
I don't quite understand what is the race. Could you elaborate with an example.
Maybe the config can be set directly on the cache by locking the CACHE
mutex instead of message passing?
Note: The WASM preview does not work with library_path at all for me: The compiler uses file existence tests, which always fail in WASM AFAICT.
Indeed. That's another bug that can be fixed later.
It needs to go through message passing for the WASM preview to work :-/ Remember: The LS does file system accesses, the live-preview just knows the files the LS tells it about to make working with WASM-mode bearable. So what used to happen is this:
Tada! We are stuck in a broken state. What happens now is this:
Tada, it works. |
We need to re-evaluate all files as the library/include resolution has changed.
d2ea733
to
45dd73b
Compare
6950132
to
5b68bc6
Compare
This is the same logic with the set content. If you just set the state to NeedsReload it will reload the preview. We can talk about that over a call on Monday. |
We got reports that you need to tweak the configuration for it to become applied right after starting VSCode. This effects mostly the library_path and Include_path options that need to get applied to the code when building in LS or live-preview.
I ran into several issues:
This greatly improves the reliability of configuration with the live preview and LS for me on first start of VSCode or when switching between WASM and binary preview.
Note: The WASM preview does not work with library_path at all for me: The compiler uses file existence tests, which always fail in WASM AFAICT.