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
Rename params: *url to *uri #551
Conversation
|
Requesting feedback! I hope it's not too contentious to change all the terminology in private code; it seemed to me that leaving inconsistencies would be a poor dev experience for future maintainers. |
Thank you @fsackur for opening up this PR!
Just a few things--
-
There's a handful of changes in PublishPSResource that should actually not be changed, specifically 'licenseUrl', 'iconUrl', and 'projectUrl'. Those names are specified in the module manifest, which is used to generate the nuspec, so it'll cause problems when publishing (see nuspec reference if interested)
-
This is very minor but the last two tests (SetPSResourceRepository.Tests.ps1 and UnregisterPSResourceRepository.Tests.ps1) have Uri in all caps whereas the other tests have it in pascal case. I would recommend changing the former tests to pascal case just to be consistent. Of course this is just an aesthetic request!
Hi @fsackur! Thanks for creating this PR and for diligently going through all the files and making appropriate changes. I know it looks like a lot of comments but I had feedback in 3 main areas:
-
please remove the
test/result*file reference from the .gitignore. I imagine it's for your local file purposes. Thanks :) -
it's a bit of a nitpick but it would be nice to match the casing of cmdlet's Uri parameter across all tests/code. I know in some of the original code we accidentally had it as "URL" so I understand changing it to "URI" however "Uri" where appropriate would be best. I left suggestions on where all this would happen.
-
I echoed @alerickson's feedback on reverting the *url to *uri change for LicenseUrl, IconUrl, ProjectUrl in a few documentation files just so that we don't miss it.
Thanks for making all these changes, it's looking great :D
|
My thanks for the detail - this represents a lot of review work. I will not be able to look at it for 10 days at least - I aim to update the PR by 2021-12-16. |
|
Aplogies for sitting on this so long, after anamnavi put so much time into review. I will update the PR this week |
|
@alerickson / @anamnavi - It's worth remembering that whilst nuget uses Whilst I haven't looked deeply at this repositories code base (or this PR either) we need to be sure that the module manifest is correct as people who run the following would end up being broken if the resultant manifest uses Just thought it worth mentioning |
785754a
to
6259add
Compare
|
Thanks for the feedback, I have addressed the points. Can I get a re-review? @anamnavi you asked me to pascal-case some |
Looks good, just a couple of spots that both @anamnavi and I added suggested changes to be consistent with the Pascal casing of 'Uri'. Once those are in this should be good to go
|
I take that feedback to mean that |
|
Thanks for giving us a heads up on that @kilasuit! I'm going to open up an issue so that we can test and make sure we have the 'projectUrl' or 'projectUri' and 'iconUrl' or 'iconUri' in the appropriate places. I'll open up a new PR to fix any changes there and add you to review it (no pressure to if you'd rather not). |
|
I did publish a module to the gallery from this branch. I was then able to find it; it did have project and licese properties as set in my .psd1. |
|
@anamnavi thanks for all the work you and @alerickson have put into this review. I have taken your review comments to mean that I should change The only places where all-caps I can haz merge? |
| @@ -46,5 +46,5 @@ See change log (CHANGELOG.md) at https://github.com/PowerShell/PowerShellGet | |||
| } | |||
| } | |||
|
|
|||
| HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=855963' | |||
| HelpInfoUri = 'http://go.microsoft.com/fwlink/?linkid=855963' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fsackur can you please revert this change specifically? Like just change it back to "HelpInfoURI".
This variable is uppercased "URI" (i.e HelpInfoURI) in the module manifest files for packages on PSGallery. Example: https://www.powershellgallery.com/packages/PowerShellGet/2.2.5/Content/PowerShellGet.psd1 L286).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I just noticed 'ProjectUri' and 'LicenseUri' both have Uri in Pascal case, so I think we should leave this as is for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay that makes sense. I'll merge the PR in then :)
|
@fsackur thank you for the hard work and being so diligent with these changes and also sharing the rule of thumb you used when changing URI => Uri in all strings and comments, that's helpful for us to know! Sorry for the late response and review, I was a little out of it after my booster shot. This looks good to me, only one minor change request, per my comment right above this one (it's just a capitalization change for consistency sake with other .psd1 files, and is just a small nitpick if you don't mind addressing that). Thank you for your contribution! :D |


PR Summary
-URLparams to-Uri(including, e.g.,-LicenseUrl=>-LicenseUri)url=>uri, for consistencyURL, where they make sense in the contexttest/result*to.gitignorebuild.ps1to try importingPSPackageProjectbefore installing againPR Context
Ref #460
Broadly speaking, all installed-by-default modules use
uriin parameter names instead ofurl. To provide consistency, I think PowerShellGet should also follow this convention.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.