Page MenuHomePhabricator

Symlinked js files broken on Windows
Open, MediumPublic3 Story Points

Description

The symlink solution taken in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/545382 appears to not work on Windows computers. The original task was T236206.

Possible solution (but sounds pretty terrible) https://stackoverflow.com/questions/5917249/git-symlinks-in-windows

Proposed solution, copy & paste with a CI check making sure that files are kept in sync.

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterRemove redundant js tests
mediawiki/extensions/Wikibase : masterRevert "Turn duplicated code into symlinks"

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 8 2019, 12:58 PM

When I did the research it said that it handles it properly. Let me get you the documents

Possible solution (but sounds pretty terrible) https://stackoverflow.com/questions/5917249/git-symlinks-in-windows

That is for 8 years ago. Currently is way better.

We can put it in README

I mean, that assumes you use git bash?

I mean, that assumes you use git bash?

The setup for picture on the solution I mentioned doesn't mention git bash, it's part of "gitforwindows.org" so I don't think it's needed for git bash. OTOH, I don't know what to do with tarballs :(

git bash = git for windows.

Looking at the docs for git for windows the symlink thing is enabled by default.
But there are some system etc that this stuff wont work on, or will require you to have admin rights on the system.

Also, there are other ways you can run git on windows that will result in non working symlinks.

I'd be pro us trying one of the other solutions here.

Addshore triaged this task as Medium priority.Wed, Nov 20, 11:56 AM
Addshore moved this task from incoming to needs discussion or investigation on the Wikidata board.

I can't find where we documented other options but IIRC. One is the move only four fives to a another submodule and make it another npm module. The other option was to keep them copied and make sure they are the same using CI tests.

I guess this one sounds easier?

The other option was to keep them copied and make sure they are the same using CI tests.

Rather than another submodule.?

Thoughts?
I guess submodules are actually cheap.
On the other hand (OTOH) having the code stay in the same repo might be nice.
On the other other hand (OTOOH) this code isn't going to change much, so maybe submodule?

I'm fine with copy pasta ^_^

Addshore updated the task description. (Show Details)Wed, Nov 27, 9:48 AM
Addshore moved this task from Needs Work to Ready to estimate on the Wikidata-Campsite board.
WMDE-leszek set the point value for this task to 3.Tue, Dec 3, 1:10 PM
WMDE-leszek moved this task from Ready to estimate to Ready to pick up on the Wikidata-Campsite board.

Change 554538 had a related patch set uploaded (by Rosalie Perside (WMDE); owner: Rosalie Perside (WMDE)):
[mediawiki/extensions/Wikibase@master] Revert "Turn duplicated code into symlinks"

https://gerrit.wikimedia.org/r/554538

Change 554538 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Revert "Turn duplicated code into symlinks"

https://gerrit.wikimedia.org/r/554538

Change 555462 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/Wikibase@master] Remove redundant js tests

https://gerrit.wikimedia.org/r/555462

Change 555462 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Remove redundant js tests

https://gerrit.wikimedia.org/r/555462