Although what the title says, the point of this thread is not say we should remove the option completely, but to open the discussion about developer experience with that building option and gather thoughts about the need for that to continue to be maintained and for we to document a new more stable option for people trying to work in the compiler with Xcode.
For context on why this is an important discussion is that given new comers to the project are often familiar with Xcode and that is the first option they try when first setting up things to build the compiler for the first time and start digging into the code. But given that
—xcode is not as stable as ninja build it is very common people hit all kinds of issues when trying out that option which for beginners it becomes a first barrier get a first contribution in. We can see that over the last few years lot of threads of this forums from people having issues with building the compiler with
—Xcode. Some examples:
- Problems with
build-scriptbuilding compiler with
- Build Error for
- CPPLib_log error when building with Xcode
- Clang: error: unknown argument: '-fswift-async-fp=always'
- ... there are more.
In my personal experience and also from talking to others as well, using the Xcode build was always unstable and often either some thing would make it not work anymore.
Even recently we could see some threads from people from the Swift Mentorship Program trying to build the compiler and hitting those issues on the Xcode build.
So with that said it is fair to state that the
--xcode build option doesn't offer a good developer experience, which is the goal we are aiming for.
And aiming for a better developer experience, recently Erik shared a way to use Xcode with ninja which seems to work pretty well and we actually have the stability of the ninja build and the nice IDE experience from Xcode. Which is the first option we have, and the idea would be documenting that in the started guides and remove mentions of the
--Xcode so that becomes the "recommended way" for people to use.
So we want to hear your thoughts about that!
- If that becomes the new recommended way for developers to use Xcode, would that option still be useful? There is a lot of code(including work arounds) in build script and cmake files to maintain this option so deprecate that option would be a clean up on that area.
- How many people actually rely on
--xcodebuild? And for people that rely on it, what is the aspect that you rely on that we can't achieve with using Xcode with ninja?
- What do you think would be the impact of deprecating or removing that option completely?
I think those are the most important questions I could remember, but feel free to raise more.
Before we wrap up, it is important to note that the goal of this discussion is not to say we should remove this flag, but to propose a new recommended way to use Xcode in development for new contributors that improves developer experience and if that makes
--xcode not useful anymore, and if that is the case if is still worth the work of maintaining it.
So the actual first action steps for now would be just update the GettingStarted Guides to not recommend that option anymore.
Let us know your thoughts and concerns about that topic.
With Best Regards,