-
Notifications
You must be signed in to change notification settings - Fork 46
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
Check if drupal/core package exists before running scaffolding #56
base: master
Are you sure you want to change the base?
Conversation
Thanks for this; however, I think that this PR runs the risk of doing more harm than good. Currently, if there is no core available, then you get a fatal error, and the build breaks on the bench. With this PR, this situation instead silently skips scaffolding, and you get a build that reports success, but that is incomplete and therefore will not work. Perhaps a better change here would be to detect the fatal error, and then throw an exception with a better description of what is wrong. |
Yeah i think @greg-1-anderson is right. @T2L Are you using drupal-scaffold without drupal/core? Could you explain your idea? Thanks! |
@webflo I think that @T2L is probably using drupal-scaffold with Pantheon. Currently, our process is to include drupal/core directly, using the version provided by drupal.org; however, we pull our scaffold files from pantheon-systems/drops-8. The problem occurs when a new version of drupal/core comes out; in this instance, Composer will pull in, say, version 8.2.6 of drupal/core, but pantheon-systems/drops-8 is only available through version 8.2.5. In this instance, drupal-scaffold fails. Perhaps Pantheon should make an exact clone of drupal/core, only for the purpose of delaying the addition of the latest tag until said tag also exists on pantheon-systems/drops-8. |
Actually my wordflow was a little bit different. My vision:
|
To support a different core package, we could make that configurable in Handler::getCorePackage and Handler::getDrupalCorePackage. In addition we should improve Plugin::scaffold() to throw an explicit exception or use iO to display an error. We definitely should not fail silently there. |
Huh. Code explicitly depends on ADDED |
The semantics of what composer is are immaterial here; if a tool of any type fails to do it's job, it should return with a non-zero exit code. An inscrutable exception is preferable to a silent failure, and a rational error message is better than an inscrutable exception. Related issue: pantheon-systems/drops-8#168 |
+1 on adding an exception |
No description provided.