Skip to content

"Barrel already resolved" for "barrels.jungle" copy when optimizing project from the command line #72

@m4tiz5zktonj

Description

@m4tiz5zktonj
  1. Clone https://github.com/markw65/Barrels.
  2. Copy DataFieldWithBarrels/barrels.jungle to DataFieldWithBarrels/custom-barrels.jungle.
  3. Create optimize.mjs from https://github.com/markw65/monkeyc-optimizer/blob/main/README.md.
  4. Fix const workspace = path.dirname(jungleFiles); with const workspace = path.dirname(jungleFiles.split(";")[0]);.
  5. Install @markw65/monkeyc-optimizer.
  6. Run node optimize.mjs ".../DataFieldWithBarrels/monkey.jungle;.../DataFieldWithBarrels/custom-barrels.jungle".

Result:

Error: Barrel BarrelTest already resolved to .../BarrelTest/monkey.jungle; can't also resolve to .../BarrelTest/monkey.jungle

Observations:

  1. Command node optimize.mjs ".../DataFieldWithBarrels/monkey.jungle;.../DataFieldWithBarrels/barrels.jungle" finishes without errors.
  2. Command node optimize.mjs ".../DataFieldWithBarrels/monkey.jungle;.../DataFieldWithBarrels/custom-barrels.jungle" finishes without errors if .../DataFieldWithBarrels/barrels.jungle doesn't exist.
  3. Command line monkeyc doesn't fail with non-default barrels.jungle name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions