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

Make .packages files be more clever about defaults. #80

Merged
merged 3 commits into from
Mar 18, 2020

Conversation

lrhn
Copy link
Member

@lrhn lrhn commented Mar 13, 2020

The PackageConfig for a .packages file now assigns a default language version of 2.7
to all packages, and if the package location ends in /lib/, it assumes the package's
root directory is the parent directory of that.

The `PackageConfig` for a `.packages` file now assigns a default language version of 2.7
to all packages, and if the package location ends in `/lib/`, it assumes the package's
root directory is the parent directory of that.
}
if (packageNames.contains(packageName)) {
onError(PackageConfigFormatException(
"Same package name occured more than once", source, start));
continue;
}
var rootUri = packageLocation;
if (path.endsWith("/lib/")) {
Copy link
Member

Choose a reason for hiding this comment

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

Will this always be relative to something else? That is, can path ever be lib/?

Copy link
Member

Choose a reason for hiding this comment

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

The "root" package will have a path of lib/.

Copy link
Member Author

@lrhn lrhn Mar 14, 2020

Choose a reason for hiding this comment

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

The URI reference from the file has already been resolved against the base URI at this point. It can't be lib/ unless the base URI is empty (which it must not be).

@lrhn lrhn merged commit 74c0bbb into master Mar 18, 2020
@lrhn lrhn deleted the packages-default-version branch March 18, 2020 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants