Skip to content
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

Fix project references bug #642

Merged
merged 2 commits into from
Aug 8, 2021
Merged

Fix project references bug #642

merged 2 commits into from
Aug 8, 2021

Conversation

piotr-oles
Copy link
Collaborator

This PR fixes 3 bugs that I found regarding project references:

  • condition JSON.stringify(previousParsedConfiguration.fileNames) !== JSON.stringify(parsedConfiguration.fileNames) didn't take into account project references. I changed it to always call getDependencies() (which takes project references into account) and compare dependencies to detect if list of files changed.
  • we were missing realpath method overwrite in ControlledTypeScriptSystem
  • in the situation, when there were already some files built in the real fs, controlled typescript system returned true for fileExists call on the initial run and false on subsequent runs. This was causing assertion in TypeScript to fail.

Closes: #630

Currently, we recompute dependencies only if fileNames for the main
configuration changes. It doesn't handle the case when we have project
references.
@piotr-oles piotr-oles requested a review from johnnyreilly August 7, 2021 19:34
@piotr-oles piotr-oles self-assigned this Aug 7, 2021
In the situation, when there were already some files built in the real
fs, controlled typescript system returned true for fileExists call on
initial run and false on subsequent calls causing assertion in
TypeScript to fail.

✅ Closes: #630
@piotr-oles piotr-oles force-pushed the fix/project-references-bug branch from e21827e to 1572c58 Compare August 7, 2021 19:40
@piotr-oles piotr-oles merged commit c37a58c into main Aug 8, 2021
@piotr-oles piotr-oles deleted the fix/project-references-bug branch August 8, 2021 12:59
@piotr-oles
Copy link
Collaborator Author

🎉 This PR is included in version 6.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@piotr-oles
Copy link
Collaborator Author

🎉 This PR is included in version 7.0.0-alpha.15 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6.2.10+ crash when using workspaces and project references
1 participant