Skip to content

Migrate rules_scala to bzlmod, delete WORKSPACE #317

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

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

mbland
Copy link
Contributor

@mbland mbland commented May 20, 2024

The new comments in MODULE.bazel and the comments included in the rules_scala patch contain all the details behind this change.

The new comments in MODULE.bazel and the comments included in the
rules_scala patch contain all the details behind this change.
@mbland mbland self-assigned this May 20, 2024
Copy link
Contributor

@jayconrod jayconrod left a comment

Choose a reason for hiding this comment

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

Quite a workaround. Unfortunate there hasn't been much movement upstream.

@mbland mbland merged commit 9047c27 into main May 20, 2024
@mbland mbland deleted the bzlmod-rules-scala branch May 20, 2024 19:08
mbland added a commit that referenced this pull request Jul 9, 2024
Also removes extra whitespace and blank lines from README.md.

I inadvertently broke Swift builds and tests in #317 because I added a
`bazel_dep()` for `rules_cc` _before_ the one for `apple_support`. This
restores the proper order.

FWIW, building or testing `//swift:tests` remotely still doesn't seem to
work. It hangs on `--config=remote_macos_x64`, and fails on
`--config=remote_linux_x64` with:

```txt
ERROR: .../external/rules_swift~~non_module_deps~build_bazel_rules_swift_local_config/BUILD:9:22:
  in xcode_swift_toolchain rule
  @@rules_swift~~non_module_deps~build_bazel_rules_swift_local_config//:toolchain:

Traceback (most recent call last):
  File ".../external/rules_swift~/swift/internal/xcode_swift_toolchain.bzl",
    line 641, column 21, in _xcode_swift_toolchain_impl
      env = _xcode_env(target_triple = target_triple, xcode_config = xcode_config)
  File ".../external/rules_swift~/swift/internal/xcode_swift_toolchain.bzl",
    line 539, column 34, in _xcode_env
      _bazel_apple_platform(target_triple),
  File ".../external/rules_swift~/swift/internal/xcode_swift_toolchain.bzl",
    line 101, column 34, in _bazel_apple_platform
      return _TRIPLE_OS_TO_PLATFORM[(
Error: key ("linux", "gnu") not found in dictionary

ERROR: .../external/rules_swift~~non_module_deps~build_bazel_rules_swift_local_config/BUILD:9:22:
Analysis of target '@@rules_swift~~non_module_deps~build_bazel_rules_swift_local_config//:toolchain' failed
```
mbland added a commit that referenced this pull request Jul 9, 2024
Also removes extra whitespace and blank lines from README.md.

I inadvertently broke Swift builds and tests in #317 because I added a
`bazel_dep()` for `rules_cc` _before_ the one for `apple_support`. This
restores the proper order.

FWIW, building or testing `//swift:tests` remotely still doesn't seem to
work. It hangs on `--config=remote_macos_x64`, and fails on
`--config=remote_linux_x64` with:

```txt
ERROR: .../external/rules_swift~~non_module_deps~build_bazel_rules_swift_local_config/BUILD:9:22:
  in xcode_swift_toolchain rule
  @@rules_swift~~non_module_deps~build_bazel_rules_swift_local_config//:toolchain:

Traceback (most recent call last):
  File ".../external/rules_swift~/swift/internal/xcode_swift_toolchain.bzl",
    line 641, column 21, in _xcode_swift_toolchain_impl
      env = _xcode_env(target_triple = target_triple, xcode_config = xcode_config)
  File ".../external/rules_swift~/swift/internal/xcode_swift_toolchain.bzl",
    line 539, column 34, in _xcode_env
      _bazel_apple_platform(target_triple),
  File ".../external/rules_swift~/swift/internal/xcode_swift_toolchain.bzl",
    line 101, column 34, in _bazel_apple_platform
      return _TRIPLE_OS_TO_PLATFORM[(
Error: key ("linux", "gnu") not found in dictionary

ERROR: .../external/rules_swift~~non_module_deps~build_bazel_rules_swift_local_config/BUILD:9:22:
Analysis of target '@@rules_swift~~non_module_deps~build_bazel_rules_swift_local_config//:toolchain' failed
```
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