Skip to content
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

fix config handling revert complex patch handling #90

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

blaggacao
Copy link
Collaborator

Revert patching functionality and fix config handling

The patching functionality is fundamentally ill designed
and makes the code complex to the point that it is increasingly
hard to audit it for correctness.

The root of evil and ill-design is that it is a work-around for
what the Unoficial Flake Roadmap describes as follows:

  • flake inputs are flake inputs
  • patched flake inputs are flake inputs

Furthermore this commit fixes a naive implementation of nixpkgs.config
handling that causes nasty regressions on edge cases. Namely, not only
can a nixpkgs config be a function, but also the merging semantics
as defined by the module system requires detailed knowledge of the
potential shape of the cofig attrs / function.

@blaggacao blaggacao force-pushed the fix-config-handling-revert-complex-patch-handling branch from a1e8206 to 48e2161 Compare September 5, 2021 08:46
In more advanced usage scenarios, the guarantees of this code path
are never strong enough and the error produced is non-recoverable.

Sorry to lovers of "automagic".
The patching functionality is fundamentally ill designed
and makes the code complex to the point that it is increasingly
hard to audit it for correctness.

The root of evil and ill-design is that it is a work-around for
what the Unoficial Flake Roadmap describes as follows:
- flake inputs are flake inputs
- patched flake inputs are flake inputs

Furthermore this commit fixes a naive implementation of nixpkgs.config
handling that causes nasty regressions on edge cases. Namely, not only
can a nixpkgs config be a function, but also the merging semantics
as defined by the module system requires detailed knowledge of the
potential shape of the cofig attrs / function.
@blaggacao blaggacao force-pushed the fix-config-handling-revert-complex-patch-handling branch from 48e2161 to ed14e98 Compare September 5, 2021 16:38
Base automatically changed from staging to master September 5, 2021 16:41
@Pacman99
Copy link
Collaborator

I agree with this, but I realize a fair bit of contributors to here really value the patches feature. I think we need some discussion on patching and what people use it for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants