-
Notifications
You must be signed in to change notification settings - Fork 83
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
Split rules_nixpkgs into separate components #182
Labels
Comments
cbley-da
added a commit
to digital-asset/daml
that referenced
this issue
May 6, 2022
Since [rules_nixpkgs#191] has been merged, we can drop the haskell-arm-m1.patch from rules_nixpkgs. Also, rules_nixpkgs has been split into several components which need to be added explicitly in `deps.bzl`, see [#182]. [#191]: tweag/rules_nixpkgs#191 [#182]: tweag/rules_nixpkgs#182
7 tasks
cbley-da
added a commit
to digital-asset/daml
that referenced
this issue
May 6, 2022
Since [rules_nixpkgs#191] has been merged, we can drop the `rules-nixpkgs-arm.patch` from rules_nixpkgs. Also, rules_nixpkgs has been split into several components which need to be added explicitly in `deps.bzl`, see [#182]. [#191]: tweag/rules_nixpkgs#191 [#182]: tweag/rules_nixpkgs#182
cbley-da
added a commit
to digital-asset/daml
that referenced
this issue
May 10, 2022
…3798) * Update `rules_nixpgks` to HEAD Since [rules_nixpkgs#191] has been merged, we can drop the `rules-nixpkgs-arm.patch` from rules_nixpkgs. Also, rules_nixpkgs has been split into several components which need to be added explicitly in `deps.bzl`, see [#182]. [#191]: tweag/rules_nixpkgs#191 [#182]: tweag/rules_nixpkgs#182 * Adapt `compatibility/deps.bzl` * Update platforms repository to version 0.0.4 It has been updated in rules_nixpkgs, so this just follows suite. * Pass through `isClang` attribute for the cc-toolchain In rules_nixpkgs, this attribute is now used to determine whether the compiler is clang, see [#216]. [#216]: tweag/rules_nixpkgs#216 CHANGELOG_BEGIN CHANGELOG_END
14 tasks
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requirement of #181
Is your feature request related to a problem? Please describe.
The new bzlmod dependency management requires rule sets to declare all their direct dependencies upfront.
rules_nixpkgs
is in the situation that it depends on many other rule sets. In principle, it could depend on every Bazel extension that provides a compiler toolchain likerules_cc
,rules_go
,rules_python
, etc.Before bzlmod this was not a problem, because dependencies were lazy - in the sense that e.g.
nixpkgs_go_configure
depends onrules_go
, but a user only needs to worry about that dependency when they actually load@io_tweag_rules_nixpkgs//nixpkgs:toolchains/go.bzl
.With
bzlmod
all these dependencies need to be declared upfront in theMODULE.bazel
file with version constraints. Meaning,rules_nixpkgs
, as is, would introduce a large set of transitive dependencies for any of its users.This is problematic as it could unnecessarily inflate the set of transitive dependencies of a project using
rules_nixpkgs
and expose users to version conflicts in transitive dependencies that they don't even want to use. It's also problematic as it would block modularization ofrules_nixpkgs
until all of its dependencies have been successfully modularized.Describe the solution you'd like
The issue can be avoided by splitting
rules_nixpkgs
into separate Bazel modules, one for every language integration.This could take the following form:
rules_nixpkgs_core
:Defines
nixpkgs_git_repository
,nixpkgs_local_repository
, andnixpkgs_package
;and exposes other common functionality.
rules_nixpkgs_cc
:Defines
nixpkgs_cc_configure
, etc.rules_nixpkgs_java
:Defines
nixpkgs_java_configure
.rules_nixpkgs
that re-exposes all these components for compatibility with the legacy non-bzlmod workflow.Note, the intent is not to create separate Git repositories for all these components - this should not be necessary. It should still be possible to maintain all these components within the same Git repository.
The text was updated successfully, but these errors were encountered: