-
-
Notifications
You must be signed in to change notification settings - Fork 433
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
Using Solution builder to build project references #935
Using Solution builder to build project references #935
Conversation
Very exciting! Looks like there's a compilation error at the moment - I'm guessing we're just waiting for the relevant API to appear in |
@johnnyreilly Yes. The PR is almost ready for review and once the build should be able to succeed. |
Cool - let me know when you're ready and we've a passing build and I'll take a look. I'm guessing the new execution test you've added should pass with the |
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.
This is looking great! Next week I can try it out on a real life project before we merge. Super excited for this 🎉
@andrewbranch Can you please try it out now. SolutionBuilder api is in typescript nightly now and I have updated this PR. |
@johnnyreilly This is ready to go in. Please take a look. Thanks. |
Thanks @sheetalkamat! If I get time I'll try to look this weekend. Am I right in thinking the SolutionBuilder api will be released with TypeScript 3.6? Also I noticed your new test is being skipped right now:
|
@johnnyreilly Interesting not sure what I can do to fix that, but I can run that as a single test and it passes. |
I was blocked by microsoft/TypeScript#31792 trying to test this in the wild yesterday, but should be able to play with it today. |
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.
I’m now pseudo-blocked by #949 (I can observe your changes working, but I don’t get a clean build), but the first thing I noticed was that we don’t create the solution builder if transpileOnly
is true
. This is how the majority of ts-loaders configure the loader, so we need to do something for them.
When we talked about this before, I think you said that we can’t skip type checking the referenced projects (as transpileOnly
would suggest) before we emit them, but I think that’s ok for now.
When #949 is fixed (by #945), I should be able to get a clean build and test the end-to-end experience. I might also have some time Monday to add this to transpileOnly
if you’re busy. Thanks!
It probably makes more sense for @andrewbranch to carry on with the reviewing / merging of this. He's much more knowledgeable about project references than I am. One question (and it sounds like @andrewbranch is thinking of this too): how does Does that just work as things stand, or not? I haven't given it a try myself... BTW I'm an admin on that project too and it is also completely open to contributions! ❤️ If he's happy then I'm happy 😀 |
Hi all) |
Does this PR address incremental build too? |
@kirill-konshin yes (notice that |
@andrewbranch yes, I just received your comment in incremental-related issue! Perfecto! |
Nice work @andrewbranch! Thanks so much! If you're happy with this do feel free to merge and push out a release (just add an entry to the release to the https://github.com/TypeStrong/ts-loader/releases and the GitHub action should take care of the rest) |
Thanks @andrewbranch & @sheetalkamat |
This is in the process of shipping as v6.1.0. My current thinking is to get some validation that things are generally working, then remove the |
Due to random bugs that can happen, leaving the failsafe so regular tsc can use build references but webpack doesn’t have to is good. Maybe 7 could default to on? |
I think you’d be better off using a different tsconfig for ts-loader that makes the intention more explicit. In general, I want to move ts-loader away from specialized behavior that contradicts the tsconfig it’s reading. Removing the option from ts-loader doesn’t remove the option for the user, it just shifts it onto TypeScript itself. |
I have a (unfortunately not open source, yet ...) project that is using Not sure how to provide more info:
I happen to be using TypeScript for the webpack config itself, which may or may not indicate something. |
I just cloned this repository and "manually" ran webpack on the |
Running
Likewise |
@sublimator to do anything useful to help we're going to need a minimum reproduction repo please. If you can make one, raise an issue and link back to this with it that would be amazing. |
Hey, will do! But as stated above, all you need to repro is clone this repo and run the tests, either with yarn test, or manually invoking webpack on the "fixture", and it hangs |
I have identical hanging to @sublimator happening on Windows 10 machine |
Please track this here @AndrewKirkovski: |
Definitely still curious what the expected interaction between ts-loader with |
I suspect so, yes. If you'd like to raise a PR we'd appreciate it! |
This is based off microsoft/TypeScript#31432