Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt suggests "UNLICENSED" but says it's invalid when entered #181

Open
jasonsparc opened this issue Nov 27, 2022 · 7 comments
Open

Prompt suggests "UNLICENSED" but says it's invalid when entered #181

jasonsparc opened this issue Nov 27, 2022 · 7 comments
Labels
bug Something isn't working
Milestone

Comments

@jasonsparc
Copy link

Hi! My work is currently licensed under “The Unlicense” license. Now, running ahkpm init, the prompt said something like,

…a valid SPDX license identifier or "UNLICENSED"

Emphasis mine, especially the 'D' character at the end.

And so, naturally, I typed UNLICENSED, but it nagged to me that it was invalid. Then I noticed that, “The Unlicense” doesn't end in 'D'. So, I typed UNLICENSE, but it nagged again. So in the end, it really only accepts case-sensitive SPDX identifiers. (Note that, I had to google what “SPDX license identifier” mean, just to get pass that prompt :P)

Conclusion: It's the prompt's fault :P

Proof of my little trials and tribulations:

Capture

P.S. Thanks for considering my little DSV library as one of the first few packages available via ahkpm. Also, a package manager for AHK is indeed a really cool idea btw! Something like that would definitely simplify my current AHK setup.

@joshuacc joshuacc added the bug Something isn't working label Nov 27, 2022
@joshuacc
Copy link
Owner

Thanks for the bug report, and sorry for the time you wasted fighting it!

Should have a fix for it in the next couple of days that:

  1. Allows "UNLICENSED"
  2. Clarifies that "UNLICENSED" is if you don't want others to use it.
  3. Provides a link to the SPDX license list to help find the correct identifier.
  4. Compares identifiers case insensitively, and automatically converts it to the correct casing in ahkpm.json.

@joshuacc
Copy link
Owner

joshuacc commented Dec 1, 2022

@jasonsparc I've merged a fix for 1, 2, and 3 above. See #187. I expect to publish a 0.7.0 with the fixes this evening or tomorrow morning.

Number 4 from above will take a bit longer, but I can probably have that done sometime next week.

@jasonsparc
Copy link
Author

jasonsparc commented Dec 2, 2022

Is "UNLICENSED" equivalent to having no license? If so, how about "NO LICENSE" instead? This avoids confusion with "The Unlicense" (i.e., https://choosealicense.com/licenses/unlicense), which is actually a valid license as a dedication to the public domain (while also covering legal stuffs).

Also, I think my suggestion ("NO LICENSE") plays nicely with GitHub's warning (and labeling) about what may happen if you don't choose a license whatsoever for your repo (i.e., https://choosealicense.com/no-permission).

@joshuacc
Copy link
Owner

joshuacc commented Dec 2, 2022

@jasonsparc Yes, it is equivalent. I initially chose "UNLICENSED" because that is the value npm uses. However, doing a bit of searching, it seems that a lot of npm users have been confused by the ambiguity of "UNLICENSED" versus The Unlicense.

(I must say that I really dislike the name for The Unlicense precisely because it sounds like there is no license granted. But since I can't actually fix that...)

I will change ahkpm to use "NO LICENSE" rather than "UNLICENSED" to avoid this ambiguity. Should have another fix merged later this morning, and release 0.7.0 with the fix sometime later in the day.

@joshuacc
Copy link
Owner

joshuacc commented Dec 2, 2022

0.7.0 with the bugfixes mentioned above has been released: https://github.com/joshuacc/ahkpm/releases/tag/0.7.0

@jasonsparc
Copy link
Author

Looks good 👍

I'll keep this open just in case you still want to implement number 4. Although, even if you don't implement the case-insensitive lookup, I think people would just go to the provided link and look up their license identifier there, in case the program doesn't accept their incorrectly cased input. Feel free to close this issue once that's implemented.

@jasonsparc
Copy link
Author

I just tried it too:

Capture

P.S. I could see the new "scripts": {} line too. I might try it for my test script when I find the time :)

@joshuacc joshuacc modified the milestones: 0.7.0, 0.8.0 Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants