urho3d/urho3d

Minimizing license text in each file

1vanK opened this issue · 13 comments

1vanK commented

In every file we have full text of MIT license which does not provide useful information. Especially strange it looks in scripts: https://github.com/urho3d/Urho3D/blob/master/script/cmake_codeblocks.bat

I propose to replace the full text of the license with a short note:

// Copyright (c) 2008-2022 the Urho3D project
// License: MIT

This way used by Goggle and Microsoft
https://github.com/microsoft/vscode/blob/main/src/bootstrap.js
https://github.com/google/brotli/blob/master/js/bundle_test.js
https://github.com/google/orbit/blob/main/bootstrap-orbit-ggp.ps1

TL;DR: It sounds good but I am not sure if it's legal.

I personally think this is good way to specify license and I was always annoyed by these huge blobs of text in Urho files. Although I personally prefer more elaborate version like here with file name or even link to a license file instead of plain "License: MIT" like you suggested.

However, I am not sure if it's technically legal to retroactively remove MIT license text from existing files. This line allows variety in interpretation:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

1vanK commented

I do not think that the reference to the license and the full text of the license are different licenses. I mean that after this manipulation, the license does not change. Google and Microsoft have expensive jurists who have decided that this way of specifying a license is acceptable.

Google and Microsoft have expensive jurists who have decided that this way of specifying a license is acceptable.

The difference is that Google and Microsoft used License this way from the start, and you want to apply this change retroactively to existing files made by other people.

For the record, I still think it's okay, I am just not 100% sure.

1vanK commented

The question is what is the substantial portion. If I take one source file from the project, then I will have to take it with a copy of the LICENSE file. These two files will be a single portion.

IANAL, no comment.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

I am also not a lawyer, but to me, this does not say that the copyright notice and permission notice shall be included multiple times in a copy of the software, and the repository is what I would consider us to be providing. I'd say if someone were to provide one source file, they should add the license to it or include the license with it as another file. In terms of the ability to download a single file from GitHub, I would argue that that is not significantly different from my ability to scroll down in a text editor and hide the license. It is still in some since included even though I can't see it and have to provide some more input to view it.

Another option for a slight improvement would be to move the license details to the end of the file. The license says nothing about where in a file the license should be included.

I also think that a specific reference to the full license file may be better, something like

// Copyright (c) 2008-2022 the Urho3D project
// License: MIT. See LICENSE in the project root for more information.
1vanK commented

See LICENSE in the project root for more information.

engine can be subfolder of another project, so in root can be another LICENSE file

Fair point, I had not considered that. And it's certainly going to be more common a practice than someone putting vscode inside a project.

Your original suggestion sounds better to me, given that, or we could consider adding the license to the website and linking to that https://urho3d.io/license.txt.

1vanK commented

Or rename LICENSE to urho3d_license.txt

Such change would throw an extra step into using git blame with every source code file. Nvm about that, i confused things.

It also does not really solve anything. All things considered its not worth the effort IMO. Modern IDEs collapse these things anyway.

1vanK commented

Modern IDEs collapse these things anyway.

Not really (KDevelop for example)

Besides this must be done manually when opening each file in Visual Studio.

Such change would throw an extra step into using git blame with every source code file.

I didn't understand what you mean

1vanK commented

It also does not really solve anything.

This simplifies searching in cases where instead of a word from the source code, there is the word from the license text in each file.