Skip to content

Fix importing absolutely aliased dependency - #641

Open
simonihmig wants to merge 2 commits into
embroider-build:mainfrom
simonihmig:fix-absolute-alias
Open

Fix importing absolutely aliased dependency#641
simonihmig wants to merge 2 commits into
embroider-build:mainfrom
simonihmig:fix-absolute-alias

Conversation

@simonihmig

@simonihmig simonihmig commented Oct 7, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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