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

Actually run in bzlmod mode on CI #2005

Merged
merged 9 commits into from
Nov 3, 2023
Merged

Actually run in bzlmod mode on CI #2005

merged 9 commits into from
Nov 3, 2023

Conversation

avdv
Copy link
Member

@avdv avdv commented Nov 1, 2023

I have noticed that we actually never ran rules_haskell_test in bzlmod mode on CI.

This was due to a missing space character in the inline bash script of the workflow.yml file which would always yield false.

Additionally, we need to ensure that we can actually override Bazel settings using .bazelrc.local file which we are using on CI.

Note, this PR disables CI jobs for GHC 9.4 with bzlmod for now. The reason is that we would need to find a way to read a different stack_snapshot and json file depending on the GHC version. This is tracked here: #2006

For Windows, we need to work around a path problem passing when file:%workspace%/registry which is expanded to an invalid file: URI without a path component. See bazelbuild/bazel#20015

@avdv avdv force-pushed the ci-fix-bzlmod branch 3 times, most recently from 58140e2 to d88910a Compare November 1, 2023 13:39
The `%workspace%` placeholder is simply expanded to a windows path like `c:/my/project`.

The resulting URI looks like this: `file:c:/my/project`. This is not a valid file URI and
the `URI.getPath()` method returns `null` which leads to a NPE in Bazel.

Using a triple slash works around this problem, although the path starts with a doubled slash
on unix systems now.
This should be the last file imported, so that the user is able to override any
settings before.
The jobs are currently failing since we are not using GHC version specific snapshots and json files.
Otherwise Bazel would detect the Visual Studio compiler and use it.
@avdv avdv force-pushed the ci-fix-bzlmod branch 2 times, most recently from 6997489 to 6cc9e57 Compare November 3, 2023 10:30
@avdv avdv marked this pull request as ready for review November 3, 2023 12:52
@avdv avdv requested a review from aherrmann November 3, 2023 12:52
Copy link
Member

@aherrmann aherrmann left a comment

Choose a reason for hiding this comment

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

Thank you!

@avdv avdv added the merge-queue merge on green CI label Nov 3, 2023
@mergify mergify bot merged commit 0b9edf8 into master Nov 3, 2023
41 checks passed
@mergify mergify bot deleted the ci-fix-bzlmod branch November 3, 2023 18:30
@mergify mergify bot removed the merge-queue merge on green CI label Nov 3, 2023
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