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

Refactor --config setup #1301

Merged
merged 1 commit into from
Apr 21, 2020
Merged

Refactor --config setup #1301

merged 1 commit into from
Apr 21, 2020

Conversation

aherrmann
Copy link
Member

rules_haskell requires different build configuration depending on the platform (Linux, MacOS, Windows) and the way of fetching the GHC distribution (nixpkgs, bindist). This PR makes sure that all this configuration is defined in .bazelrc and is easily accessible for developers through a top-level configuration, e.g. --config linux-nixpkgs. This avoids configuration issues as described in #1173 (comment).

Additionally, CI is configured by writing the required --config flags to .bazelrc.local instead of passing them on the command-line on each bazel invocation. This makes sure that the same configuration is used even if Bazel is called indirectly through a script. This is useful for tools like ghcide and hie-bios, see #1262.

@aherrmann aherrmann requested review from mboes and Profpatsch April 17, 2020 14:35
Copy link
Member

@mboes mboes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good cleanup.

@mboes mboes added the merge-queue merge on green CI label Apr 21, 2020
Define top-level configurations for the user to specify, e.g. `--config
linux-nixpkgs`. These will then define the required flags for that
platform/toolchain combination.

Configure CI by writing `--config` flags to `.bazelrc.local` instead of
passing them on the command-line. This makes sure that the same
configuration is used even if Bazel is called indirectly through a
script. This is useful for tools like `ghcide` and `hie-bios`.
@mergify mergify bot merged commit c06136b into master Apr 21, 2020
@mergify mergify bot deleted the bazelrc branch April 21, 2020 21:52
@mergify mergify bot removed the merge-queue merge on green CI label Apr 21, 2020
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.

2 participants