Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The core/.gitignore
file contains directives only for the vendor/
directory. Since we moved out vendor to the root, there is no reason for this file. Let's remove it.
Proposed resolution
Since core/.gitignore
contains important policies about the D8 repo, we should move that behavior to our composer scripts or plugins, and/or packaging scripts.
And remove core/.gitignore
.
Remaining tasks
Patch
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#10 | remove_core_gitignore-2635584-10.patch | 833.27 KB | hussainweb |
Comments
Comment #2
hussainwebHere is the patch.
Comment #3
Crell CreditAttribution: Crell at Palantir.net commentedSeems legit. Thanks.
Comment #4
alexpottIt does look like we need to get rid of this but we need to do a bit more...
Tests are being removed and this hasn't worked for ages.
This issue should add this to
Drupal\Core\Composer\Composer::$packageToCleanup
and do the remove.So this was broken again... I can't remember what we decided last time.
Doesn't exist anymore.
Removed by
Drupal\Core\Composer\Composer
so all good here...Comment #5
hussainwebIt seems like the only points that need work are 2 and 3. I have added Resources to the
$packageToCleanup
but not yet figured out how to handle the other one. Anyway, I am not convinced we should do this at all. I have attached the patch with changes anyway as I am curious.Imagine a scenario where these components are actually used by other modules or other components. I am not sure how any other component can override core's composer.json to not run the cleanup in that case. I guess it's okay if we are not keeping tests but Resources and other files seem to be required.
Comment #6
alexpott@hussainweb - yeah I wasn't sure what we decided for #3 I think that it is best to leave this alone for now.
Comment #7
alexpottBy leave it alone - what I mean let's not remove any of the Translation component because we have no way of maintaining that.
Comment #8
hussainweb@alexpott: What about Resources in the validator component? The same argument applies. What if another module needed that?
Comment #9
alexpott@hussainweb I guess but that one is trickier because they are translations that just can not play nice with Drupal's translation system
Comment #10
hussainwebFor review, here is a patch with just the Resources removed as discussed in previous comments.
I understand these translations cannot work with the Drupal's translation system, but is there any harm in letting them stay. They were in the repository so far and didn't cause any issues. We are going to remove all third party components soon from the repository anyway, but this change will remove it every time
composer install
runs as well.Comment #11
pfrenssenAdding #1475510: Remove external dependencies from the core repo and let Composer manage the dependencies instead as parent issue, this originated from there and is blocking it.
Comment #12
Mile23We're about to remove
vendor/
so we don't really need to remove any vendor files here, but it's not a big deal if we do.Updated title and issue status.
Everything in #4 is satisfied including #4.3, because we won't manage it according to #4.7.
Unfortunately we can't say
composer install --no-script
in order to compare the behavior of the changed composer script, because then it won't run the wikimedia plugin. If anyone has any magic incantation to prove it works, give it a try.Otherwise: RTBC. Woot!
Comment #13
alexpottCommitted 772127c and pushed to 8.1.x. Thanks!