-
Notifications
You must be signed in to change notification settings - Fork 522
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
feat(typescript): create a better ts_project worker #2416
Conversation
9f42e25
to
0233d61
Compare
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.
Hey! Thanks for working on it! We recently started a migration to the Bazel, and this feature is the last significant blocker for us.
I left several comments/questions. I will hope they do not create much burden for you.
When I tried out the existing implementation of supports_workers, I (and others) have run into a problem where it does not find npm dependencies. Some more information is captured here: https://bazelbuild.slack.com/archives/CEZUUKQ6P/p1609246740191500
@mrmeku Do you think your new implementation will handle this better? Can we add a test case that covers this scenario? |
Yes, I think that this type I got the logic right so that there shouldn't be any missing npm dependencies. The package does rely on typescript being a peer dependency so that's a requirement, but nothing else is required. |
7111c73
to
c8be6a7
Compare
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.
nice! excited to try this
b9633de
to
b52bf9c
Compare
7b54ee8
to
59b824e
Compare
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The last ts project worker I made was riddled with race bugs and overall didn't work that well.
Additionally it was not windows compatible.
Issue Number: N/A
What is the new behavior?
This variant of the ts_project worker uses the createWatchCompilerHost api directly rather than calling out to the typescript cli as a child process. It does not rely on program pausing and is thus windows compatible.
Does this PR introduce a breaking change?
Other information