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

Auto-wiring #114

Open
roberth opened this issue Feb 1, 2023 · 5 comments
Open

Auto-wiring #114

roberth opened this issue Feb 1, 2023 · 5 comments
Labels
question Further information is requested undecided Depends on postponed design decision

Comments

@roberth
Copy link
Member

roberth commented Feb 1, 2023

Modules can provide various levels of integration, where an integration is any definition that isn't of a function that it declares.
Sometimes, integrations are not desirable. Making integrations lib.mkDefault may help, but this may not always be sufficient. If it turns out that some flakes need to disable too many integrations explicitly, perhaps it makes sense to introduce a single global option that disables all integrations. All (reusable) modules should then adhere to that option.

The story of a flake would then be

  1. initialize a flake with flake-parts
  2. add some modules with integrations
  3. use the integrations
  4. add a module with undesirable integration
  5. configure that module to disable that integration (?)
  6. encounter another undesirable integration
  7. set autoWire = false
  8. write the missing integrations that they did need

Perhaps modules could list their integrations in another option, to help with (8), but all in all it's not a great experience. I would consider this idea to be a last resort; I hope we'll find better solutions.

@roberth roberth added question Further information is requested undecided Depends on postponed design decision labels Feb 1, 2023
@srid
Copy link
Contributor

srid commented Apr 11, 2023

I just had an use-case for granular auto-wiring: srid/haskell-flake#142

@srid
Copy link
Contributor

srid commented Jun 29, 2023

@roberth
Copy link
Member Author

roberth commented Jan 29, 2024

Projects (TBD) might provide an alternative

@srid
Copy link
Contributor

srid commented Jul 13, 2024

Another: juspay/rust-flake#13

@srid
Copy link
Contributor

srid commented Oct 5, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested undecided Depends on postponed design decision
Projects
None yet
Development

No branches or pull requests

2 participants