Acknowledged

Bug: Spaces in path to barrel folder results in error in import statement

Reproducible scenario (Visual Studio Code, Windows 11):

  • Create a Monkey C Barrel project in "C:\Folder name with spaces\MyBarrel"
  • Create a Monkey C App, e.g. a Simple Data Field
  • In this app, configure a monkey barrel: Configure Monkey BarrelAdd Monkey BarrelAdd a barrel project > C:\Folder name with spaces\MyBarrel\monkey.jungle
  • The contents of the app's barrels.jungle file looks like this:

MyBarrel = [c:\Folder name with spaces\MyBarrel\monkey.jungle]
base.barrelPath = $(base.barrelPath);$(MyBarrel)

Note that there are no quotes around the path to the monkey.jungle file.

  • In a source file of the Simple Data Field app created in step 2, add the import statement to MyBarrel, i.e.: import MyBarrel;
  • A wiggly line under this import statement appears, and if you hover over it, the error message shows: Cannot find module '$.MyBarrel' in import statement

To solve this error by hand, you have to put quotes around the path in the barrels.jungle file:

MyBarrel = ["c:\Folder name with spaces\MyBarrel\monkey.jungle"]

This is a small bug, and there is an easy workaround, but it would still be nice if it could be solved.

Parents
  • There are other similar bug reports about how Garmin don't know how to escape spaces in paths. I think one example is when you copy&paste the command to build your app from the terminal and if the path has spaces it won't work unless you escape it

Comment
  • There are other similar bug reports about how Garmin don't know how to escape spaces in paths. I think one example is when you copy&paste the command to build your app from the terminal and if the path has spaces it won't work unless you escape it

Children
No Data