Modules and 'local copy' not perfect yet


#1

I think I accidentally set ‘use local copy’ in the Audio utils module, and then I couldn’t compile. AudioprocessorPlayer.h was looking for an include relative to it’s copied location, even though it was in another module.

Bruce


#2

I made some fixes to that in the last couple of days - is it still broken in the very latest version?


#3

I pulled the tip about an hour before that message. The problem is includes between modules - in the case an AudioProcessorPlayer to an AudioProcessor.

I’m sure you could repeat it in a starter project - just made audio utils local, like I did by accident.

Bruce


#4

I’ve been testing creating new projects and building them, but it all seems to be fine… Can’t think what you might be doing differently…?


#5

I’m getting a the same error using converting a project from the master branch to the modules branch. I opened my project in the new introjucer and ticked juce_audio_utils (as I’m using an audioDeviceSelectorComponent) and then saved the project and opened it in xCode. The build fails.

After reading this post I realised that I had to deselect ‘Create local copy’ which is an option that pops up in the right-hand pannel in the introjucer when the module is selected. The build succeeds after making this change. It would be nice if either ‘Create local copy’ would apply to all modules, or if the user was warned that the current settings will not build.


#6

Yes, I was just thinking about that too. I made it possible to set the local-copy flag separately for individual modules because there’s a chance that people may want to mix up their own modules with juce ones and put them in different places, but some combinations of modules will break if they’re not all in the same parent folder. I’ll have a think about it some more…


#7

It’s not such a big deal once you know where the error is coming from, but it can lead to a fair bit of head scratching for the luddites such as I who are just switching branches. Perhaps just making the local copy default OFF would sort it. If you then turn it on manually, you know it was that change that probably broke the build.

Anyway, thanks to Jules of industrious and great.


#8

FWIW, this one didn’t confuse me at all, I got an error, looked, and saw that dependent modules were mixed (copy / not copy). But I can see how it could be a puzzler.

Maybe no dramatic change, just a reality check, warn the user if dependent modules are not all the same?