Skip to content

buildGoModule: correct spelling in documentation and simplify the go-modules structure#234032

Merged
zowoq merged 2 commits intoNixOS:masterfrom
ShamrockLee:go-module-prepare
May 27, 2023
Merged

buildGoModule: correct spelling in documentation and simplify the go-modules structure#234032
zowoq merged 2 commits intoNixOS:masterfrom
ShamrockLee:go-module-prepare

Conversation

@ShamrockLee
Copy link
Contributor

@ShamrockLee ShamrockLee commented May 25, 2023

Description of changes

Change "platform dependant checksums" to "platform-dependent checksums", as "dependant" is only used as a noun.

Simplify the attribute structure in pkgs/build-support/go/modules.nix. This causes no rebuild and ease the review process of #225051.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: golang Go is a high-level general purpose programming language that is statically typed and compiled. 8.has: documentation This PR adds or changes documentation labels May 25, 2023
@ShamrockLee ShamrockLee marked this pull request as ready for review May 25, 2023 17:25
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels May 25, 2023
@zowoq
Copy link
Contributor

zowoq commented May 26, 2023

Switching to draft as we'll merge #225371 first.

@zowoq zowoq marked this pull request as draft May 26, 2023 04:37
@zowoq zowoq self-assigned this May 26, 2023
@zowoq
Copy link
Contributor

zowoq commented May 26, 2023

@ShamrockLee Please rebase this PR.

Change "platform dependant" to "platform-dependent"

The word "dependant" (with suffix -ant) is used as a noun
in British English, while the adjetive is "dependent" (-ent).
Both are "dependent" in American English.

Reference:
https://www.merriam-webster.com/words-at-play/spelling-variants-dependent-vs-dependant
https://dictionary.cambridge.org/dictionary/english/dependant
Copy link
Contributor

Choose a reason for hiding this comment

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

https://nixos.org/manual/nix/stable/language/builtins.html#builtins-isNull
This function is deprecated; just write e == null instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed.

@zowoq
Copy link
Contributor

zowoq commented May 27, 2023

Please revert the last indentation change.

Comment on lines 58 to 59
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, in my previous comment I meant revert this:

Suggested change
go-modules =
if (isNull vendorHash) then "" else
go-modules = if (isNull vendorHash) then "" else

@zowoq
Copy link
Contributor

zowoq commented May 27, 2023

@ShamrockLee Please drop the formatting changes from this PR, rather than us going back and forth over formatting it'll be easier if I do it myself.

@ShamrockLee ShamrockLee changed the title buildGoModule: correct spelling in documentation and format the expression buildGoModule: correct spelling in documentation and simplify the go-modules structure May 27, 2023
@ShamrockLee
Copy link
Contributor Author

Finished rebasing and addressed the suggestions.

@zowoq zowoq marked this pull request as ready for review May 27, 2023 21:47
@zowoq zowoq merged commit 1a89cfa into NixOS:master May 27, 2023
@zowoq zowoq removed their assignment May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: golang Go is a high-level general purpose programming language that is statically typed and compiled. 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants