-
Notifications
You must be signed in to change notification settings - Fork 231
Support all package sources in "pub global activate" #1044
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
Comments
<img src="https://avatars.githubusercontent.com/u/2108507?v=3" align="left" width="48" height="48"hspace="10"> Comment by dgrove Removed Type-Defect label. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Set owner to @munificent. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by 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? |
<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3 SGTM |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent 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 . |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent 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. |
<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="48" height="48"hspace="10"> Comment by zoechi I already tried path packages successfully. Helps a lot when developing scripts! |
<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd \o/ Added this to the 1.6 milestone. |
<img src="https://avatars.githubusercontent.com/u/444270?v=3" align="left" width="96" height="96"hspace="10"> Issue by seaneagan
Originally opened as dart-lang/sdk#19902
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 #982.
The text was updated successfully, but these errors were encountered: