Skip to content

Fix Workspace Debug Build on macOS 27 - #10890

Merged
i2h3 merged 2 commits into
masterfrom
i2h3/fix/build-on-macos-27
Sep 23, 2026
Merged

i2h3 merged 2 commits into
masterfrom
i2h3/fix/build-on-macos-27

Conversation

@i2h3

@i2h3 i2h3 commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Xcode 27 does some things differently. Realm fails to build. This only shows in the Xcode Workspace of the project when the client is built through that in debug configuration. This fixes it.

PS: Probably I used caveman mode of Claude too much. 😂

Checklist

AI (if applicable)

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@i2h3 i2h3 added this to the 35.0.0 milestone Sep 22, 2026
@i2h3 i2h3 self-assigned this Sep 22, 2026
@i2h3 i2h3 added bug os: 🍎 macOS Apple macOS, formerly also known as OS X dependencies Pull requests that update a dependency file labels Sep 22, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Sep 22, 2026
@i2h3 i2h3 changed the title Fix build on macOS 27 Fix Workspace debug build on macOS 27 Sep 22, 2026
@i2h3 i2h3 changed the title Fix Workspace debug build on macOS 27 Fix Workspace Debug Build on macOS 27 Sep 22, 2026
@i2h3

i2h3 commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable-34.0

@i2h3
i2h3 force-pushed the i2h3/fix/build-on-macos-27 branch from 287ddb7 to 3338635 Compare September 22, 2026 07:59

@claucambra claucambra left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good to me but I have concerns with Claude's (over)commenting

Comment thread shell_integration/MacOSX/CMakeLists.txt Outdated
Comment thread shell_integration/MacOSX/NextcloudIntegration/NextcloudDev/Craft.sh Outdated
@i2h3

i2h3 commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

Dismissal of this kind of knowledge is the foundation for frustration of both future maintainers and potential new contributors. Code which only works without explanation why and how is insufficient and offloads effort to contributors. I have been picking up the pieces of "the code is the documentation" often enough.

@claucambra

claucambra commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Dismissal of this kind of knowledge is the foundation for frustration of both future maintainers and potential new contributors. Code which only works without explanation why and how is insufficient and offloads effort to contributors. I have been picking up the pieces of "the code is the documentation" often enough.

@i2h3 At no point did I say that these comments should be eliminated. My point is that comments need to be carefully considered to take the reader into account. Comments, like code, increase cognitive load: one needs to understand them and then consider them in addition to the code they are attempting to clarify. Hence they should be as short and simple as possible.

It seems to me the comments in this PR are overly long, poorly structured, and opaque; they explain more about the debugging and development process the fix went through than the actual fix in place (which is typical of LLM-generated comments). I agree that the additions to the CMake files require context to understand. I just don't think it's delivered effectively in these comments

@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team Sep 22, 2026
The Xcode scheme drives the developer build through a legacy target with
passBuildSettingsInEnvironment, so the outer build exports its settings —
COMPILER_INDEX_STORE_ENABLE=Default among them — into Craft.sh and on down to
the xcodebuild invocations that build the Finder Sync and File Provider
extensions, which pick them up as setting overrides. INDEX_DATA_STORE_DIR is
not exported with them, and those invocations override SYMROOT without a
derived data path, so in Debug the index store is enabled with nowhere to
write and clang is handed a valueless -index-store-path. It swallows the
argument behind it, which for the Realm package is the include path carrying
realm-core's headers, and the extension fails to build on

    RLMUtil.hpp:23:9: fatal error: 'realm/array.hpp' file not found

Release builds never saw this: COMPILER_INDEX_STORE_ENABLE=Default leaves the
index store off there.

Pass COMPILER_INDEX_STORE_ENABLE=NO on the xcodebuild command lines, where it
outranks the inherited environment, and drop the index store variables in
Craft.sh so a build started from the scheme sees the same environment as one
started from a terminal.

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@i2h3
i2h3 force-pushed the i2h3/fix/build-on-macos-27 branch from 3338635 to d92cbd3 Compare September 22, 2026 12:57
@i2h3
i2h3 requested a review from claucambra September 22, 2026 13:09
@sonarqubecloud

Copy link
Copy Markdown

@claucambra claucambra left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, lgtm!

@i2h3
i2h3 merged commit e91c237 into master Sep 23, 2026
19 of 21 checks passed
@i2h3
i2h3 deleted the i2h3/fix/build-on-macos-27 branch September 23, 2026 06:24
@github-project-automation github-project-automation Bot moved this from 🏗️ In progress to ☑️ Done in 💻 Desktop Clients team Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug dependencies Pull requests that update a dependency file os: 🍎 macOS Apple macOS, formerly also known as OS X

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

2 participants