-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
HCR depends on nimcachedir.len
#16265
Comments
timotheecour
changed the title
whether
nim semantics change depending on Dec 6, 2020
--nimcache
is in a symlink (eg /tmp/dir on osx) affects semanticsnimcachedir.len
pretty sure it's related to this: # nasty nasty hack to get the command line functionality working with HCR
# register the 2 variables on behalf of the os module which might not even
# be loaded (in which case it will get collected but that is not a problem)
let osModulePath = ($systemModulePath).replace("stdlib_system", "stdlib_os").rope
g.mainDatInit.addf("\thcrAddModule($1);\n", [osModulePath])
g.mainDatInit.add("\tint* cmd_count;\n")
g.mainDatInit.add("\tchar*** cmd_line;\n")
g.mainDatInit.addf("\thcrRegisterGlobal($1, \"cmdCount\", sizeof(cmd_count), NULL, (void**)&cmd_count);$N", [osModulePath])
g.mainDatInit.addf("\thcrRegisterGlobal($1, \"cmdLine\", sizeof(cmd_line), NULL, (void**)&cmd_line);$N", [osModulePath])
g.mainDatInit.add("\t*cmd_count = cmdCount;\n")
g.mainDatInit.add("\t*cmd_line = cmdLine;\n") |
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Dec 6, 2020
…h, in combination with other hacks, caused a really obscure looking bug
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Dec 6, 2020
…h, in combination with other hacks, caused a really obscure looking bug
indeed..., I fixed it in timotheecour#424 |
Araq
changed the title
nim semantics change depending on
HCR depends on Dec 6, 2020
nimcachedir.len
nimcachedir.len
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Dec 11, 2020
…h, in combination with other hacks, caused a really obscure looking bug
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Dec 13, 2020
…h, in combination with other hacks, caused a really obscure looking bug
Araq
pushed a commit
that referenced
this issue
Dec 14, 2020
…ng litterals (#16329) * fix #16265: cgen now does not line wrap string litterals which, in combination with other hacks, caused a really obscure looking bug * fix #13999; nimhcr_integration.nim now works for osx * try to make appveyor CI disappear * disable openbsd + add diagnostic for openbsd * enable for openbsd * PTEMP * re-disable openbsd
mildred
pushed a commit
to mildred/Nim
that referenced
this issue
Jan 11, 2021
…t line wrap string litterals (nim-lang#16329) * fix nim-lang#16265: cgen now does not line wrap string litterals which, in combination with other hacks, caused a really obscure looking bug * fix nim-lang#13999; nimhcr_integration.nim now works for osx * try to make appveyor CI disappear * disable openbsd + add diagnostic for openbsd * enable for openbsd * PTEMP * re-disable openbsd
ardek66
pushed a commit
to ardek66/Nim
that referenced
this issue
Mar 26, 2021
…t line wrap string litterals (nim-lang#16329) * fix nim-lang#16265: cgen now does not line wrap string litterals which, in combination with other hacks, caused a really obscure looking bug * fix nim-lang#13999; nimhcr_integration.nim now works for osx * try to make appveyor CI disappear * disable openbsd + add diagnostic for openbsd * enable for openbsd * PTEMP * re-disable openbsd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[EDIT]
After a painful reduction, I found this bug while working on #13999
--hotCodeReloading
"works" or fails depending on the length of nimcachedir (from--nimcache
) /cc @zahThat's a serious bug because depending on unrelated changes you'll have something working or not, and it can be hard to debug.
Example
nim c lib/nimhcr.nim
XDG_CONFIG_HOME= nim c --forceBuild --hotCodeReloading:on -o:/tmp/z13 --hints:off --passl:-Wl,-rpath,lib --skipusercfg --skipparentcfg --nimcache:/tmp/D20201205T1650_D20201205T184232_nimcache10x main.nim
where:
XDG_CONFIG_HOME= and --skipusercfg --skipparentcfg
are to ignore user's environment--passl:-Wl,-rpath,lib
is to avoid runtime errorcould not load: libnimhcr.dylib
Current Output
Expected Output
Additional Information
D20201205T165017
1.5.1 devel edce589
--hotCodeReloading:on
--nimcache:/tmp/D20201205T1650_nimcache10x
, or so long the length of nimcachedir is <= some threshold, then fails after that thresholdThe text was updated successfully, but these errors were encountered: