Skip to content

lib: remove the lib fix-point#149881

Closed
zimbatm wants to merge 2 commits intoNixOS:masterfrom
zimbatm:no-lib-fixpoint
Closed

lib: remove the lib fix-point#149881
zimbatm wants to merge 2 commits intoNixOS:masterfrom
zimbatm:no-lib-fixpoint

Conversation

@zimbatm
Copy link
Member

@zimbatm zimbatm commented Dec 9, 2021

KISS. Fix-points are fun but also make things less approachable.
Functions in lib/fixed-point.nix had to know that they were being used
in the lib/default.nix and couldn't rely on lib.

If you find yourself needing to replace an existing lib function, patch
entangled. For example lib/fixed-point.sh
nixpkgs (this should be pretty rare). Extending is still possible with
the merge (//) operator.

Motivation for this change
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/)
  • 22.05 Release Notes (or backporting 21.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.

KISS. Fix-points are fun but also make things less approachable.
Functions in lib/fixed-point.nix had to know that they were being used
in the lib/default.nix and couldn't rely on lib.

If you find yourself needing to replace an existing lib function, patch
entangled. For example lib/fixed-point.sh
nixpkgs (this should be pretty rare). Extending is still possible with
the merge (`//`) operator.
@github-actions github-actions bot added the 6.topic: agda A dependently typed programming language / interactive theorem prover label Dec 9, 2021
Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

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

This is a good change, but also a breaking change. Users of lib.extend should be given time to migrate their code with a deprecation message. The message should reference documentation that helps them migrate. They'll need to learn about specialArgs for example.

@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 Dec 9, 2021
@infinisil
Copy link
Member

I'm against this in its current form because it breaks the original reason I added .extends in #38522. Please take a look at the whole discussion in that PR

@zimbatm
Copy link
Member Author

zimbatm commented Dec 10, 2021

Thanks, with the extra context, I don't believe that this PR is worth it anymore.

@zimbatm zimbatm closed this Dec 10, 2021
@zimbatm zimbatm deleted the no-lib-fixpoint branch December 10, 2021 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: agda A dependently typed programming language / interactive theorem prover 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.

3 participants