Barrels do not work with sub-components

Is anyone able to successfully run the Export Wizard on an app that uses a barrel with sub-components that can prove my theory wrong? If that is the case, could you please share the contents of you barrels.jungle file of the app using the barrel?

When running export wizard, the compiler does not accept line 5 of the app's barrels.jungle file. This is the line that enumerates the sub-component annotations.This only happens when the -e parameter is present in the build command. This is a crucial parameter which instructs the build to generate an IQ file. The command also fails when executed from the console window, so this rules out any eclipse issues. If you execute that same build command in a console without the -e parameter, then the build works.

The error message looks like this:

BUILD: ERROR: barrels.jungle:5: 'LibIQ' is not a valid barrel specified in the manifest file.
BUILD: ERROR: Errors were found during jungle file processing.
BUILD: com.garmin.monkeybrains.Packager$PackageException: [200] Errors were found during jungle file processing.
BUILD: at com.garmin.monkeybrains.Monkeybrains.packageApplication(Monkeybrains.java:815)

The barrels.jungle file looks like this:

# Do not hand edit this file. To make changes right click
# on the project and select "Configure Monkey Barrels".

LibIQ = [C:\Users\jarango\Eclipse\Garmin\LibIQ\monkey.jungle]
base.LibIQ.annotations = Gesture;Math;System
base.barrelPath = $(base.barrelPath);$(LibIQ)

Thanks
Jesus

 

  • When you use a barrel, it's got a jungle file in addition to the one in the app that uses the barrel.  Could it be you need to have some of this in the barrel's jungle instead of the app's jungle?

  • Hi Jim, 

    I don't think so. I tried what you said so that I can safely rule it out. I'm almost convinced that this is a monkeybrains bug and that Garmin did not test this. 

    The barrel itself lists its annotations in its manifest file. The app lists them in the app's barrels.jungle file. Simulator and side-loading works. But generating IQ file does not.

    Both the app and the barrel have a monkey.jungle file that in both cases just has a single line pointing to the manifest.

    Unless there is a solution to this, I will have to put every thing sub-component I write into its own barrel. This sucks.

  • Hi , sorry about the inconvenience! I was able to reproduce this issue and we are working on a fix now.

  • I also can see that very annoying bug, is there any date when this will be fixed?

  • The 3.1.8 SDK was released yesterday. (see" news and announcements")  Have you tried that?

  • Yes and it seem NOT to be fixed!

  • This one looks also very strange:

    barrelbuild --version
    ERROR: Could not get version information
    java.lang.IllegalArgumentException: URI is not hierarchical
    	at java.io.File.<init>(File.java:418)
    	at com.garmin.monkeybrains.MonkeyBarrelEntry.run(MonkeyBarrelEntry.java:243)
    	at com.garmin.monkeybrains.MonkeyBarrelEntry.simpleMain(MonkeyBarrelEntry.java:157)
    	at com.garmin.monkeybrains.MonkeyBarrelEntry.simpleMain(MonkeyBarrelEntry.java:141)
    	at com.garmin.monkeybrains.MonkeyBarrelEntry.main(MonkeyBarrelEntry.java:168)
    usage: barrelbuild [-a <arg>] [--Eno-invalid-symbol] [-f <arg>] [-h] [-i <arg>]
           [-o <arg>] [-p <arg>] [-u <arg>] [-v] [-w]
    -a,--apidb <arg>       API import file
       --Eno-invalid-symbolDo not error when a symbol is found to be invalid
    -f,--jungle-files <arg>Jungle files
    -h,--help              Prints help information
    -i,--import-dbg <arg>  Import api.debug.xml
    -o,--output <arg>      Output file to create
    -p,--project-info <arg>projectInfo.xml file to use when compiling
    -u,--devices <arg>     devices.xml file to use when compiling
    -v,--version           Prints the compiler version
    -w,--warn              Show compiler warnings

  • Have you been able to build anything with a barrel, or is this your first try?

    From the error, and this is just a guess, is there anything odd in the manifest.xml for the barrel?  The error about the version leads me there - Hand editing the file and inducing a typo or something?

  • Nope, it is not my first try to build something with the barrel. As Jesus already stated, building the PRG works without any problem but the building of the IQ package fails. It fails also with everything configured in Eclipse and using the 'Export Wizard', so this is IMHO definitely a Garmin SDK bug, which, by the way, has already been reproduced by Marianne.

  • What target is failing for you?  Not all devices support Barrels.

    I use barrels all the time.

    Are you able to make a ,iq with a very basic barrel?