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

feat: Explicit autowiring of crates #13

Merged
merged 4 commits into from
Jul 13, 2024
Merged

feat: Explicit autowiring of crates #13

merged 4 commits into from
Jul 13, 2024

Conversation

srid
Copy link
Member

@srid srid commented Jul 13, 2024

On a multi-crate workspace, disable autowiring of crates by default, unless the crate has binaries. Otherwise, they will be forced to configure each library crate to build in Nix separately (via specifying buildInputs) which is quite unnecessary if only a handful of crates need to be exposed in the flake.

The user can toggle autoWire on or off for individual crates. The packages are nevertheless exposed as options.

@srid srid marked this pull request as ready for review July 13, 2024 16:07
@srid
Copy link
Member Author

srid commented Jul 13, 2024

A case for enabling autowiring by default: when people add new crates (e.g.: juspay/superposition#92) and don't necessarily remember to explicitly enable it for that new crate.

OR

Smart autowiring? Should crates with binaries be autowired by default?

image

srid added 2 commits July 13, 2024 14:18
On a multi-crate workspace, disable autowiring of crates by default. Let the user wire the individual crates manually. Otherwise, they will be forced to configure each crate to build in Nix separately (via specifying `buildInputs`) which is quite unnecessary if only a handful of crates need to be exposed in the flake.
@srid srid merged commit f6ffda1 into main Jul 13, 2024
3 checks passed
@srid srid deleted the autoWire branch July 13, 2024 18:37
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.

1 participant