Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Connects to #1528: BLT's merged dependencies not installed during deploy #1634

Closed
bobbygryzynger opened this issue Jun 9, 2017 · 5 comments
Labels
Bug Something isn't working

Comments

@bobbygryzynger
Copy link
Contributor

bobbygryzynger commented Jun 9, 2017

My system information:

  • Operating system type: macOS
  • Operating system version: 10.12.5
  • BLT version: 8.8.4

This issue is following-up on #1528.

I've seen this occur now with drupal/config_split - although it's difficult to reproduce. The basic outlines of the issue are that it seems sometimes if you don't declare one of BLT's required composer dependencies in your own composer.json that dependency doesn't get built into your deployment artifact.

These are the merge-plugin settings from my project's composer.json:

  "merge-plugin": {
    "require": [
      "vendor/acquia/blt/composer.required.json"
    ],
    "merge-extra": true,
    "merge-extra-deep": true,
    "merge-scripts": true,
    "include": [
      "blt/composer.overrides.json"
    ],
    "replace": true
  }

This is occurring despite the dependency appearing in the both composer.lock and deploy/composer.lock.

The only workaround I have found that appears to work consistently is adding all dependencies my project depends on to my project's own composer.json - regardless of whether or not they appear in BLT's composer.required.json.

In general, I'm seeing inconsistent behavior from the plugin. At what point should merges occur? During every composer require? Only during blt update? Is there a way to trigger the merge behavior manually?

The project's documentation says:

When Composer is run it will parse these files and merge their configuration settings into the base configuration.

But it's not quite clear on if this means all composer commands or only specific ones.

@bobbygryzynger
Copy link
Contributor Author

Some other odd behavior I was seeing is that if I go to install a new module: composer require drupal/module_name I will get errors related to it not being able to be found on packagist.org.

The only way I was able to resolve this was by adding the following to my own project's composer.json (despite this also appearing in composer.required.json):

  "repositories": {
    "drupal": {
      "type": "composer",
      "url": "https://packages.drupal.org/8"
    }
  }

@greylabel
Copy link
Contributor

I think repositories definitions need to be in the root composer.json. I have run into a similar thing with other private repo definitions.

@bobbygryzynger
Copy link
Contributor Author

bobbygryzynger commented Jun 9, 2017

@greylabel actually the project's documentation states this is one of the keys it is supposed to be able to merge.

The following sections of the found configuration files will be merged into the Composer root package configuration as though they were directly included in the top-level composer.json file:

autoload
autoload-dev (optional, see merge-dev below)
conflict
provide
replace
repositories
require
require-dev (optional, see merge-dev below)
suggest
extra (optional, see merge-extra below)
scripts (optional, see merge-scripts below)

@grasmash grasmash added the Bug Something isn't working label Jun 12, 2017
@grasmash
Copy link
Contributor

Can you post steps to reproduce this?

@bobbygryzynger
Copy link
Contributor Author

@grasmash I'm struggling to come up with steps to reproduce this. If this is a real issue at all, then it doesn't appear consistently insofar as I can tell. I'm going to close this for now. I'll open another issue if I see this again and can come up with some reproducible steps.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants