Example of 'ERROR: Internal precondition failure' raised when generating a project containing a target with more than one dynamically generated localizable resources #2903
You can consistently reproduce the Internal precondition failure on this PR branch by running:
cd examples/integration/iOSApp && bazel run //:xcodeproj-incremental-bazel-sim_arm64
Example error output:
ERROR: Internal precondition failure:
tools/generators/lib/PBXProj/src/ConsumeArgs.swift:168: "/Users/<username>/Developer/rules_xcodeproj/examples/integration/iOSApp/bazel-output-base/rules_xcodeproj.noindex/build_output_base/execroot/_main/bazel-out/darwin_arm64-dbg/bin/external/rules_xcodeproj~override~internal~rules_xcodeproj_generated/generator/xcodeproj-incremental-bazel-sim_arm64/xcodeproj-incremental-bazel-sim_arm64_pbxproj_partials/target_arguments_files/3": Failed to parse "iOSApp/Source/es.lproj/unprocessed.json" as Int.Type for <folder-resources-count>
Please file a bug report at https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md
Hypothesis:
This error is apparently caused by generating more than one localizable resource file within a containing folder
When only a single localizable resource is generated in the example rule implementation, project generation succeeds as expected
You can consistently reproduce the
Internal precondition failure
on this PR branch by running:cd examples/integration/iOSApp && bazel run //:xcodeproj-incremental-bazel-sim_arm64
Example error output:
Hypothesis: