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

feat: support "compilerOptions.rootDirs" #152

Merged
merged 12 commits into from
Jan 28, 2025
Merged

Conversation

nayeemrmn
Copy link
Collaborator

@nayeemrmn nayeemrmn commented Jan 27, 2025

Downstream: denoland/deno#27844.

@nayeemrmn nayeemrmn requested a review from dsherret January 27, 2025 21:22
src/workspace/mod.rs Outdated Show resolved Hide resolved
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM!

pub struct WorkspaceResolver {
struct CompilerOptionsRootDirsResolver<TSys: FsMetadata> {
root_dirs_from_root: Vec<Url>,
root_dirs_by_member: BTreeMap<Url, Option<Vec<Url>>>,
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: Maybe we should just not have a member entry when its value is None? Or do we need to represent this as None? (if not, it would slightly reduce the number of comparisons)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It makes a difference if you have members within members, to prevent cascading inheritance between them in some cases.

(We have cascading inheritance for import maps as a side-effect of using scopes but not for other fields.)

src/workspace/resolver.rs Outdated Show resolved Hide resolved
@nayeemrmn nayeemrmn merged commit 86df6c3 into denoland:main Jan 28, 2025
3 checks passed
@nayeemrmn nayeemrmn deleted the root-dirs branch January 28, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants