-
Notifications
You must be signed in to change notification settings - Fork 55
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: import package with same prefix name as the root package #2598
base: main
Are you sure you want to change the base?
fix: import package with same prefix name as the root package #2598
Conversation
e8ac6b0
to
623fbfb
Compare
Thanks @leovct ! |
What do you think about this test case I added that fails? I think the fix won't work if
Prefix isn't sufficient bc you can't distinguish between any prefix being a package or just another nested directory in this part of the code. Ideally , we'd just compare directly the package id of I don't mind merging this now since it at addresses the non nested package case and doesn't break anything. I can think on the nested package case or maybe you have an idea. |
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.
approved but commented above
Description
An attempt to fix the issue when importing a package with the same prefix name as the root package (e.g. importing
kurtosis-test-xyz
insidekurtosis-test
)I added two new test cases to show it's not working properly:
The problem comes from the fact that the function only checks if the locator contains the package id (prefix check) instead of carrying out a more rigorous check:
To fix this I made sure the
rootPackageId
ends with a trailing slash. This way it should not complain when checking absolute locators with the same prefix.REMINDER: Tag Reviewers, so they get notified to review
Is this change user facing?
YES
References (if applicable)