-
Notifications
You must be signed in to change notification settings - Fork 197
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
running multiple compilations simultaneously in the same node process #3678
Comments
It doesn't happen if both consoles are created in different node processes. I'm guessing there's a singleton-like functionality somewhere in the Wing SDK / Simulator... @Chriscbr Anything on top of your head that may be related to this issue? |
in |
We should be able to pass the necessary info using normal option objects instead of using |
@skyrpex @polamoros Could you create a repro that only uses @winglang/sdk or @winglang/compiler? |
Hey @Chriscbr, I tried calling the compiler multiple times with two different files, and it caused the target directory of file2 to contain the output of compiling file1. (I'll upload the test I did later today) |
@Chriscbr I updated the issue description with the test I did using the compiler only. |
@polamoros, do you mind expressing the urgency here, I want to understand the priority here? |
@ekeren is not really urgent because we found a workaround and we were able to release the vs-code extension anyways. It would be nice to fix it to be able to use the |
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
…5247) #### General Vibe - This is an MVP of getting TS working via the wing cli (`compile`, `run`, and `test`). This is basically only usable for preflight - I wanted to change as little as possible in the SDK to avoid wasted work once resources are moved to winglibs - Does not address inflight stuff yet The entrypoint TS experience is different than the existing issue/story: ```ts import { main } from "ts4wing"; main((app) => { // stuff goes here }) ``` This was due to our usage of a "root" construct for testing isolation. The wing cli needs to have control over the instantiation of resources, so `new App()` is not really feasible because we don't want users to actually attach stuff at the app-level. It may be possible to get it working with `new App()` but the hacks needed didn't seem worth it. An added benefit of this approach is that the user no longer needs to call `app.synth()` Anecdotally, I have built an awscdk-based internal framework at a previous job that looked like this for a similar reason (to duplicate stuff across Stages) and it worked pretty well. #### Indirect Changes - Made sure everything matches their `@types/node` version - **preflight execution now happens in a worker thread instead of a VM** - VM context did not allow data to be provided past the initially loaded file. - In a VM, process.env is useful but pollutes the parent process - The overloaded "require" was only useful for the initial file. Now I added a shim that overloads require everywhere to make sure the SDK is loaded properly Fixes #3678 *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
Congrats! 🚀 This was released in Wing 0.53.3. |
I tried this:
file1.w
file2.w
This happened:
the
target/file2.wsim
to contain thefile1
compilations files.target.zip
I expected this:
The compiler to compile the correct file.
Is there a workaround?
no
Component
Compiler
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Anything else?
No response
Community Notes
The text was updated successfully, but these errors were encountered: