-
Notifications
You must be signed in to change notification settings - Fork 397
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
Fix misleading "Your composer.json file was modified by BLT" error message #1139
Conversation
@TravisCarden Sometimes, running For instance:
Here's another problematic scenario that isn't even BLT specific:
IMO this is a problem with composer. Composer basically needs a Unfortunately, the only foolproof way to ensure that BLT actually installs all of the intended packages is to run How do you feel about updating the docs to reflect this? On another note, I don't really like that BLT modifies composer.json for you. But, I don't know of a better way to accomplish the following:
|
Okay, @grasmash. Then why don't we just update the message to reflect the real intent, so it doesn't look like a mistake?
PR updated. |
@TravisCarden yeah we can do that, but I also think a docs change is in order. |
I might prefer that we recommend using plain old Obviously we also need to caveat that this will update any Drupal modules or other packages at the same time. My own practice is to update any individual packages before updating BLT, so that I can at least track the changes independently. |
I definitely wondered what the point was of updating BLT only just so we could turn around and update everything. An alternative line of questioning is to ask why we would modify the composer.json manually in the first place (thus necessitating the second |
@TravisCarden I don't think I understand the approach you're proposing.
How would BLT use the CLI to add new dependencies? Are you suggesting that BLT not ship any dev dependencies, and instead instruct users to manually add them on their own? Or, are you suggesting that BLT should create new PHP processes to execute shell commands of its own during a |
I'm going to spitball a few different approaches:
Just to recap, here are the requirements for BLT as a tool: Provider non-overridable configuration for:
Provide default, overridable Composer configuration for:
Additionally, we need a mechanism to update the default values for these configuration items when there are upstream changes. |
Eh, I opened #1140 to address this. Seems like a better approach than my other ideas. |
I'm not too picky about how BLT updates |
If BLT modifies your
composer.json
file during an upgrade, it currently emits the following message:This is misleading, because
composer update
does not update yourcomposer.lock
file--it upgrades all your dependencies, which would completely negate the effect of upgrading withcomposer update acquia/blt --with-dependencies
. What is actually wanted iscomposer update --lock
, which does just update yourcomposer.lock
file.