Repository navigation
haskellPackages.nixfmt: drop - #554040
haskellPackages.nixfmt: drop#554040
Conversation
You'd have to finish #441204 or convince me to do it ;) Put differently: There is currently no way to remove a package from |
sternenseemann
left a comment
There was a problem hiding this comment.
Should be possible to remove the package outright in the future with NixOS/cabal2nix#667, but we're currently a bit swamped with a lot of stuff going on.
| fi | ||
|
|
||
| nixfmt pkgs/development/haskell-modules/hackage-packages.nix | ||
| nix-shell --run 'treefmt pkgs/development/haskell-modules/hackage-packages.nix' |
There was a problem hiding this comment.
Please revert this change, this is deliberate.
There was a problem hiding this comment.
Could you elaborate a bit more?
- The CI team and formatting team have consistently advised not running
nixfmtdirectly:- it may be an out-of-sync version vs what's used in CI
- additional formatters (like nixf-diagnise) may also be relevant
- Therefore, it's best to run the actual treefmt config
nixfmtis not pulled in as a script dependency (it's missing from thenix-shellshebang at the top)- Therefore, I cannot run the maintainers script without separately entering a shell with
nixfmtavailable. - A quick way to tell if you've declared all dependencies is to add
--pureto yournix-shellshebang.
(I believegetoptis also undeclared, but I happened to have that installed on my system)
- Therefore, I cannot run the maintainers script without separately entering a shell with
There was a problem hiding this comment.
(dropped as this PR isn't the place to have the debate, but I'd still appreciate further elaboration)
There was a problem hiding this comment.
IIRC, we deliberately called nixfmt here, because we couldn't do the "add the right thing to the nix-shell shebang" dance, when that was still a thing. That's because we need to depend on the current state of the branch on the shebang, to get latest cabal2nix-unstable. This conflicted with the need to pull nixfmt from CI's pinned commit.
We have basically been running with the assumption that you have entered nix-shell, before running this script.
However, the nix-shell --run treefmt .. call should probably work, I don't immediately see anything wrong with it.
Nixfmt is no longer released to Hackage; the package there is the unmaintained "Nixfmt Classic" which is being dropped in Nixpkgs 26.11.
6dcfb26 to
bc0e512
Compare
script change had been reverted
|
Backport job failed with: Not relevant here, because there was no tag to backport anyway, just wanted to mention it in case this wasn't known already. |
We've already dropped its top-level alias
nixfmt-classic, however the underlyinghaskellPackagespackage is harder to drop because it is generated from hackage. See tracking issue: NixOS/nixfmt#340In this PR I've added a
throwwhenconfig.allowAliasesis true, and I've attempted to drop the generated package. So far, I've only been able to getregenerate-hackage-packages.shto sethydraPlatforms = lib.platforms.none, I've not been able to convince it to fully drop the package.It'd be great if any haskell core maintainers could steer me in the right direction for how they want a generated-from-hackage package to be dropped. /cc @sternenseemann
I also fixed an issue withEDIT: dropped for now; proved too controversial for this PR.regenerate-hackage-packages.shrunningnixfmtfrom PATH, instead oftreefmtfrom the Nixpkgs shell. Otherwise, I was unable to runregenerate-hackage-packages.sh.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.