nimble icon indicating copy to clipboard operation
nimble copied to clipboard

thisDir != projectDir as of Nimble 0.13.0.

Open kayabaNerve opened this issue 3 years ago • 2 comments

In versions prior to 0.13.0, they returned the same value, making it valid to run withDir projectDir() / "dependency". As of 0.13.0, either thisDir() / "dependency" or just "dependency" must be used. This, unfortunately, broke multiple packages of mine.

Behavior dating back to at least 2019:

thisDir()    /tmp/nimble_2138900/githubcom_kayabaNervemcminisketch
projectDir() /tmp/nimble_2138900/githubcom_kayabaNervemcminisketch

New behavior:

thisDir()    /tmp/nimble_2139158/githubcom_kayabaNervemcminisketch
projectDir() /tmp/nimblecache-330808066/mc_minisketch_3935108725

kayabaNerve avatar Apr 30 '21 03:04 kayabaNerve

Sorry about the breakage, although it's possible this was intentional (you might be able to find the commit responsible quite easily which should explain things)

dom96 avatar Apr 30 '21 20:04 dom96

I see two commits citing thisDir, the second being an improvement on the first. The first is https://github.com/nim-lang/nimble/pull/827/files, and I don't see any documentation attached. Mind helping fill this in for me, please? I don't see any reasoning attached, and am honestly not sure I have the right commit. Previously, thisDir and projectDir worked; now, solely thisDir works. I believe it's projectDir which changed, yet I can't find any commit messages citing it.

kayabaNerve avatar May 02 '21 07:05 kayabaNerve