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 importing absolutely aliased dependency #641

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

simonihmig
Copy link
Contributor

@simonihmig simonihmig commented Oct 7, 2024

Attempt at fixing #616

@simonihmig simonihmig changed the title Add failing test for absolutely aliased dependency Fix importing absolutely aliased dependency Oct 7, 2024
@simonihmig simonihmig added the bug Something isn't working label Oct 7, 2024
@simonihmig simonihmig marked this pull request as ready for review October 7, 2024 12:45
@simonihmig simonihmig requested a review from ef4 October 7, 2024 12:45

if (packageName) {
let packageRoot: string | undefined;
let packagePath = resolvePackagePath(packageName, this.root);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would be concerned here that if we support aliasing to absolute paths, it should not be mandatory that the package resolves at all.

Comment on lines +344 to +345
packageName,
packageRoot,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we can alter the types so that in the case of an absolute resolution these are not present. I don't know what the downstream effects of that would be, but they're extremely relevant to this PR, since this PR would be giving that code potentially misleading information. (Nothing enforces that the absolute path is actually coming from this packageName and packageRoot.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants