-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
haskell generic-builder: Use strictDeps always, take II #43498
Conversation
I've had to fix ~10 references before |
Yes this is very much WIP. I did a quick & dirty rebase, and then Friday one out. I'll probably make it no overrides, and let hydra guide me to the minimal collection. |
31b9c61
to
6422440
Compare
I've been trying to get this to work for a week and after fixing many references and adding 10+ overrides I still can't cachix to compile. I don't think this is practical yet, so I'm switching focus on finding why we see up to 6 times of dependencies in GCC flags in the first place: #41340 (comment) |
80a78e2
to
3a6aad9
Compare
…h not be non-empty.
These seems to be common omissions due to a) non-new-build being overly flexible, and b) code gen most often used for test boilerplate.
This helps avoid the `ARG_MAX` issues we've been having, and is generally a good idea to ensure cross comparability anyways.
3a6aad9
to
6992e10
Compare
I couldn't reproduce the fatal eval error from https://hydra.nixos.org/jobset/nixpkgs/ericson2314-haskell-updates locally. |
Fixes build error in haskellPackages.alex: https://hydra.nixos.org/build/77569481/
59bc67b
to
fec89fb
Compare
Adds test tool inputs for hspec packages.
This is from the reverted branch but apparently still needed even after the cabal2nix changes.
Needed to get cabal2nix building again.
needs cpphs
hspec-discover is needed
@peti Unfortunately there are still many build failures even with the cabal2nix changes. I have added a few more overrides that I think are reasonable (and happen to fix lots of packages) but I wonder how many overrides you consider reasonable? Almost all of them are relying on hspec-discover to somehow propagate through from some other dependencies. |
@@ -5,7 +5,7 @@ | |||
# stripLen acts as the -p parameter when applying a patch. | |||
|
|||
{ lib, fetchurl, patchutils }: | |||
{ stripLen ? 0, extraPrefix ? null, excludes ? [], ... }@args: | |||
{ stripLen ? 0, extraPrefix ? null, excludes ? [], includes ? [], ... }@args: |
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.
Can we leave this out and just merge #43538 first?
|
This is a Executables of dependencies are on the Here is the corresponding code, git commit haskell/cabal@7dc0a10 and issue haskell/cabal#1120. That it doesn't work with Don't get me wrong, I'm not saying that breaking changes to the
As a side note: Specifying |
@sol,
I understand your point of view. Mine is different, though. cabal-install is merely catching up with features that many package managers have had for a long time. The dependency "make the hspec library available in the current environment" is not the same as "make the hspec library and all its executables and all the libraries and executables it depends on available in the current environment". It was a mistake to assume that expressing the former will accomplish the latter, and this assumption has been false for Nix and rpm and many other tools for years, really, and now it's false for cabal-install, too.
Okay, but that was in 2012. Apparently, the perception these days is that dependencies on build-tools should be expressed explicitly, not implicitly.
To be fair, this issue has existed for a long time and you have been aware of it for a long time. You just chose to ignore it: sol/markdown-unlit#1 (comment).
Yes, we can do that as a workaround. Please note that the underlying problem is not going to go away, though. Your dependency specifications are inaccurate and the problems this causes will not get better in the future -- they'll get worse. |
This is what I intend to do sol/hpack#311. |
The commit you mention has "temporary" in the name commercialhaskell/stack#4132 (comment). For the record, I agree a deprecation cycle would have been prudent, as I argued in haskell/cabal#5412. But if they called the feature "temporary", I'd say that's a pretty clear indication they don't intend it as a first class solution and reserve the right to remove it. The killer app for explicit tool dependencies is not per-component builds, but cross compilation, as I articulated here commercialhaskell/stack#4132 (comment). I hope this ends up turning stack's policy of no breakage here into a deprecation cycle; they do support GHCJS if not general cross compilation, after all. Your sol/hpack#311 solves the immediate crisis, but potentially causes a lot more unneeded work in the cross case than it does in the native case. |
@peti I agree the thing to do as convince upstream, (and at least @sol has a workaround). I view our overrides, whether in nixpkgs or cabal2nix, as not an essential part of this change, but just as a gift to packages that don't follow the (updated) cabal spec. |
@Ericson2314 as I mentioned elsewhere: One more thing, the discussion on this feature and a code comment use the term temporarily. I want to point out that temporarily in this context means "temporarily, while the action passed to |
OK my bad. Thanks for linking me that thread too. |
Why is this |
The reason |
Well yes, that is the exact bug that needs fixing. Just make it do the same thing as the old code did in the native compilation case, no?
That's just the code for computing |
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L516-L530 this part triggers setup-hooks multiple times, which is what binutils setup hook does to LDFLAGS. |
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.
After some deliberation I've concluded to be neutral w/r to this PR. I'll trust other people's judgement to do the right thing.
What is the status of this pull request? |
There has been no action on this PR since mmahut asked if it was still active last year, so I will go ahead and close it. If this was premature, please feel free to re-open it or send a new PR. (I think most of the people on this thread should have permissions to just re-open.) |
Motivation for this change
The regenerated code + I think the subset of the overrides we still need
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)CC @matthewbauer