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(check): compiler options from workspace members #27785

Merged

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jan 23, 2025

This is a different approach to #27009 that instead mostly just changes the TypeChecker struct.

Todo:

  • deno compile support
  • deno lint support
  • deno_graph needs to resolve checkJs based on the current referrer when walking rather than using a global value
  • Conditionally insert asset:///node_types.d.ts
  • Ignore duplicate diagnostics that appear in different configs
  • More tests (ex. certain members using compilerOptions.types, lint, check js)
  • Cleanup

Closes #24504

@dsherret dsherret added the ci-draft Run the CI on draft PRs. label Jan 23, 2025
cli/tools/check.rs Outdated Show resolved Hide resolved
@dsherret dsherret marked this pull request as ready for review January 28, 2025 00:41
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nayeemrmn I extracted out this common pattern to a helper collection. Maybe we should use it in more places in the future.

@@ -146,7 +146,7 @@ fn check_error_in_dep_then_fix() {
let check_command = test_context.new_command().args_vec(["check", "main.ts"]);

let output = check_command.run();
output.assert_matches_text("Check [WILDCARD]main.ts\nerror: TS234[WILDCARD]");
output.assert_matches_text("Check [WILDCARD]main.ts\nTS234[WILDCARD]");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errors don't all get dispalyed at once anymore--they get displayed to the screen after each group of roots gets type checked.

Copy link
Collaborator

@nayeemrmn nayeemrmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dsherret dsherret merged commit 4648fc4 into denoland:main Jan 28, 2025
18 checks passed
@dsherret dsherret deleted the check-workspace-member-compiler-options2 branch January 28, 2025 15:50
bartlomieju pushed a commit that referenced this pull request Jan 30, 2025
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-draft Run the CI on draft PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support compilerOptions in workspace members
2 participants