Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ to guide contributors with an implementation through discussions if needed.

You can test your changes in the example projects by generating their
projects with `bazel run //examples/cc:xcodeproj`. You might need to `cd`
into the directory if the example app is in a separate `WORKSPACE` with
into the directory if the example app is in a separate `MODULE.bazel` with
`cd examples/integration; bazel run //:xcodeproj`.

You can run the internal tests as well:
Expand Down
32 changes: 11 additions & 21 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ bazel_dep(
version = "2.2.0",
repo_name = "build_bazel_apple_support",
)
bazel_dep(name = "bazel_features", version = "1.36.0")
bazel_dep(name = "bazel_features", version = "1.42.1")
Comment thread
aaronsky marked this conversation as resolved.
bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "rules_cc", version = "0.2.17")
bazel_dep(
Expand All @@ -26,12 +26,15 @@ bazel_dep(
)
bazel_dep(name = "rules_python", version = "1.7.0")

internal = use_extension("//xcodeproj:extensions.bzl", "internal")
use_repo(internal, "rules_xcodeproj_generated")

non_module_deps = use_extension("//xcodeproj:extensions.bzl", "non_module_deps")
repos = use_extension("//xcodeproj:extensions.bzl", "rules_repos")
use_repo(
non_module_deps,
repos,
"com_github_apple_swift_argument_parser",
"com_github_apple_swift_collections",
"com_github_michaeleisel_jjliso8601dateformatter",
"com_github_michaeleisel_zippyjson",
"com_github_michaeleisel_zippyjsoncfamily",
"rules_xcodeproj_generated",
"rules_xcodeproj_index_import",
"rules_xcodeproj_legacy_index_import",
)
Expand Down Expand Up @@ -67,22 +70,9 @@ apple_cc_configure = use_extension(
)
use_repo(apple_cc_configure, "local_config_apple_cc")

dev_repos = use_extension("//xcodeproj:extensions.bzl", "rules_dev_repos", dev_dependency = True)
use_repo(
non_module_deps,
"com_github_apple_swift_argument_parser",
"com_github_apple_swift_collections",
"com_github_michaeleisel_jjliso8601dateformatter",
"com_github_michaeleisel_zippyjson",
"com_github_michaeleisel_zippyjsoncfamily",
)

dev_non_module_deps = use_extension(
"//xcodeproj:dev_extensions.bzl",
"dev_non_module_deps",
dev_dependency = True,
)
use_repo(
dev_non_module_deps,
dev_repos,
"com_github_pointfreeco_swift_custom_dump",
"com_github_pointfreeco_xctest_dynamic_overlay",
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ ones we’ve officially tested with.

From the
[release you wish to use](https://github.com/MobileNativeFoundation/rules_xcodeproj/releases),
copy the Bzlmod or WORKSPACE snippet into your repository.
copy the Bzlmod snippet into your repository.
If you want to manually build a release archive, you can use this command:
`bazel build //distribution:release`.

Expand Down
Empty file removed WORKSPACE.bzlmod
Empty file.
6 changes: 1 addition & 5 deletions buildbuddy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ x_templates:
- &arm64
arch: "arm64"

- &bazel_in_repo_version
# No change, uses `.bazelversion`, just used to make it clear
- &bazel_in_repo_version # No change, uses `.bazelversion`, just used to make it clear
env: {}
- &bazel_previous_lts
env:
Expand Down Expand Up @@ -48,9 +47,6 @@ x_templates:
- &generate_integration "--output_base=bazel-output-base run --config=workflows //:xcodeproj"
- &build_all "--output_base=bazel-output-base build --config=workflows //..."
- &test_all "--output_base=bazel-output-base test --config=workflows //..."
- &nobzlmod_build_all "--output_base=bazel-output-base build --config=workflows --config=nobzlmod //..."
- &nobzlmod_test_all "--output_base=bazel-output-base test --config=workflows --config=nobzlmod //..."
- &nobzlmod_generate_integration "--output_base=bazel-output-base run --config=workflows --config=nobzlmod //:xcodeproj"

actions:
- name: Buildifier Lint
Expand Down
2 changes: 1 addition & 1 deletion distribution/expanded_pkg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def _impl(ctx):
set -euo pipefail

tar -xf "$1" -C "$2"
touch "$2/WORKSPACE"
touch "$2/MODULE.bazel"
""",
)

Expand Down
63 changes: 5 additions & 58 deletions distribution/release_notes_template.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,12 @@
## What’s Changed

* [User facing changelog](https://github.com/MobileNativeFoundation/rules_xcodeproj/blob/main/CHANGELOG.md#%CURRENT_TAG%)
* Full changelog: https://github.com/MobileNativeFoundation/rules_xcodeproj/compare/%PREVIOUS_TAG%...%CURRENT_TAG%

## Bzlmod Snippet
## `MODULE.bazel` Snippet

```starlark
bazel_dep(name = "rules_xcodeproj", version = "%CURRENT_TAG%")
```

`release.tar.gz`’s `integrity`: `%INTEGRITY%`

## Workspace Snippet

Please use the release asset (`release.tar.gz`) from your Bazel `WORKSPACE` instead of GitHub's source asset to reduce download size and improve reproducibility.

```starlark
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_xcodeproj",
integrity = "%INTEGRITY%",
url = "https://github.com/MobileNativeFoundation/rules_xcodeproj/releases/download/%CURRENT_TAG%/release.tar.gz",
)

load(
"@rules_xcodeproj//xcodeproj:repositories.bzl",
"xcodeproj_rules_dependencies",
)

xcodeproj_rules_dependencies()

load("@bazel_features//:deps.bzl", "bazel_features_deps")

bazel_features_deps()

load(
"@build_bazel_rules_apple//apple:repositories.bzl",
"apple_rules_dependencies",
)

apple_rules_dependencies()

load(
"@build_bazel_rules_swift//swift:repositories.bzl",
"swift_rules_dependencies",
)

swift_rules_dependencies()

load(
"@build_bazel_rules_swift//swift:extras.bzl",
"swift_rules_extra_dependencies",
)

swift_rules_extra_dependencies()
## What’s Changed

load(
"@build_bazel_apple_support//lib:repositories.bzl",
"apple_support_dependencies",
)
* [User facing changelog](https://github.com/MobileNativeFoundation/rules_xcodeproj/blob/main/CHANGELOG.md#%CURRENT_TAG%)
* Full changelog: https://github.com/MobileNativeFoundation/rules_xcodeproj/compare/%PREVIOUS_TAG%...%CURRENT_TAG%

apple_support_dependencies()
```
`release.tar.gz`’s `integrity`: `%INTEGRITY%`
3 changes: 0 additions & 3 deletions examples/integration/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import %workspace%/../../shared.bazelrc

build --experimental_cc_implementation_deps

# Until we fix our examples for Bazel 8
common --enable_workspace

# Exercise the extra flags feature

build:rules_xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags='--verbose_failures'
Expand Down
2 changes: 1 addition & 1 deletion examples/integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ string_flag(

# Example of xcodeproj cache warming
#
# 1. Register a single macOS execution platform in `WORKSPACE`:
# 1. Register a single macOS execution platform in `MODULE.bazel`:
#
# register_execution_platforms("@build_bazel_apple_support//platforms:macos_x86_64")
#
Expand Down
File renamed without changes.
Empty file.
86 changes: 0 additions & 86 deletions examples/integration/WORKSPACE

This file was deleted.

Empty file.
Empty file.
Empty file.
3 changes: 2 additions & 1 deletion examples/integration/repositories.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Module extension for loading dependencies not yet compatible with bzlmod."""

load("@bazel_skylib//lib:modules.bzl", "modules")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

def non_bzlmod_dependencies():
Expand Down Expand Up @@ -92,4 +93,4 @@ objc_library(
url = "https://github.com/nicklockwood/FXPageControl/archive/refs/tags/1.5.tar.gz",
)

non_module_deps = module_extension(implementation = lambda _: non_bzlmod_dependencies())
non_module_deps = modules.as_extension(non_bzlmod_dependencies)
6 changes: 0 additions & 6 deletions examples/sanitizers/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Import parent workspace settings
import %workspace%/../../shared.bazelrc

# Until bzlmod is supported in this example
common --enable_workspace

# This example doesn't support bzlmod yet
build --noexperimental_enable_bzlmod

# Use a user.bazelrc if it exists
try-import %workspace%/user.bazelrc
23 changes: 23 additions & 0 deletions examples/sanitizers/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
bazel_dep(
name = "rules_xcodeproj",
# Set to the real version with `--override_module`
version = "0.0.0",
)
bazel_dep(
name = "apple_support",
version = "2.2.0",
repo_name = "build_bazel_apple_support",
)
bazel_dep(name = "rules_cc", version = "0.2.17")
bazel_dep(
name = "rules_apple",
version = "4.4.0",
repo_name = "build_bazel_rules_apple",
)
bazel_dep(
name = "rules_swift",
version = "3.5.0",
repo_name = "build_bazel_rules_swift",
)

bazel_dep(name = "bazel_features", version = "1.36.0", dev_dependency = True)
43 changes: 0 additions & 43 deletions examples/sanitizers/WORKSPACE

This file was deleted.

3 changes: 0 additions & 3 deletions shared.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ test --remote_download_outputs=toplevel
# rules_xcodeproj needs toplevel to download needed outputs
build:rules_xcodeproj --remote_download_outputs=toplevel

common:nobzlmod --noexperimental_enable_bzlmod
common:nobzlmod --@rules_xcodeproj//xcodeproj:extra_common_flags='--config=nobzlmod'

# Build with --config=cache to use BuildBuddy Remote Cache
build:cache --bes_backend=grpcs://remote.buildbuddy.io
build:cache --bes_results_url=https://app.buildbuddy.io/invocation/
Expand Down
1 change: 0 additions & 1 deletion xcodeproj/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ filegroup(
["**"],
exclude = [
"**/.*",
"dev_extensions.bzl",
"repositories.bzl",
],
) + [
Expand Down
8 changes: 0 additions & 8 deletions xcodeproj/dev_extensions.bzl

This file was deleted.

Loading
Loading