Automatice git dependencies update with git submodules

• Oct 25, 2019 - 04:59

Is there any reason why dependencies in the musescore git repo are not treated as submodules?\
If I understand well this stackoverflow post, we could have the campania font (just an example) updated automatically whenever there's an update to the original font's repo.
That would preserve from all the 'update campania to version 2.006' commits.

I guess that even dependencies like libVorbis, libOgg and libVorbisFile could be collected the same way?

Edit: this old post about dependencies has some interesting answers, but nothing about the named mechanism.

Edit: An applied example: https://github.blog/2016-02-01-working-with-submodules/


Comments

That would preserve from all the 'update campania to version 2.006' commits.
Except for that it wouldn't.

A submodule is still linked to a specific commit on the other repository; so you still need someone to pull in the changes and commit that into the parent repository (so equally an 'update x to version y' commit). The only difference now being that anyone else updating/rebasing/pulling your parent repository doesn't automatically also actually receive the newly referenced submodule.
They need to explicitly run an additional update command for that.

To me, this sounds as a loss rather than a win.

In reply to by jeetee

I did some research in an attempt to clarify some of the things you brought up, but I could be wrong about everything.

> you still need someone to pull in the changes and commit that into the parent repository (so equally an 'update x to version y' commit).

I was surprised to learn that Dependabot could do this on submodules (here's an example I found), but I don't know if there's a way to have it only upgrade on specific releases (rather than on every commit, if the upstream repositories are also on GitHub).

> anyone else updating/rebasing/pulling your parent repository doesn't automatically also actually receive the newly referenced submodule.

This would still be a problem if you didn't either include this in a pre-commit hook or as a git config option.

However, the main issue I see with this is that, if you're using GitHub's release system, as of right now, GitHub does not include submodules in a release's archive.

Won't work for anything in the dependencies folder, as there we use the pre-build binaries, and git would only pull sources, which we'd then have to compile. For that font it might be different, being 'binary' already in the repository, similar for soundfonts, but see jeetee's remark above.
It may work for stuff in thirdparty and actually is being used for thirdparty/libcrashreporter-qt.

FWIW, I nothing about any of this, but since Campania was mentioned, I'd just say I'm open to whatever makes sense. I made this a separate repo primarily because I wanted people to be free to contribute to it who were not otherwise associated with the MuseScore project and without being bound by the MuseScore CLA. That's still a reasonable goal I think, but aside from that, I'm not attached to any one particular way of organizing this.

In reply to by Marc Sabatella

I'm not sure that having Campania in a separate repository really helps with that goal if you then submit it to MuseScore via a PR. You have signed the CLA to say that you are the sole copyright holder in your contributions. If other people had contributed to Campania then that would just make your signature on the CLA invalid.

Fortunately nobody else has contributed to the code parts of Campania yet, but when they do you will need special permission from MuseScore to submit Campania under its own terms rather than the terms of the CLA. (It should be ok for MuseScore to grant this permission because the CLA is only really needed for GPL-licensed code, and fonts aren't usually considered part of the program anyway.)

However, there is no real need for Campania to be in the repository at all. Developers could be asked to install it themselves like any other dependency, or the latest version could simply be fetched automatically during compilation, like the SoundFont.

In reply to by Jojo-Schmitz

It is not needed for the purpose of the CLA (which is to enable MuseScore to create closed-source apps). However, in the absense of an explicit agreement to the contrary, the CLA applies to all contributions regardless of whether it is actually needed for a particular contribution.

In reply to by Jojo-Schmitz

Hmm, well I don't totally understand the details of all this, but indeed, I don't think my font is inherently different from the other third party fonts we use. it's a font developed by a set of people under a license that allows anyone to do whatever they wish with it, including, I assume, incorporate it into MuseScore.

In reply to by Marc Sabatella

The situation with Campania is indeed no different to the situation with the other fonts. The fact that the fonts carry another license does not exclude them from the CLA any more than the GPL header in C++ files excludes those files from the CLA. In fact, the whole point of the CLA is to allow MuseScore to use contributions under a different license to the one given in the file.

Nevertheless, since these are fonts rather than C++ or QML code, it is more of a technical problem rather than a serious legal concern. MuseScore is the only party that could complain here, but if they did choose to complain then the complaint would be against you rather than your upstream contributors.

In reply to by shoogle

So I'm still completely confused. Did we get - or need to get - permission to include Bravura and add it under terms of the CLA? And what sort of complaint could potentially be brought? What would I have to do, or not do, in order for it to be something someone might complain about?

In reply to by Marc Sabatella

The complaint would occur if MuseScore wanted to do something with Bravura that is not allowed by the OFL, such as:

If MuseScore went ahead and did one of those things then Steinberg (the copyright holder) would complain that it's not allowed under the OFL. However, MuseScore could pass the buck onto whoever added Bravura to the repository in the first place, because that person (falsely) signed a CLA that basically says "this contribution is my own work and I give MuseScore permission to do whatever they want with it".

Of course Bravura has a copyright header that clearly says Steinberg, so MuseScore would be silly to ignore that and pretend the CLA takes precedence. But sometimes it's not so obvious. For example, you might submit Campania (which has your name in the copyright header) and say "I give permission under the CLA", but you can't speak on behalf of your contributors who have only agreed to the OFL.

Next time you submit a PR to update Campania, all you need to do is say in the PR description "Unlike my usual contributions, this PR is not covered by MuseScore's CLA. Campania font must be used under the terms of the SIL Open Font License. Only merge if you agree to these terms.". This is to protect yourself, not MuseScore or your contributors.

Do you still have an unanswered question? Please log in first to post your question.