Skip to content

Bug: Exception during building rules_ios in ./examples #3188

@jeffhodsdon

Description

@jeffhodsdon

Description

Hello! Thank you everyone involved in this project, you are amazing!

I am trying to build the ./examples/rules_ios project, but getting an internal exception. Running on macOS 15.5 (24F74) Looking for any help or if this issue looks to be on my end.

Error —

ERROR: /Users/j/git/rules_xcodeproj/examples/rules_ios/iOSApp/Test/UITests/BUILD:37:22: in dep_middleman rule //iOSApp/Test/UITests:iOSAppUITestSuite.dep_middleman:
Traceback (most recent call last):
	File "/Users/j/git/rules_xcodeproj/examples/rules_ios/bazel-output-base/rules_xcodeproj.noindex/build_output_base/external/rules_ios+/rules/internal/framework_middleman.bzl", line 267, column 73, in _dep_middleman
		objc_provider_fields = objc_provider_utils.merge_objc_providers_dict(providers = objc_providers, merge_keys = [
	File "/Users/j/git/rules_xcodeproj/examples/rules_ios/bazel-output-base/rules_xcodeproj.noindex/build_output_base/external/rules_ios+/rules/internal/objc_provider_utils.bzl", line 28, column 34, in _merge_objc_providers_dict
		transitive = [getattr(provider, key) for provider in providers],
Error in getattr: 'ObjcInfo' value has no field or method 'force_load_library'

Full output —

[rules_ios] > bazel run //:xcodeproj-incremental
Building expanded release.tar.gz
INFO: Analyzed target //distribution:release_expanded_release (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //distribution:release_expanded_release up-to-date:
  /Users/j/git/rules_xcodeproj/examples/rules_ios/bazel-output-base/release_archive/execroot/_main/bazel-out/darwin_arm64-opt-ST-f7c40a6352be/bin/distribution/expanded_release
INFO: Elapsed time: 0.078s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action

Executing bazel command
WARNING: For repository 'build_bazel_rules_swift', the root module requires module version [email protected], but got [email protected] in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
INFO: Analyzed target //:xcodeproj-incremental (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //:xcodeproj-incremental up-to-date:
  /Users/j/git/rules_xcodeproj/examples/rules_ios/bazel-output-base/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/xcodeproj-incremental-runner.sh
INFO: Elapsed time: 0.094s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: /Users/j/git/rules_xcodeproj/examples/rules_ios/bazel-output-base/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/xcodeproj-incremental-runner.sh

Generating "rules_ios.xcodeproj"
WARNING: Option 'experimental_action_cache_store_output_metadata' is deprecated: Use --action_cache_store_output_metadata instead
WARNING: Option 'experimental_action_cache_store_output_metadata' is deprecated: Use --action_cache_store_output_metadata instead
ERROR: /Users/j/git/rules_xcodeproj/examples/rules_ios/iOSApp/Test/UITests/BUILD:37:22: in dep_middleman rule //iOSApp/Test/UITests:iOSAppUITestSuite.dep_middleman:
Traceback (most recent call last):
	File "/Users/j/git/rules_xcodeproj/examples/rules_ios/bazel-output-base/rules_xcodeproj.noindex/build_output_base/external/rules_ios+/rules/internal/framework_middleman.bzl", line 267, column 73, in _dep_middleman
		objc_provider_fields = objc_provider_utils.merge_objc_providers_dict(providers = objc_providers, merge_keys = [
	File "/Users/j/git/rules_xcodeproj/examples/rules_ios/bazel-output-base/rules_xcodeproj.noindex/build_output_base/external/rules_ios+/rules/internal/objc_provider_utils.bzl", line 28, column 34, in _merge_objc_providers_dict
		transitive = [getattr(provider, key) for provider in providers],
Error in getattr: 'ObjcInfo' value has no field or method 'force_load_library'
Available attributes: direct_module_maps, direct_sources, j2objc_library, module_map, source, strict_include, umbrella_header
ERROR: /Users/j/git/rules_xcodeproj/examples/rules_ios/iOSApp/Test/UITests/BUILD:37:22: Analysis of target '//iOSApp/Test/UITests:iOSAppUITestSuite.dep_middleman' failed
ERROR: Analysis of target '@@rules_xcodeproj++internal+rules_xcodeproj_generated//generator/xcodeproj-incremental:xcodeproj-incremental' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.209s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target
[rules_ios] > pwd
/Users/j/git/rules_xcodeproj/examples/rules_ios
[rules_ios] >

Reproduction steps

  • Check out the project
  • Ensure on xcode version 16.0 e.g. xcodes select 16.0
  • Run bazel run //:xcodeproj-incremental

Expected behavior

Project to be built

rules_xcodeproj version

defined in repo

Xcode version

16.0

Bazel version

defined in repo

rules_apple version

defined in repo

rules_swift version

defined in repo

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions