MobileNativeFoundation / rules_xcodeproj

Bazel rules for generating Xcode projects.
MIT License
520 stars 82 forks source link

[Incremental] Bug: generated xcodeproj diffs from incremental mode and legacy mode when given same focused targets #2834

Closed LLlkaiwen closed 8 months ago

LLlkaiwen commented 8 months ago

Description

xcodeproj generated in incremental mode:

image

xcodeproj generated in legacy mode:

image

Reproduction steps

  1. Add focused_targets image
  2. remove unneeded xcschemes
  3. run bazel run //tools:xcodeproj

Expected behavior

Should the target 'swift_debug_settings (Library)' be added ?

rules_xcodeproj version

1.14.2

Xcode version

15.0

Bazel version

7.0.0

rules_apple version

No response

rules_swift version

No response

Additional information

No response

brentleyjones commented 8 months ago

This isn't a bug, just a change in how focused_targets works in incremental generation mode. It's now taken literally, so if you want the files from the library target, it needs to be focused as well.

This change in behavior is needed to support some of the performance wins that incremental generation achieves. It's also less confusing (in the long run).

brentleyjones commented 8 months ago

Though, when you do add that library target the incremental generation will have an improved result over legacy: the target will be able to be merged with both the test and the tool. So it won't show in the target list like it does for legacy mode.