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

Support globally activating local packages #20147

Closed
munificent opened this issue Jul 22, 2014 · 6 comments
Closed

Support globally activating local packages #20147

munificent opened this issue Jul 22, 2014 · 6 comments
Assignees
Labels
closed-invalid Closed as we don't believe the reported issue is generally actionable type-enhancement A request for a change that isn't a bug
Milestone

Comments

@munificent
Copy link
Member

Right now, "pub global activate" only supports hosted packages. This means you can't globally activate a package that hasn't been published. That makes it really hard to develop packages intended to be globally activated: you can't test them until after you've published them.

To solve that, you should be able to activate a local package. I'm thinking, from within the root directory of a package, you can do:

$ pub global activate --current

This will make that package globally available. It will make that a live link: any changes to the current package will be immediately reflected by pub global run. (In order to get new executables on your PATH, you may have to reinstall the package, though.)

@nex3
Copy link
Member

nex3 commented Jul 22, 2014

This seems like a less-general version of issue #19902. Isn't this just activating a path package?

@munificent
Copy link
Member Author

I suppose so. Path dependencies will still need special sauce here because it's important to handle non-cached packages differently from cached ones. I think the common use case is wanting to activate the package you're currently hacking on, so it seemed reasonable to have a command that worked off the cwd.

@nex3
Copy link
Member

nex3 commented Jul 23, 2014

I don't think activating a current package is going to be that common. It's easy to test executables in the current package locally, so as long as users have faith that "pub global activate" does what it's supposed to I don't think they'll take the extra step of globally installing something themselves very often.

It's also not too difficult to write "pub global activate --source path .".

@munificent
Copy link
Member Author

--source path is a bit gratuitous. How about just:

pub global activate --path ...

@nex3
Copy link
Member

nex3 commented Jul 25, 2014

Sure.

@munificent
Copy link
Member Author

On further thought, my suggestion doesn't work. It would allow weird stuff like:

pub global activate foo --path
pub global activate --git foo --path

The original suggestion makes more sense. Given that, I'm going to close this bug out and just start the one for supporting other sources.


Added Invalid label.

@munificent munificent added Type-Enhancement closed-invalid Closed as we don't believe the reported issue is generally actionable labels Jul 25, 2014
@munificent munificent self-assigned this Jul 25, 2014
@munificent munificent added this to the 1.6 milestone Jul 25, 2014
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-invalid Closed as we don't believe the reported issue is generally actionable type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants