Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atlas cmd writes nim.cfg to wrong destination: cannot open: balls/nim.cfg [IOError] #18751

Closed
timotheecour opened this issue Aug 26, 2021 · 4 comments

Comments

@timotheecour
Copy link
Member

timotheecour commented Aug 26, 2021

Example

cd $dir
git clone https://github.com/nim-lang/Nim
cd Nim
sh build_all.sh
bin/nim c -r tools/atlas/atlas.nim clone https://github.com/disruptek/balls

Current Output

[Warning] (nim-bytes2human) package has no tagged releases

/private/tmp/d04/foo2/Nim/tools/atlas/atlas.nim(473) atlas
/private/tmp/d04/foo2/Nim/tools/atlas/atlas.nim(456) main
/private/tmp/d04/foo2/Nim/tools/atlas/atlas.nim(396) patchNimCfg
/private/tmp/d04/foo2/Nim/lib/system/io.nim(866) writeFile
Error: unhandled exception: cannot open: balls/nim.cfg [IOError]
Error: execution of an external program failed: '/private/tmp/d04/foo2/Nim/tools/atlas/atlas clone https://github.com/disruptek/balls'

Expected Output

should write to $nim/config/nim.cfg, not $nim/balls/nim.cfg,

Example 2

bin/nim c -r tools/atlas/atlas.nim clone cligen
Error: unhandled exception: cannot open: cligen/nim.cfg [IOError]

Additional Information

1.5.1 98f7254

@Araq
Copy link
Member

Araq commented Aug 29, 2021

It should really write to $nim/balls/nim.cfg, as documented.

@Araq Araq closed this as completed Aug 29, 2021
@timotheecour
Copy link
Member Author

timotheecour commented Aug 29, 2021

since you've closed this issue, I have to assume that crashing with cannot open: balls/nim.cfg is the expected behavior

(that command came from koch.nim:602:19: execFold("Run atlas tests", "nim c -r -d:atlasTests tools/atlas/atlas.nim clone https://github.com/disruptek/balls") adapted by removing -d:atlasTests which is test-only)

@Araq
Copy link
Member

Araq commented Aug 30, 2021

I don't know why it could not write into this directory, but it should write into $nim/balls/nim.cfg, as documented.

@timotheecour
Copy link
Member Author

I don't know why it could not write into this directory

because it creates $nim/../balls ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants