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

package command is broken for composer-driven projects #314

Open
grayside opened this issue Jan 13, 2017 · 1 comment
Open

package command is broken for composer-driven projects #314

grayside opened this issue Jan 13, 2017 · 1 comment
Labels

Comments

@grayside
Copy link
Contributor

grayside commented Jan 13, 2017

In #288 and #289 we worked to align the packaging operation with some of the more fiddly issues introduced by Composer-driven dependency management, as well as relying on composer autoloading of libraries. Unfortunately our testing missed some pretty common project use cases and the current behavior is buggy on several points.

1. The project composer.json does not make it into the package

We are reading the Drupal project composer.json and outputting it again. Instead, we need the project-level composer.json to be placed in the package. This can be fixed with a one-line change in package.js Line 20.

2. If (1) were working, flat packaging would break

We support a flat packaging model by default, intended to support hosting platforms such as Pantheon. However, in a flat structure we have nowhere to put a project-level composer.json or vendor directory.

Luckily, as the reality of composer-based builds has sunk in Pantheon and other platforms are now supporting a subdirectory docroot structure. We can commit to the idea of a multi-level structure and update Gadget to generate D8 projects using one.

3. The composer install to strip dev dependencies might run composer update

Missing lockfile causes composer update to run, losing hand-edited vendor hacks, potentially upgrading packages, and of course, taking a long time.

@grayside grayside added the bug label Jan 13, 2017
@grayside
Copy link
Contributor Author

grayside commented Feb 7, 2017

  1. Copy composer.json, composer.lock, and vendor/ into the package root.
  2. Copy the docroot one level deeper than root of package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant