-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support all package sources in "pub global activate" #19902
Comments
Removed Type-Defect label. |
Set owner to @munificent. |
I'm thinking the syntax will look like: $ pub global activate [--source <source>] <description> [constraint] "--source" can be abbreviated to "-s". The constraint is only allowed on hosted packages (since git and path ones doesn't have multiple versions for a given description). Examples: pub global activate foo -spath /path/to/foo What do you think? |
SGTM |
Path sounds are supported by: https://codereview.chromium.org/428313004/ I'll add Git support in another patch. To activate the current working directory, you can do: $ pub global activate -spath . |
This is done now. Path packages will be in 1.6. Git ones will be in the next dev release after that. Added Fixed label. |
This comment was originally written by @zoechi I already tried path packages successfully. Helps a lot when developing scripts! |
\o/ Added this to the 1.6 milestone. |
This issue has been moved to dart-lang/pub#1044. |
This issue was originally filed by @seaneagan
Currently we have:
pub global activate <package> [<version>]
which is limited to binaries from "hosted" packages. "path" and "git" packages are needed as well:
https://www.dartlang.org/tools/pub/dependencies.html#dependency-sources
Seems like the most extensible way to do this would be to mimic how they are specified in pubspec.yaml:
pub global activate <package> [<yaml snippet>]
Examples:
pub global activate foo ">=1.0 <2.0"
pub global activate foo "path: /path/to/foo"
pub global activate foo "git: {url: 'git://...', ref: '...'}"
Suggesting yaml since there is no standard way to specify deep object literals via command line args. Alternatively just add dedicated args for each package source type:
pub global activate foo --path /path/to/foo
pub global activate foo --git.url git://... --git.ref ...
pub global activate foo --version ">=1.0 <2.0"
pub global activate foo --hosted.url http://... --hosted.name foo --version ">=1.0 <2.0"
Presumably the same command-line interface would be used for issue #18911.
The text was updated successfully, but these errors were encountered: