-
-
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
envPairs works in vm, nims #18615
envPairs works in vm, nims #18615
Conversation
@@ -19,29 +21,3 @@ block: | |||
if not isWindows: | |||
doAssert cwd.isAbsolute | |||
doAssert relativePath(getCurrentDir() / "foo", "bar") == "../foo" | |||
|
|||
import std/sequtils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are all covered in tosenv
var gEnv {.importc: "environ", header: "<stdlib.h>".}: cstringArray | ||
var gEnv {.importc: "environ".}: cstringArray | ||
|
||
iterator envPairsImpl(): tuple[key, value: string] {.tags: [ReadEnvEffect].} = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pure re-indentation until this point
ping @Araq |
0e21cd8
to
ee3cfb9
Compare
ping @Araq before this bitrots again, I rebased after this had bit-rotted |
@Araq ok to backport this to 1.6 branch? fits well with other improvements to environment variables made in this release, so that we can claim:
instead of some weird subset of this statement |
I think it's too risky as the diff is quite large, even ignoring the indentation changes. |
* envPairs works in vm, nims * fixup
all osenv APIs now work and are tested in all backends (c,cpp,vm,nims,js with -d:nodejs)
(note: before PR, getEnv, existsEnv, delEnv, putEnv worked in VM but not envPairs; etc)