-
Notifications
You must be signed in to change notification settings - Fork 682
Port --traceResolutions #1537
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
Port --traceResolutions #1537
Conversation
9f4ebc4
to
2b7119a
Compare
testdata/baselines/reference/submodule/compiler/allowJsCrossMonorepoPackage.trace.json.diff
Outdated
Show resolved
Hide resolved
testdata/baselines/reference/submodule/compiler/allowJsCrossMonorepoPackage.trace.json.diff
Outdated
Show resolved
Hide resolved
testdata/baselines/reference/submodule/compiler/allowJsCrossMonorepoPackage.trace.json.diff
Outdated
Show resolved
Hide resolved
I suspect diffing the resolutions won't be useful due to the things noted above; we don't have classic/node10 resolution and we removed all deduplication from the resolver because it was far faster to just let the FS cache things. |
So do we not want to diff with old but baseline |
I am not sure; I think we had been concerned about the output even being consistent given it's now happening concurrently. It implies that the resolutions can't be streamed to an output without being interleaved. |
The way this is implemented it guaranetees the order of the trace i am not sure if diffing with old is useful or not and who is looking at it so may be i will just skip that part but baseline the trace so we can detect the changes |
8518989
to
6c50bc1
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.
Pull Request Overview
This PR implements support for the --traceResolutions
flag by adding detailed module resolution tracing to the compiler. The feature enables developers to see the step-by-step process of how TypeScript resolves modules, similar to the TypeScript compiler's trace resolution functionality.
- Adds comprehensive module resolution tracing with detailed logging of each resolution step
- Includes trace output for both successful and failed module resolutions
- Shows detailed information about package.json lookups, exports matching, file existence checks, and resolution strategies
Reviewed Changes
Copilot reviewed 195 out of 195 changed files in this pull request and generated no comments.
File | Description |
---|---|
testdata/baselines/reference/tsc/extends/configDir-template.js | Adds trace resolution output for module resolution attempts |
testdata/baselines/reference/tsc/extends/configDir-template-with-commandline.js | Adds trace resolution output for module resolution with command line options |
testdata/baselines/reference/submodule/conformance/*.trace.json | Multiple test files showing comprehensive module resolution traces for various scenarios including type lookups, package exports, imports, and different module resolution strategies |
there is one more race with the caching log, let me fix that |
Ah, right, merge conflict with that other PR 😄 |
No description provided.