wp-cli / wp-cli-dev

🛠 WP-CLI development environment that allows for easy development across all packages
36 stars 36 forks source link

Odd behavior when running wp-cli/wp-cli feature tests using wp-cli/wp-cli-dev #30

Closed danielbachhuber closed 2 years ago

danielbachhuber commented 2 years ago

@wp-cli/committers I'm using this wp-cli/wp-cli-dev repo for local development of wp-cli/wp-cli:

git clone git@github.com:wp-cli/wp-cli-dev.git
cd wp-cli-dev
composer install
cd wp-cli

However, when I run composer behat inside of the wp-cli/wp-cli project, it's unexpectedly using a separate copy of wp-cli/wp-cli in wp-cli-dev/extension-command/vendor/wp-cli/wp-cli.

This means my tests are run on the code in that checkout, instead of the modifications in wp-cli-dev/wp-cli.

Any ideas on what the issue might be?

schlessera commented 2 years ago

Please check that vendor folder in more detail. If everything works as expected, that second "copy" is just a symlink to the root wp-cli package.

danielbachhuber commented 2 years ago

Please check that vendor folder in more detail. If everything works as expected, that second "copy" is just a symlink to the root wp-cli package.

@schlessera Oh, sorry. I should've mentioned that the second "copy" is an entirely separate checkout for some reason.

If that's unexpected, maybe that's the problem.

swissspidy commented 2 years ago

Just noticed something similar locally. In most cases there were symlinks, but in some packages it was an actual directory. I guess I must have manually run composer install/update there at some point or something that caused this.

Removing these directories and re-running composer update from the root resolves this for me and I get the symlinks again as expected.

danielbachhuber commented 2 years ago

Just noticed something similar locally. In most cases there were symlinks, but in some packages it was an actual directory. I guess I must have manually run composer install/update there at some point or something that caused this.

Removing these directories and re-running composer update from the root resolves this for me and I get the symlinks again as expected.

I must've done that too. I deleted wp-cli-dev entirely, and the tests work as expected now.

Thanks for your help!