Fix trailing comma in OBSShader causing a build error in mac#13384
Fix trailing comma in OBSShader causing a build error in mac#13384danrossi wants to merge 1 commit into
Conversation
|
Trailing commas in parameter lists are a Swift 6.1 feature.
It seems Xcode doesn't actually disambiguate between 6 and 6.1 using this setting; rather it seems like the simplest way to enforce Swift 6.1 would be to enforce Xcode 16.3, the version that ships it. All this in the context that the project build instructions might need a general refresh to reflect current minimums, so there may be some evaluation needed of what OBS wants to require moving forward. cc @PatTheMav |
|
Ok. Please close if this a backwards compatibility issue. Sorry about that. What is the fix ? |
|
Sorry, my point got a bit muddled with the edit. Overall I'm saying: This fix seems correct if the project doesn't want to require Swift 6.1. If the project does want to require Swift 6.1, it should probably enforce Xcode 16.3. I would leave this open until maintainers establish which course is correct. |
|
OK I get you. So I need to upgrade my system to macOS 15 and XCode 16.3. Will try that. |
|
I've updated to macOS 15.7.7 and XCode 16.3 and the trailing comma issue isn't a problem. What is the set environment for the release build system ? I can update to that. Probably can close this. |
|
I am not a mac user but the workflow looks to use XCode 26.1 obs-studio/.github/workflows/build-project.yaml Lines 82 to 86 in 085a51a |
|
OK should I set the minimum to 26.1 in the plugin project. I will upgrade to that. Not a problem. We should close this then. Xcode 16.1 was old anyway. I set the minimum in the plugin template which I fixed up with the Swift language patch. And another plugin project I am working on. I'm not sure what minimum macOS SDK to set it to or target. It's set to 15.4 to match what 16.3 supports. According to the workflow it seems to be targeting SDK 15 https://github.com/danrossi/obs-plugintemplate/blob/update-spec/cmake/common/buildspec_common.cmake#L65/cmake/macos/compilerconfig.cmake#L20 The instructions to update potentially is this. App Store Xcode is only delivering 16.1. Grab XCode 26.1 or higher from this which needs an Apple developer account. OBS is setup for a universal build. So it needs to be the XCode universal. The mimimum macOS needed is 15.6. So SDK targeted is now 26.1. The version shift is confusing as the previous SDK was 15.7. ##13250 is needed or else configure will fail. So the workflow should be failing right now ? I have an automated patch for it with the plugin setups. |
|
This can safely be closed. I will make a pull request to update the requirements here https://github.com/obsproject/obs-studio/blob/master/cmake/macos/compilerconfig.cmake#L23 It should match https://github.com/danrossi/obs-plugintemplate/blob/update-spec/cmake/macos/compilerconfig.cmake#L19 |
|
I'm confused which way is the best to go. Somebody took an issue in #13406 setting the minimum xcode in cmake to 26.1 to match the CI environment. So there is no more confusion when going to build it yourself. This change should be backwards compatible with Xcode 16.1 or 16.3 and above is needed with the newer Swift. But further code changes that work in 26.1 and pass the CI builds may not work in 16.1. |
Description
There is a build error on mac which the error only shows up in xcode not the command line. The trailing comma in OBSShader in libobs-metal causes an "unexpected separator" error.
Related: #13383
Motivation and Context
Discovered trying to build for macos. Under macOS 14 and XCode 16.1
How Has This Been Tested?
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: