Monkey.Jungle Excludes in a Barrel

Bummer..... looks like I can't use "edge540.excludeAnnotations =" in a monkey.jungle in a barrel. I've tried to add those in both the barrel's monkey.jungle and in the calling data field's monkey.jungle. Neither/both don't work to actually exclude a function from being compiled. Just ignored.

Have you tried? Agree? Or am I doing something wrong?

  • I know this has come up before and it won't work.  I may have tried it myself, but I don't recall.

    Barrels are kind of odd things.  Using code from a barrel increases the overhead in the main app vs just directly referencing the files in the main app..

    Also, if you look at a .barrel file, it's mainly just a zip of the barrel project and contains no compiled code but does include all the source.  When you use a barrel in an app, the barrel gets expanded and built for each target if you are doing something like an export.

    I seem to recall that there's also something with strings, where resource overrides based on language don't work, and resources in general are referenced in a different way,

    As far has handling what you want to do, the way I'd do it is something like in the main app, you call a function in the barrel to pass info.  Like

    MyBarrel.setDevice(isEdge840);

    and then in the barrel, use that variable as needed.  You can also use a parameter when you do a "new" on something in the barrel.

    Right now, I probably have a dozen or more barrel projects, but I generally just use the mc files in that barrel project directly to save on the overhead.

  • Great tips! Thanks Jim!

  • One other thing I forgot about as I've done it every barrel since day one, is with a barrel, you may find it easier if you don't select any target devices, and leave that up to the calling app.  If you select a target, that means that you can only use the barrel with that target.  If you leave all the targets blank, the barrel can be used by any target, even those announced after the barrel is done.

    Oh, and things may have changed with the extract/build for each target, as I've not checked in the last few years.

  • Barrels are kind of odd things.  Using code from a barrel increases the overhead in the main app vs just directly referencing the files in the main app..

    Is this still true? Maybe with SDK 7.x this is no longer the case

  • I've not checked lately, but was that way since barrels were introduced.  First one used an extra 1k or so..  Maybe it has to do with the difference in how resources are used/accessed.