Skip to content

Migrate to Bzlmod#29

Merged
jadenPete merged 7 commits intomasterfrom
migrate-to-bzlmod
Feb 28, 2025
Merged

Migrate to Bzlmod#29
jadenPete merged 7 commits intomasterfrom
migrate-to-bzlmod

Conversation

@jadenPete
Copy link
Contributor

No description provided.

@jadenPete jadenPete requested a review from jjudd January 22, 2025 23:31
@jadenPete jadenPete self-assigned this Jan 22, 2025
@jadenPete
Copy link
Contributor Author

Squashed.

@jadenPete
Copy link
Contributor Author

Squashed.

@jadenPete
Copy link
Contributor Author

Squashed.


bazel build @rules_scala_annex//rules/scalafmt
scalafmtbin="bazel-bin/external/rules_scala_annex/rules/scalafmt/scalafmt-bin"
scalafmtbin="$(mktemp)"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this will work if the default temp directory (/tmp on linux) is mounted as noexec, which is fairly common.

Some possible workarounds:

  • If the script is a shell script, always invoke with bash instead of calling it directly
  • Write to a well-known path in the current directory
  • Use --tmpdir to mktemp to have it create the file in a directory that is more likely to allow execution, like the current directory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point; I hadn't thought of that. I like the first alternative you listed the most, since it doesn't leave the possibility of a lingering script in the working directory. I'll go with that.

strategy:
matrix:
os: [ubuntu-20.04]
bazel_version: [bazelbuild/5.4.1, bazelbuild/6.4.0]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to use the bazel-contrib/setup-bazel@0.8.5 step like we do in the other rule sets?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I'm surprised the builds pass without it. I'll add it.

matrix:
os: [ubuntu-20.04]
bazel_version: [bazelbuild/5.4.1, bazelbuild/6.4.0]
runs-on: ubuntu-20.04
Copy link
Contributor

Choose a reason for hiding this comment

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

While you're here could we bump this to 24.04? 20.04 is going away soon on GitHub actions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

MODULE.bazel Outdated
"org.scala-lang:scala-compiler:{}".format(scala_version),
"org.scala-lang:scala-library:{}".format(scala_version),
"org.scala-lang:scala-reflect:{}".format(scala_version),
"org.scala-sbt:compiler-bridge_2.13:1.9.5",
Copy link
Contributor

Choose a reason for hiding this comment

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

While we're here I think updating the compiler bridge to the latest Zinc version we're using in the other rule sets makes sense. 1.10.4

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea! I just upgraded it.

@jadenPete
Copy link
Contributor Author

Squashed.

@jadenPete jadenPete merged commit 135edf7 into master Feb 28, 2025
1 check passed
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.

4 participants