-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Generate version alias info to streamline updates #610
Comments
I agree that when version bounds change, we have to do a lot of busy work. It is really annoying. I like the idea of having additional attributes for packages, like the proposed: Cabal_3_10_x = self.Cabal_3_10_2_1; As you may know, a year ago or so we added aliases for ghc versions, so now attributes are available like I'm wondering if you could be more specific about how you'd expect the Nixpkgs Haskell stuff would change, as well as For instance:
|
I have also thought multiple times about having Cabal_3_10_x or Cabal_3_10 or also Cabal_latest. |
I think there are a couple of problems with this kind of stuff.
I remember @peti usually replying that how cumbersome working with non-standard version is partially intentional. It should be a last resort if it is not possible to get the desired package(s) to build otherwise. Usually the busywork can be solved by a very simple search and replace on nixpkgs (I use OTOH it seems to me that the amount of versioned overrides necessary has increased which is pretty infuriating. With increased activity on core tools like |
When the version bounds change, so do the attribute names, which leads to busywork such as most of the commits in
Proposal
For every configured version bound, figure out a minimal identifying suffix.
Alias
For each such suffix, add an alias such as
Suffix
Minimal identifying suffix examples:
Generic override
To really solve the problem, we need to take care of attribute definitions as well; the left hand side of the attribute
=
.A possible solution is to also generate in the package set:
This allows a function to be written that applies overrides to all aliases, or a version range.
Though probably we should use
composeExtensions
to avoid accidentally overwriting things in the attrset before the dynamic overrides (perhaps only for the first//
, or the design could be adapted; see below).In an overlay, it is acceptable for
attrNames
of a layer to depend onsuper
; just not onself
.attrValues
may always refer toself
, as usual. So I expect no strictness problems with such a design.Improved interface:
This allows
versionRangeOverrides
to usecomposeExtensions
once, and compose the dynamic part in a single concatenation usingconcatMapAttrs
instead of many//
.The text was updated successfully, but these errors were encountered: