-
Notifications
You must be signed in to change notification settings - Fork 16
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
Revise Installation Documentation for Developers and Drupal 8.5 #186
Comments
@tenken thanks for the write-up on your experience. Just some quick thoughts on you points.
Your distro composer.json really controls everything. As far as composer is concerned the only thing coming from SiteFarm Seed is module/package dependencies and patches. Keep in mind that you can override any patch you like within your distro composer.json with If you have been having installation failures as of late, it's due to the profile inheritance patch being out of date. This is being updated now, but also keep in mind that you can override that patch as you need if the main SiteFarm Seed repo isn't up to date. But yeah, it's frustrating if you're trying it out for the first time and don't know why it fails. That's the unfortunate side of relying an a significant patch. Ideally you shouldn't need to worry about what patch works where. Ideally Sitefarm Seed should take care of that for you, but it simply hasn't been updated in a while. :( Any pull requests to the docs https://github.com/ucdavis/sitefarm_seed/tree/8.x-1.x/docs are more than welcome. |
Ah, I know better understand the issue now. Because the sitefarm_seed repository was not updated anytime recently to support D8.5. I Forked the repo on github and copied it down locally to a repo hosted within UCSB. I then updated the sitefarm_seed composer.json file to be 8.5 compatible. I then updated the distro composer file to reference the ucsb sitefarm_seed repository which brings in sitefarm profile folder into my project. I'm still confused a little on why you think (1) isn't an issue. The directions on how to start working on a sub profile based project are here: This line from the distro template: https://github.com/ucdavis/sitefarm-distro-template/blob/master/composer.json#L44 Does not tell my project to include the dependencies of the sitefarm seed profile into my project. It just brings the sitefarm_seed profile folder as a vendor resource into my project files and places them at: "web/profiles/{$name}": [
"type:drupal-profile"
], In order to automatically fetch this profiles dependencies and allow a simple Getting Started 3-step-process to working on a project -- you would have to use a tool like If you do then the Getting Started directions would work as advertised: cd <project dir>
composer install
cd web
drush site-install my_custom_profile <typical options list> Otherwise these directions
Is this more clear? Am I incorrect in my analysis above someplace? I'm just trying to help other adopters have an easier path to initial development when using this specific project workflow. Thanks for your time. |
This is all that is needed for composer to parse the dependencies within SiteFarm Seed. It will place the So if I clone the distro template, and run If I then go to the
It will install a new Drupal site using the sample That should be all that is needed. |
Issue
Continued usage of Sitefarm Seed (SFS) profile is a goal for the UCCSC 2019 conference to be hosted at UCSB. UCSB is attempting to leverage use of the SiteFarm Seed profile. After initial discussions with UCDavis staff and endevouring on our own to adopt the usage of SF within our project. Herein is an initial feedback of creating a basic project skeleton.
The subprofile appears to work, but the resources and directions on how to create a subprofile of SFS was lacking and many hours were spent connecting dots that should have been easier given a functional README file.
If the SFS project is accepting contributions[7][8], with advisement, UCSB is more than happy to contribute additional documentation for future projects hoping to use this Drupal project-based paradigm and to ease and increase UC wide adoption of SFS in future projects.
Pain Points Adopting SFS to a New Project
While Slack channels exist for communications on UC IT projects, ultimately project repositories should provide functional directions for employing a library within a project.
The template subprofile repository README[1][2] lists the directions to creating a subprofile as:
composer install
The above steps are inaccurate and will lead to installation failure. The main points of friction coming from these directions are:
there is no mention of how composer adds drupal dependencies into the subprofile based project with the current composer.json[6] file. Should these dependencies be added to a project manually via
composer require <DEP>
for dependencies listed insitefarm_seed/composer.json
or should the project developer adapt the composer file to include amerge-plugin
stanza and alter the distro template composer file to require thesitefarm_seed
composer file.there is no mention of which version of the core patch[3] to be used for any Drupal Minor version should be applied. Over the lifetime of this issue there are 165 proposed patch files. There is mention in the SF issue queue of a valid version for Drupal 8.4.4 support[4], but we seek to start the project with Drupal 8.5. Through exhaustive research it was found that the Demo Umami SubProfile project[5] successfully uses a specific version of the listed patch.
Recommended Project Updates
As stewards of the SFS project it would be great if the
maintainerscontributors could:site-install
. This can be achieved in a project by being directed to include the following within thecomposer.json
from the subprofile template repository:Also note there may other caveats to using composer in this fashion should the eventual subprofile support to land in Drupal core support only direct inheritance or other variants of inheritance, Composer has no knowledge of what dependencies will truly be enabled for a project; and thus composer may be over-greedy when building its' dependency matrix for a project using multiple subprofile(s) -- which could lead to developer friction attempting to use this subprofile development workflow within complex projects.
installer-paths
be made consistent between the SFS profile and SFS subprofile project. In one repository they map to aweb/
based directory tree -- in the other they do not:sitefarm_seed/composer.json
Line 90 in 9a503e0
Footnotes
[1] https://github.com/ucdavis/SiteFarm-distro-template#get-started
[2] https://github.com/ucdavis/sitefarm_seed/blob/8.x-1.x/docs/creating_subprofile.md#create-a-sub-profile-of-sitefarm-seed
[3] https://www.drupal.org/project/drupal/issues/1356276
[4] #184 (comment)
[5] https://cgit.drupalcode.org/demo_umami_subprofile/tree/drupal-org-core.make
[6] https://github.com/ucdavis/sitefarm-distro-template/blob/d6b254afd5c9579ebd70ce6c893081cfc780815c/composer.json
[7] #55 (comment)
[8] #180
Edit:
The text was updated successfully, but these errors were encountered: