-
-
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
ProjectReferences: ts-loader doesnt build dependent projects #1005
Comments
There's work in progress by @sheetalkamat here: It might be worth testing her PR and seeing if that fixes you. We'd love to hear back if it does |
Should be fixed with V6.1.1 |
I see that the tests have been updated: https://github.com/TypeStrong/ts-loader/pull/1003/files#diff-18ab58ce03516261da5fb32ec3f05984R108 and I dont get that error anymore but I also still get all the other definition files have not been built from source errors from referenced projects. Is there a new config option I'm missing?
@johnnyreilly @sheetalkamat this still seems to be an issue with v6.1.1. Could you please reopen? |
I pulled down the latest updates locally and ran the tests again. I am still getting the following test failures. Additionally, one thing I have noticed about the tests is that they are missing the
|
Thanks for the details - @sheetalkamat it seems there might still be some issues. @jleider what os are you running? Our CI runs on Linux and Windows so I'm kind of surprised you still have failing tests.. |
@jleider the lib folder in that test has composite set which is referenced in the project. What is your typescript version that you are using. Are you at master and latest commit for ts-loader |
I am using MacOS v10.14.6. I tested with both Node v11.15 and v12.8. TypeScript version v3.6.3 for my own project and whatever |
Also, I suspected that
|
The assert is fixed by #1015 |
@sheetalkamat I have three things to report:
|
1> Repro is needed since I don't see this when I run test locally |
The repro for 1> is the existing test which fails:
|
But the test doesn't fail either on CI or on my machine so that's not a repro at my end.... |
Looks like I hadn't rebuilt the src before running the tests. That test passes now. However, I don't have a repro for you at this moment since our code base is private but it is still an issue. I will try to come up with a repro in the next couple days. One other thing to note is that even when the referenced projects are built, our compile time increases from ~30s to ~1m20s. Maybe its related to this? #988 Although we use react, not vue. |
Thanks for reporting this stuff in detail @jleider - it's super helpful |
I've tried this new projectReferences option and while it builds the references projects for the first time it does not pick up changes when I change something in a referenced project. Is this the desired behavior? |
Doesn't sound like it - minimal repro repos are helpful. Could you provide one please? cc @andrewbranch @sheetalkamat |
Repro:
|
Thanks @B3zo0! Hopefully someone can take a look at this now you've put this together |
I've just migrated to the latest ts-loader to test a new project references and I have the same problem as @jleider. My fresh build always throws a few "Output file [NAME] has not been built from source file [NAME]". I don't have this problem when I use tsc directly. To fix the errors I need to do a manual build using tsc compiler before executing webpack. Unfortunately, the project is private so I can't share it |
Thanks for reporting @niba. I appreciate you can't share the private repo, but I'm afraid without a minimal repro repo it's hard to make progress. Just in terms of expectation management, I'm presently snowed with other work and so can't look at this. If @sheetalkamat or @andrewbranch (or anyone else who is so minded) is able to I'll be hugely grateful. However, I'm mindful that everyone has a day job and this is open source; we rely on people pitching in to keep going. |
@B3zo0 Thank you for repro, I could see that change in mentioned file didn't restart compilation. However your project is too large for me to investigate this in limited time. Can you or someone on this thread create small repro so I can look into it? Someone somewhere mentioned it has to do with |
Hi, I have a problem after upgrading from
Even though the error seems to originate from |
cc @sheetalkamat for info - suspect this may be related to recent project references work. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi all - Not just wanting to +1 this, but I am also seeing this with Update 16/01/21: |
For me only 2nd webpack build works, first one doesn't find the project reference build/src directory when importing the files. It's the ForkTsCheckerPlugin, without it works fine. We also removed extend tsconfigs so wasn't it. We're working to remove project references as they cause so much headache. |
I removed this plugin and still get the error. Is there a workaround at all for this? should i somehow manually build each reference project? |
Expected Behaviour
Based on this highly anticipated and recently merged PR: #935 by @sheetalkamat I would expect ts-loader to build dependent projects if
projectReferences: true
.Actual Behaviour
Dependent project reference is not built when building project.
The test
projectReferencesNotBuilt
referenced in the "steps to reproduce" section seems to account for the fact that the dependent project may not already be built. However, the expected output of that test is just the TypeScript error saying the project hasn't been built and to runtsc --build
to build the dependent project. I would expect theprojectReferences
config option to basically run the API equivalent oftsc --build
.Actual application error:
Steps to Reproduce the Problem
Typescript: v3.6.3
ts-loader: v6.1.0
The text was updated successfully, but these errors were encountered: