Closed thiagohmcruz closed 2 years ago
See https://github.com/jerrymarino/xcbuildkit/pull/43
This was just an exercise to show that this is possible, the PR above implements the bulk of the logic for this.
Cool SGTM - @thiagohmcruz ! Yeah it seems like we're going a slightly different approach on this 👍
Experiment
Small experiment to illustrate how we could potentially symlink indexing related files to
bazel-out
in such a way that Xcode continues to work. To repro the state below checkout this branch and follow these steps:rm -fr ~/Library/Developer/Xcode/DerivedData
make enable_indexing
iOSApp/iOSApp.xcodeproj
and build theCLI
target (on M1 make sure you selected the(Rosetta)
scheme for this experiment)(1)
in the screenshot):(2)
in the screenshot), saymv path/to/main.o ~/Desktop/.
(3)
in the screenshot):ln -s ~/Desktop/main.o main.o
(4)
in the screenshot):In Xcode without triggering a new build that would override the symlink above edit
iOSApp/CLI/main.m
, say change the value of that string or allocate a new var and note that SK doesn't get into any kind of weird state (saw crashes / infinite loops in the past while testing this) and that messages involvingmain.o
continue to be interpreted the same way:Thoughts
With that I'm still trying to find the right way to interpret these results:
rules_ios
)?main.o
than the ones generated in this experiment. Meaning that we're probably not passing all the same messages yet (although apparently this is enough for Xcode to do its thing and not crash).