Skip to content

Building yardl fails with matlab/generated/+yardl: file exists #273

@KrisThielemans

Description

@KrisThielemans

On Ubuntu 22.04, I cloned a fresh copy, used conda install go giving me go1.25.4, but get

(petsird) kris@ASC-HYDRA:~/devel/yardl$ just -v
===> Running recipe `install`...
cd tooling/cmd/yardl; go install -ldflags="-s -w" .
===> Running recipe `generate`...
cd models/test && yardl generate
✅ Wrote C++ to /home/kris/devel/yardl/cpp/test/generated.
✅ Wrote Python to /home/kris/devel/yardl/python.
✅ Wrote JSON to /home/kris/devel/yardl/cpp/test/generated.
✅ Wrote Matlab to /home/kris/devel/yardl/matlab/generated.
===> Running recipe `generate-sandbox`...
cd models/sandbox && yardl generate
ERR mkdir /home/kris/devel/yardl/matlab/generated/+yardl: file exists
error: Recipe `generate-sandbox` failed on line 29 with exit code 1

Removing the directory and doing just generate-sandbox works. I believe this is because just first runs generate, which will run yardl generate in models/test. This creates the directory, just generate-sandbox then complains as the directory is already there (and not compatible).

outputDir: ../../matlab/generated

outputDir: ../../matlab/generated

I'm not sure why you don't see this, but it is the same error as in #252, where I also use go from conda.

In any case, it seems dangerous to let 2 different models generate files in the same location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions