Acknowledged

Bug: Include barrel by path with a .barrel file present causes weird behaviour

Have jungle file that includes a barrel:

project.manifest = manifest.xml
FOO = "../barrels/FOO"
# similar results
FOO = ["../barrels/FOO/monkey.jungle"]
base.FOO.annotations = whatever
base.barrelpath = $(base.barrelpath):$(FOO)

This works nice and fine.

Now, if for whatever reason you have build a barrel in the barrel can be found IN the path, eg ../barrels/FOO/bin/FOO.barrel and you later add a function to the barrel without making the barrel file) and want to use that function the project that has the above mentioned barrel include it breaks. You'll get messages like Undefined symbol "foo" detected. It appears the barrel is than looked up via the barrel file and not via the path, which is not what you expect given the monkey.jungle file you have. Especially if you specify a monkey.jungle file.

  • OK, let me say it with less words:

    * Have a barrel in /path/to/barrel

    * Configure to use the barrel by either FOO = "../barrels/FOO" or FOO = ["../barrels/FOO/monkey.jungle"] syntax (sorry, no `this is code` or monospaces fonts are available)

    * Use the barrel in your project

    * Everything works

    * Build the barrel INSIDE your barrel project, so you end up with /path/to/barrel/bin/FOO.barrel

    * Make a new function in your barrel project, eg foo() that just says hi

    * Use foo() in your project

    * Notice it says Undefined symbol "foo" detected.

  • I haven't been able to reproduce this issue yet. When I add a new function to a barrel that is already added to a project and then that projects monkey.jungle uses barrelPath I am able to call that function without issue. 

    I did notice that your last line of monkey.jungle code is using a colon instead of a semicolon, but that causes a compile error so I assume that isn't the issue you are having. 

    Is there any other information you can give as to the process you are taking to reproduce this problem? Your first sentence is somewhat difficult to follow when you say "build a barrel in the barrel can be found in the path".