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

Checkout only installed packages #97

Open
xepozz opened this issue Nov 4, 2020 · 2 comments
Open

Checkout only installed packages #97

xepozz opened this issue Nov 4, 2020 · 2 comments
Labels
status:ready for adoption Feel free to implement this issue. type:bug Bug

Comments

@xepozz
Copy link
Member

xepozz commented Nov 4, 2020

When you want to reset all packages to master branch you get an errors

Package requirements repository is not cloned.
To fix, run the command:

  ./yii-dev install requirements

You can also disable the package in packages.local.php
See packages.local.php.example for configuration examples.

and the same for other not installed packages.

I expect when I do git/checkout master that will be checkout only installed packages.

@xepozz xepozz added the type:bug Bug label Nov 4, 2020
@samdark samdark added the status:ready for adoption Feel free to implement this issue. label Nov 4, 2020
@rugabarbo
Copy link
Member

rugabarbo commented Dec 2, 2020

This is not actually a bug. This is a feature! =)

The tool tries to be as smart as possible, but there are several possible cases here:

  1. You want to checkout, but did not install the package.
  2. You want to checkout, but forgot to install the package before checkout.

These are different cases.

When I was creating the tool, I used the following logic:

  1. If you want to work with a specific package, you must explicitly specify it in the parameter list.
  2. If you want to work without specifying packages, you must either explicitly configure your package list using a local configuration file or your must install all packages at once.

And this logic is applied consistently across all yii-dev-tool commands.

Therefore, the existing behavior is correct. It kind of tells you: «Dude, there is something wrong with your configuration! Either disable this package in your local config, or install it.» :-)

@rugabarbo
Copy link
Member

rugabarbo commented Dec 7, 2020

But, by the way, I see that now there are much more packages. More than one hundred ...

It may be more convenient if the base configuration won't offer all packages in a row for installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready for adoption Feel free to implement this issue. type:bug Bug
Projects
None yet
Development

No branches or pull requests

3 participants