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

Fix mason license source #25062

Merged
merged 5 commits into from
May 23, 2024
Merged

Conversation

arezaii
Copy link
Contributor

@arezaii arezaii commented May 16, 2024

In Mason, updates the source list of valid license names to the proper spdx repository. Also adds a new option to mason publish, --refresh-licences that will force delete and make a new clone of the license repository that is stored in the .mason folder.

The feature is implemented in such a way that if it's passed, it will be the only option executed. This felt OK to me since it should be a very rarely if ever used option and it seemed like a distinct operation from the publishing actions.

Includes some testing for the refresh-licenses feature, while there, updated some tests that had malformed arguments to the corresponding mason sub-function, and fixed some linter warnings for unused names and indentation.

TESTING:

  • paratest [Summary: #Successes = 17229 | #Failures = 0 | #Futures = 926]

[reviewed by @benharsh - thanks!]

Signed-off-by: arezaii <ahmad.rezaii@hpe.com>
Signed-off-by: arezaii <ahmad.rezaii@hpe.com>
Signed-off-by: arezaii <ahmad.rezaii@hpe.com>
Signed-off-by: Ahmad Rezaii <ahmad.rezaii@hpe.com>
@arezaii arezaii marked this pull request as ready for review May 21, 2024 17:08
@arezaii arezaii requested a review from benharsh May 22, 2024 21:24
const badSyntaxMessage = 'Arguments do not follow "mason publish [options] <registry>" syntax';

if refreshLicenses {
writeln("Force updating list of valid license names from SPDX repo...");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would a hyphen be appropriate here? "Force-updating"? I'm not 100% sure of my grammar here (or anywhere...).

At your discretion.

if refreshLicenses {
writeln("Force updating list of valid license names from SPDX repo...");
refreshLicenseList(true);
writeln("done updating license list");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After grepping around, it looks like we tend to use capitalization for the first word.

Signed-off-by: Ahmad Rezaii <ahmad.rezaii@hpe.com>
@arezaii arezaii merged commit 10247fd into chapel-lang:main May 23, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants