`raco pkg new` License not recognized by github

This is the first time I have used the raco pkg new command to create my new package. (before I created them manually)

I noticed that for my manually created packages the license is recognized by github and shown with a nicer ui, both in the sidebar and when viewing the license file.

foto_2022-02-16_06-45-41

While for my auto-generated License file (I only changed the auto generated name in it and renamed it to "LICENSE") it shows "View License" in the sidebar and doesn't recognize that it is the MIT License.
It seems the 4 extra lines on top of the License cause github to not recognize it.

define-attributes 

MIT License

Considering the two license files already have their name in the file name maybe those lines aren't needed in the files themselves. But I still haven't tested what happens when both files are present, because currently I only use the MIT License.

If the two files should stay the same, then maybe there is some github project (similar to the .gitignore project) where this can be customized? So far I haven't found anything that looks like there is a similar project or extra customization abilities. see edit below

The racket/racket repo uses a LICENSE.txt that then describes via text where to find the various license files and which are used for what, maybe something similar would be needed for dual license,
but then the "nice ui" probably doesn't work.


This link describes how license recognition works: Licensing a repository - GitHub Docs

It also states:

If your repository is using a license that is listed on the Choose a License website and it's not displaying clearly at the top of the repository page, it may contain multiple licenses or other complexity. To have your license detected, simplify your LICENSE file and note the complexity somewhere else, such as your repository's README file.

So maybe it would make sense to choose a primary license and then note that the other license can be used too in the readme.

1 Like