-
Notifications
You must be signed in to change notification settings - Fork 5
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
Preliminary bzlmod support #60
Conversation
46c33d6
to
2eb02d8
Compare
This enables renaming the module to gazelle_cabal.
On for GHC version 9.4.5 and only for the example test for now. The alternative-deps tests and the root module are not yet ready to be tested with bzlmod enabled.
This will require an update of the required CI checks on GitHub. |
use_repo(stack_snapshot, "stackage") | ||
stack_snapshot.package(name = "directory") | ||
stack_snapshot.package(name = "filepath") | ||
stack_snapshot.package(name = "json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's nicer 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@Mergifyio rebase |
🛑 Unable to rebase the branch because the pull request is queuedIt's not possible to rebase this pull request because it is queued for merge |
This configures the
gazelle_cabal
workspace to be compatible with bzlmod as a dependency module. Meaning another module can depend on it via bzlmod, howevergazelle_cabal
cannot itself be tested or built with bzlmod enabled, yet.This also configures the
example
workspace to be compatible with bzlmod as a root module. Meaning the example can be built and tested with bzlmod enabled.Enables bzlmod tests on CI, for now only for GHC version 9.4.5.
limitations / future work
tests
are not built with bzlmod, yet.The
alternative-deps
test requires renaming the stack snapshot workspace names tostackage-b
andstackage-b-exe
. This is currently not possible. One path would be aname
attribute tostack_snapshot
. However, this is not desirable as discussed in Allow using multiple stack snapshots in a MODULE.bazel rules_haskell#1962. Another approach is to use isolated extensions (requires Bazel 6.3) and remapping onuse_repo
. But,use_repo
uses keyword argument syntax for the remapping target, andstackage-b
orstackage-b-exe
do (AFAIK) not form valid identifiers in Starlark.The version number is factored out into a variable. A simple future improvement would be to simply change that variable in place in the CI pipeline to test other versions.
update-repos
does assume aWORKSPACE
setup.closes #63 #66