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

Internal GHC version selection exposed to users #1967

Closed
aherrmann opened this issue Sep 26, 2023 · 0 comments · Fixed by #1969
Closed

Internal GHC version selection exposed to users #1967

aherrmann opened this issue Sep 26, 2023 · 0 comments · Fixed by #1969
Assignees

Comments

@aherrmann
Copy link
Member

Describe the bug
The internal GHC version selection mechanism introduced in #1923 does affect down-stream use-sites.

To Reproduce
The bzlmod version of the Gazelle Cabal example test suite introduced in tweag/gazelle_cabal#60, shows the following message in its build log:

DEBUG: /home/runner/.cache/bazel/_bazel_runner/d4965fa66ed01d1aeec095f0355d1939/external/rules_haskell~override/haskell/private/ghc_ci.bzl:11:14: Using GHC version 9.4.5 from env variable `GHC_VERSION`

In this case the GHC toolchain is configured via Nix.

Expected behavior
I did not expect the GHC version selection logic used for rules_haskell's own CI to trigger in a use-site like the Gazelle Cabal example.

Environment

  • OS name + version: Ubuntu 22.04
  • Bazel version: 6.2.0
  • Version of the rules: 155ba21

Additional context
none

@avdv avdv self-assigned this Sep 27, 2023
avdv added a commit that referenced this issue Sep 28, 2023
module_ctx.modules only contains the modules that use the extension, if the
root module does not use it, the first module in that list is not the root module.

Fixes #1967
@mergify mergify bot closed this as completed in #1969 Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants