Page MenuHomePhabricator

Exclude not needed stuff from mediawiki vendor by adding it to .gitignore, instead of excluding at the library level (using .gitattributes)
Open, Needs TriagePublic

Description

Note: this is more of a question/idea than the actual task. I am not going to pretend I know much about this area, so please feel free to point out all the whole in this concept, and bury it.

In T191638 it has been briefly mentioned that git-ignoring not needed files from libraries checked in into mediawiki vendor component might make sense in case of third-party libraries we don't control, and possibly (this is my own interpretation) could even replace the use of .gitattributes for the same thing.

It seems clear we cannot add .gitattributes to libraries that are not ours, and thus e.g. we might end up checking in test classes to mediawiki vendor (which might, or might not be intednded). Adding unwanted parts to gitignore would help reducing the amount of stuff we add.

Following this concept, would it make sense to loosen up excludes made currently with .gitattributes in WMF's or WMDE's libraries? AFAICT, the only reason some WMDE/Wikibase libs exclude test code etc is to not check them in the mediawiki vendor. Arguably, it is giving users of those libraries a bit less flexibility in what they get and can use (of course as long as they install tarballs using composer, not clone the whole git repo). We still would avoid putting not wanted stuff to mediwiki vendor, but the exlcude would be more local, in this component's .gitignore.

I am not sure how clearly I managed to describe the issue, and whether it makes any sense. I wanted to have a trace of the idea we had in the other ticket, and hear for wiser people have to say.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 14 2018, 11:03 AM

Yes, let's start using .gitignore to remove stuff we don't need :)

I think promoting use of .gitattributes upstream is still a good idea since it will benefit all composer users and not just us. If there are real usecases for distributing test cases, then it's ok...but I haven't seen very many of those yet.

Vvjjkkii renamed this task from Exclude not needed stuff from mediawiki vendor by adding it to .gitignore, instead of excluding at the library level (using .gitattributes) to h0caaaaaaa.Jul 1 2018, 1:10 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from h0caaaaaaa to Exclude not needed stuff from mediawiki vendor by adding it to .gitignore, instead of excluding at the library level (using .gitattributes).Jul 2 2018, 4:13 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.