Skip to content

pub get/upgrade/install should not create packages directories in sub-projects #12

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

Closed
DartBot opened this issue Jun 4, 2015 · 4 comments
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 4, 2015

<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="96" height="96"hspace="10"> Issue by zoechi
Originally opened as dart-lang/sdk#23296


Normally pub upgrade (or get/install) creates packages only in a subset of the folders bin (only one or two levels deep AFAIR), test, example, web but for example not in lib, or build.
When I have a nested project for example in example, pub upgrade creates packages directory in every sub-directory of example, also for example in myprj/example/my_sub_prj/lib/src.

@DartBot
Copy link
Author

DartBot commented Jun 4, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Pub doesn't have a notion of "sub-projects", and there aren't plans to add one. We could theoretically say that it doesn't create "packages" directories below a directory with a pubspec, but without a strong sub-project convention that seems more confusing than helpful, especially if users have pubspecs that they want to treat as data.


Added NotPlanned label.

@DartBot
Copy link
Author

DartBot commented Jun 4, 2015

<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="48" height="48"hspace="10"> Comment by zoechi


Seems a bit inconsistent. Related DartEditor and Analyzer bugs were fixed.
Are there any plans for improvements in this area (dependencies for bin/example/tool/test or sub-projects)?

@DartBot
Copy link
Author

DartBot commented Jun 4, 2015

<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="48" height="48"hspace="10"> Comment by zoechi


Even when Pub does not have a notion of "sub-projects" doesn't mean it isn't useful and also doesn't mean it needs to be prevented. I think this is the simplest way to improve the life for developers.

@DartBot
Copy link
Author

DartBot commented Jun 4, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Are there any plans for improvements in this area (dependencies for
bin/example/tool/test or sub-projects)?

No.

Also, as I've stated many times before, "bin" should not be thought of as a separate project anyway, since it's part of a package's public API.

Even when Pub does not have a notion of "sub-projects" doesn't mean it isn't
useful and also doesn't mean it needs to be prevented. I think this is the
simplest way to improve the life for developers.

There's nothing preventing you from just running "pub get" again in your examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

1 participant