JUCE no longer builds in Xcode 13.2.1

The tip of develop does not build in Xcode 13.2.1

/Users/rrabien/dev.github/slPlugins/modules/juce/modules/juce_core/maths/juce_Range.h:66:12: 'nodiscard' attribute cannot be applied to types

static JUCE_NODISCARD Range withStartAndLength (const ValueType startValue, const ValueType length) noexcept

Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.1.0
Thread model: posix
3 Likes

Since you accept pull requests now and I have signed the CLA, here is a fix:

3 Likes

This fix works for me, thanks!

Bump, this issue is now causing my CI to fail. Please merge this pull request as a hot fix!

2 Likes

don’t compile in Xcode 12.2 either FWIW

Does your CI take the latest develop? I suggest checking out a specific JUCE commit, it can even be the one in @g-mon’s fix PR.

Yes, it was taking the latest develop by default, I’ve just learned the hard way that I should prefer to specify a specific commit…

1 Like

It’s also a good idea for reproducibility, to keep track of which exact JUCE commit you were using so you could recreate older versions for bisects.

1 Like

Many thanks for the fix! I’ve merged that now:

5 Likes

Congratulations for merging a PR!

7 Likes

:partying_face:

1 Like