Building yardl fails with matlab/generated/+yardl: file exists
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 35
- Forks
- 14
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Description
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).
https://github.com/microsoft/yardl/blob/26a875148169265866cb8a5a2cc136d139c3d7f5/models/test/_package.yml#L20
https://github.com/microsoft/yardl/blob/26a875148169265866cb8a5a2cc136d139c3d7f5/models/sandbox/_package.yml#L11
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing models/test/_package.yml and models/sandbox/_package.yml, then run just -v on Ubuntu 22.04 to reproduce the shared matlab/generated/+yardl collision. Trace the generate and generate-sandbox recipes to determine why both models target the same output directory. Done means a fresh checkout can run the full command without manually removing generated files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, matlab
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100