Open schmunk42 opened 6 years ago
Addon: It works as expected, when I have no (or an empy) composer.lock
file.
I just need to run update, additional files are found, merged and deps installed :+1:
$ composer update -vv
[...]
Writing lock file
Generating autoload files
[merge-plugin] Loading vendor/yiisoft/yii2-jquery/composer.assets.json...
[merge-plugin] Merging npm-asset/jquery
[merge-plugin] Merging npm-asset/punycode
[merge-plugin] Running additional update to apply merge settings
[merge-plugin] Loading vendor/yiisoft/yii2-jquery/composer.assets.json...
[merge-plugin] Merging npm-asset/jquery
[merge-plugin] Merging npm-asset/punycode
[merge-plugin] Loading -dev sections of vendor/yiisoft/yii2-jquery/composer.assets.json...
Loading composer repositories with package information
Reading composer.json of yiisoft/yii2-jquery (feature/nam)
Importing branch feature/nam (dev-feature/nam)
Reading composer.json of yiisoft/yii2-jquery (feature/remove-pjax)
Importing branch feature/remove-pjax (dev-feature/remove-pjax)
Reading composer.json of yiisoft/yii2-jquery (master)
Importing branch master (dev-master)
Updating dependencies (including require-dev)
Dependency resolution completed in 0.001 seconds
Analyzed 718 packages to resolve dependencies
Analyzed 504 rules to resolve dependencies
Package operations: 2 installs, 0 updates, 0 removals
Installs: npm-asset/jquery:3.2.1, npm-asset/punycode:1.3.2
- Installing npm-asset/jquery (3.2.1): Loading from cache
Extracting archive - Installing npm-asset/punycode (1.3.2): Loading from cache
Extracting archiveWriting lock file
Generating autoload files
[merge-plugin] Already merged vendor/yiisoft/yii2-jquery/composer.assets.json completely
Halp! Can anyone shed some light on this?
Having composer-merge-plugin install packages specified by files which are provisioned by other packages is not supported. This is a "chicken and egg" problem similar to the problem that composer-merge-plugin works around for it's own installation (see #170).
Composer-merge-plugin adds additional data to Composer's internal dependency resolver at the beginning of any Composer install/update action. Composer takes over from that point and actually installs the resolved packages. Any data that is not available on the local disk at the start of the install/update action is not available for either Composer or composer-merge-plugin to examine. If the use case of gathering configuration from packages as they are provisioned were to be supported, composer-merge-plugin would need to at minimum recompute its configuration following every package install and then trigger an additional Composer run if that configuration was different before & after the prior run. In the most pathological case this could trigger infinite Composer runs if each package provisioned a new configuration file that matched the composer-merge-plugin include files pattern and that config specified another package which did the same. Ultimately the problem is that we cannot traverse and verify the internal consistency of a configuration graph until that entire graph is known.
I am playing around with a setup where I want to include (merge)
composer.assets.json
files which reside invendor
and are therefore not available on the first run.My
composer.json
.First run...
This actually looks good when reading the messages:
For some reason the log says:
Looks like an install, but that should be an update.
But here the additional packages are not installed, I need another run for that:
Anything I have missed here?
CC: @cebe