6

My Xcode project has six different targets/schemes (I've never been clear on the difference, but in any case I have six targets and six schemes), all based on the same sources in different ways. I just started using Xcode 14.1 (from a substantially older version), and now when I do a build it builds all of my targets/schemes and shows issues for them all on the left:

enter image description here

This is not what I want. For one thing, since the targets/schemes are all based on the same sources I'm seeing a lot of the same issues repeated over and over. For another thing, when I'm working on a particular target/scheme I really want to focus on that and not be distracted. Also, I don't really want my machine to be slowed down by building all those other targets/schemes; I want my build turnaround to be as fast as possible.

So. How I do get back the old behavior of Xcode that I'm used to, of building just the currently selected scheme and its associated target? I'm looked in the preferences and "behaviors", and googled, and maybe I'm blind but I can't see any mention of this anywhere.

[ADDENDUM, pursuant to the comments from Matt. It continues to happen, now with errors rather than warnings, and unrelated to deprecation. Here's a new screenshot:

enter image description here

I made a change in a header that broke usage in various places in the project. Now my issues pane is filled with crap from other targets – mostly the SAME crap, repeated for each target. Particularly annoyingly, the target I have selected and am working on, called slim_multi, doesn't even come first in the issues pane – it's down at the bottom, after all of the other targets I'm NOT working on. I tried switching to other targets and doing "Clean Build Folder"; that made no difference to the situation. There must be a fix for this!]

15
  • @matt Nope, definitely not. Each is an independent target. And if there were a dependency between targets, that would have caused previous versions of Xcode to build the dependencies too. This is an Xcode UI issue. If I start a build, the selected scheme/target builds and completes, and then issues from the other schemes/targets start getting added to the issues list (as in the screenshot above) as their respective builds finish.
    – bhaller
    Commented Dec 25, 2022 at 19:46
  • @matt The project lives on GitHub here: github.com/MesserLab/SLiM. It was created in maybe Xcode 12.2 or so, I think, so it is not super old, but not a fresh 14.1 project. It'd be pretty surprising (to me at least) if a behavior like this depended on the age of the project, though. Anyhow, I fixed the various build issues so it builds pretty cleanly now. I tried adding a #warning to eidos_rng.h (included by all targets), and interestingly the behavior did not reproduce with that. I wonder if it happens particularly with deprecation warnings, or something? Now I'm puzzled.
    – bhaller
    Commented Dec 26, 2022 at 5:09
  • 1
    @matt See the addendum I just added on the question. The problem is not going away, not limited to warnings (errors too), not limited to deprecation. Ack!
    – bhaller
    Commented Dec 26, 2022 at 17:57
  • 1
    @Rob perhaps, but if I turn off "Show live issues" in Xcode's General prefs, the behavior doesn't change; and if I start a new build, all of the issues disappear and then reappear in the Issue navigator (indicating that they are connected to building, in some way). Previous versions of Xcode certainly had the real-time syntax checking, but did not exhibit this very annoying behavior (which totally wedges my machine because it's spending so much CPU on all the different schemes in my project). Do you have a way to turn this behavior off?
    – bhaller
    Commented Feb 6, 2023 at 21:23
  • 1
    @nurider - no, it remains an open problem, and continues to drive me crazy. Thanks for the reminder, though – I'm going to file a bug about it.
    – bhaller
    Commented Nov 30, 2023 at 17:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.