Skip to content

Commit

Permalink
Remove support for xcodeproj rules (bazel-ios#883)
Browse files Browse the repository at this point in the history
This PR removes the xcodeproj rules and related code and tests. These
have been marked legacy for over a year and are no longer being
maintained.

To simplify the codebase and contributing we are removing these rules
and recommending folks to use rules_xcodeproj.
  • Loading branch information
luispadron authored Jul 10, 2024
1 parent 28d97a9 commit 0a5d081
Show file tree
Hide file tree
Showing 235 changed files with 3 additions and 23,302 deletions.
5 changes: 2 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ common --enable_bzlmod
# Spawn strategy required for some tests
build --spawn_strategy=standalone

# Setup Xcode configuration for xcodeproj tests
# Setup Xcode configuration.
build --xcode_version_config=//:host_xcodes

build --experimental_strict_conflict_checks

build --verbose_failures # Print the full command line for commands that failed
build --test_output=errors # Prints log file output to the console on failure

# Enable dbg compilation mode in this repo, so we can test xcodeproj-built
# binaries contain debug symbol tables.
# Enable dbg compilation mode in this repo.
build --compilation_mode=dbg

# Use 'worker' strategy for swift compilation
Expand Down
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,57 +132,6 @@ jobs:
name: bazel-testlogs
path: bazel-testlogs

xcodeproj_tests:
name: Legacy xcodeproj tests (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
runs-on: macos-14
strategy:
fail-fast: false
matrix:
bazel_version: [6.5.0] # Only test on a single Bazel version as fixtures require updates across Bazel verisons
xcode_version: [15.2]
env:
XCODE_VERSION: ${{ matrix.xcode_version }}
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
steps:
- uses: actions/checkout@v4
- name: Preflight Env
run: .github/workflows/preflight_env.sh --no-bzlmod
- name: Run tests
run: ./tests/xcodeproj-tests.sh --run && ./tests/test-tests.sh
- uses: actions/upload-artifact@v4
if: failure()
with:
name: bazel-testlogs
path: bazel-testlogs

lldb_ios_tests_xcode:
name: LLDB tests (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
runs-on: macos-14
strategy:
fail-fast: false
matrix:
bazel_version: [6.5.0, 7.1.0]
xcode_version: [15.2]
env:
XCODE_VERSION: ${{ matrix.xcode_version }}
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
steps:
- uses: actions/checkout@v4
- name: Preflight Env
run: .github/workflows/preflight_env.sh
- name: Run tests
run: |
bazelisk test \
--config=ios_lldb_test \
-- \
tests/ios/lldb/app:objc_app_po_test \
tests/ios/lldb/app:objc_app_variable_test
- uses: actions/upload-artifact@v4
if: failure()
with:
name: bazel-testlogs
path: bazel-testlogs

multi_arch_support:
# i386 was removed on rules_apple 3.x.x - this test case needs reworking
# to exemplify fat binaries on the latest version
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/MODULE.bazel.lock
bazel-*
.idea
tests/macos/xcodeproj/**/xcuserdata
tests/ios/xcodeproj/**/xcuserdata
**/*.xcodeproj/bazelinstallers/index-import
/tests/ios/Index/
/tests/macos/Index/
/tests/index-import.pid
Expand Down
1 change: 0 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ non_module_deps = use_extension("//rules:module_extensions.bzl", "non_module_dep
use_repo(
non_module_deps,
"arm64-to-sim",
"com_github_yonaskolb_xcodegen",
"tart",
)

Expand Down
18 changes: 1 addition & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,7 @@ ios_application(

### Xcode project generation

There are currently two options to generate Xcode projects that build with Bazel.

`rules_ios` has its own project generator that is considered stable and ready to be used in production. Here's a minimal example of how to load it in your `BUILD` file:

```python
load("@build_bazel_rules_ios//rules:xcodeproj.bzl", "xcodeproj")

xcodeproj(
name = "MyXcode",
bazel_path = "bazelisk",
deps = [ ":iOS-App"]
)
```

Checkout [legacy_xcodeproj.bzl](https://github.com/bazel-ios/rules_ios/blob/master/rules/legacy_xcodeproj.bzl) for available attributes.

Alternatively, [rules_xcodeproj](https://github.com/MobileNativeFoundation/rules_xcodeproj) is another great generator and we're working with them to better integrate it with `rules_ios`. Checkout [examples/rules_ios](https://github.com/MobileNativeFoundation/rules_xcodeproj/tree/main/examples/rules_ios) for examples of how to use it with `rules_ios`.
See [rules_xcodeproj](https://github.com/MobileNativeFoundation/rules_xcodeproj).

### Frameworks

Expand Down
140 changes: 0 additions & 140 deletions docs/index_while_building.md

This file was deleted.

Loading

0 comments on commit 0a5d081

Please sign in to comment.