Skip to content

shellcheck: add override for newer version#207764

Merged
maralorn merged 4 commits intoNixOS:haskell-updatesfrom
qowoz:shellcheck
Dec 29, 2022
Merged

shellcheck: add override for newer version#207764
maralorn merged 4 commits intoNixOS:haskell-updatesfrom
qowoz:shellcheck

Conversation

@zowoq
Copy link
Copy Markdown
Contributor

@zowoq zowoq commented Dec 26, 2022

Description of changes
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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Dec 26, 2022
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Dec 26, 2022
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't necessarily want to argue against this change, but in the past we have generally only provided Haskell packages at the versions locked in the LTS release we are tracking. We generally don't provide top-level packages for Haskell package versions that are newer than in LTS.

We have an open issue about this: #190542

Is there some reason you think that ShellCheck should be "special" in this regard, and have the top-level package be the latest version (as opposed to whatever version is in the LTS)? It generally creates more work for the Haskell team to have packages tracking a version not in the LTS (not that this is a super-important reason).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It used to be that shellcheck was always the newest version but that override was dropped for some reason. (IIRC it was somewhere in the haskell tooling outside this repo)

Is there some reason you think that ShellCheck should be "special" in this regard, and have the top-level package be the latest version (as opposed to whatever version is in the LTS)?

TBH I think this is looking at it wrong. LTS tracking is only relevant because this happens to be written in haskell which is a detail users most likely don't care about. Is there a reason to not have the newest version of this tool?

I did the same PR a year ago: #147780

It generally creates more work for the Haskell team to have packages tracking a version not in the LTS ...

Is there any way to have pkgs.shellcheck be independent of haskellPackages, e.g switch to using a FOD for the deps?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any way to have pkgs.shellcheck be independent of haskellPackages, e.g switch to using a FOD for the deps?

We unfortunately don't have any way of doing this for the Haskell stuff in Nixpkgs right now. (Although I agree this would potentially be a better solution for a package like shellcheck. The top-level purescript package is somewhat similar, and if you take a look at the derivation you'll see that we're distributing patchelf'd binaries, instead of building from source.)

Is there a reason to not have the newest version of this tool?

It causes slightly more work for the Haskell maintainers here in Nixpkgs. When a new version of ShellCheck is released (like 0.9.1), haskellPackages.ShellCheck_0_9_0 will no longer be available (instead we'll only have haskellPackages.ShellCheck_0_9_1), and one of us will have to manually update the reference here in all-packages.nix. It creates extra work for us.

Not that I think that is necessarily a reason to prevent this PR from being merged in.

Copy link
Copy Markdown
Contributor Author

@zowoq zowoq Dec 26, 2022

Choose a reason for hiding this comment

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

... distributing patchelf'd binaries ...

shellcheck upstream doesn't have binaries for many platforms so this probably isn't an option at the moment.

Is there a reason to not have the newest version of this tool?

It causes slightly more work for the Haskell maintainers here ...

Yes, sorry I meant besides that. I am sympathetic to not wanting more work and that every little bit adds up but not providing the newest version of a dev tool seems a bit odd.

Also shellcheck doesn't release very often so likely the next time this needs to be touched will to remove it as 0.9.0 is the default.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shellcheck upstream doesn't have binaries for many platforms so this probably isn't an option at the moment.

Ah, I was agreeing with you that not having some sort of FOD builder for Haskell is unfortunate, and the purescript situation is less-than-ideal!

Also shellcheck doesn't release very often so likely the next time this needs to be touched will to remove it as 0.9.0 is the default.

That makes sense, and sounds like a good reason to go ahead with this change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It used to be that shellcheck was always the newest version but that override was dropped for some reason. (IIRC it was somewhere in the haskell tooling outside this repo)

Those overrides actually exist within nixpkgs and I cleaned them up a while ago. Not sure if shellcheck was in there at that point. Maybe we can introduce a policy that any maintainer of a package is allowed to enter their package there (with a comment).

Copy link
Copy Markdown
Contributor Author

@zowoq zowoq Dec 26, 2022

Choose a reason for hiding this comment

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

Those overrides actually exist within nixpkgs

Oh, thanks. I had looked through haskell-modules history but I forgot about the scripts in maintainers.

Not sure if shellcheck was in there at that point.

Looks like it was: bf3a3b6

Maybe we can introduce a policy that any maintainer of a package is allowed to enter their package there ...

I'm not maintaining it currently but if this approach makes things easier I can add myself. My haskell knowledge is rather limited so I probably won't be of much use if the package breaks in a non-trivial way.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You have proven enough nix knowledge to be fully qualified for a maintainership. Deep Haskell knowledge is rarely required and if it is, you can always ask in #haskell:nixos.org.

@SebTM
Copy link
Copy Markdown
Contributor

SebTM commented Dec 26, 2022

Edit: Resolved, there is a reference but because the file is so big GitHub search tricked me - seems like it was added in a commit without the name in it.

I'm sorry to ask but I was about to make a PR myself (with copying the shellcheck in haskell-modules) and trying to figure out how this solution works/why as I can't find any reference on ShellCheck_0_9_0 so what I found out so far it seems parsed like "Package_Version" but isn't there any hash to maintain/compare? Is this Nix-Haskell specific and are there some more docs I can read about this?

@ofborg ofborg bot requested a review from Profpatsch December 28, 2022 01:17
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Dec 28, 2022
@sternenseemann
Copy link
Copy Markdown
Member

Hopefully everyone who needs a specific version of ShellCheck (i.e. need specific rules) pin as strictly as haskell-ci.

In favor as it mirrors how things have been historically.

@maralorn maralorn merged commit 931fef0 into NixOS:haskell-updates Dec 29, 2022
@zowoq zowoq deleted the shellcheck branch December 29, 2022 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants