After updating to XCode 10, the -Wauto-var-id warning is raised in several JUCE module files, e.g.:
In file included from /Users/work/Documents/pluginval/JuceLibraryCode/include_juce_gui_extra.mm:9:
In file included from ../../modules/juce/modules/juce_gui_extra/juce_gui_extra.mm:27:
In file included from ../../modules/juce/modules/juce_gui_extra/juce_gui_extra.cpp:133:
../../modules/juce/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp:161:9: error: 'auto' deduced as 'id' in declaration of
'sharedDocController' [-Werror,-Wauto-var-id]
auto* sharedDocController = [NSDocumentController sharedDocumentController];
This breaks build scripts that treat warnings as errors, such as @dave96’s pluginval.
How are you enabling the warning? I’ve added -Wauto-var-id to the Extra Compiler Flags section of the Projucer’s Xcode exporter but I’m not getting these warnings after re-saving and opening in Xcode 10.
I’ve done a bit of research, and it seems like -Wauto-var-id is a clang-only warning. I couldn’t find out in which verson of clang it was introduced, but perhaps you’re using a different compiler (version)?
> clang --version
Apple LLVM version 10.0.0 (clang-1000.10.44.2)
I would like to help you by eliminating all of the respective warnings and making a PR, but when updating from the latest JUCE release’s modules folder to the develop branch’s latest tip, it doesn’t build anymore…
/Users/work/Documents/JUCE/modules/juce_video/native/juce_mac_Video.h:223:52: No type or protocol named 'NSKeyValueChangeKey'
When starting out with JUCE, I’ve been using the modules from the JUCE folder I downloaded with the latest release (I didn’t know I could also pull them from Github).
I now switched to the modules on the develop branch by cloning it from git, setting it as the global modules path and enabling “Use global path” for each module:
Yeah that all sounds correct. Just to double-check: you’ve set all of the modules in the project to use the global path which contains the latest modules? And re-saved the project in the Projucer? It might be worth also trashing the Builds folder of the project and re-saving just in case.
Hmm, OK I’m not sure what could be going on there sorry. I’ll do a quick skim of the codebase and remove all of the id -> auto* conversion warnings though.