| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* move widestrs out of system
* fix osproc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Nim manual says that an implicit conversion to cstring will
eventually not be allowed [1]:
A Nim `string` is implicitly convertible to `cstring` for convenience.
[...]
Even though the conversion is implicit, it is not *safe*: The garbage collector
does not consider a `cstring` to be a root and may collect the underlying
memory. For this reason, the implicit conversion will be removed in future
releases of the Nim compiler. Certain idioms like conversion of a `const` string
to `cstring` are safe and will remain to be allowed.
And from Nim 1.6.0, such a conversion triggers a warning [2]:
A dangerous implicit conversion to `cstring` now triggers a `[CStringConv]` warning.
This warning will become an error in future versions! Use an explicit conversion
like `cstring(x)` in order to silence the warning.
However, some files in this repo produced such a warning. For example,
before this commit, compiling `parsejson.nim` would produce:
/foo/Nim/lib/pure/parsejson.nim(221, 37) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv]
/foo/Nim/lib/pure/parsejson.nim(231, 39) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv]
This commit resolves the most visible `CStringConv` warnings, making the
cstring conversions explicit.
[1] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/doc/manual.md#cstring-type
[2] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/changelogs/changelog_1_6_0.md#type-system
|
|
|
|
|
|
|
| |
* Fixes return values of execCmd on macos
* update tests to use existing structure
Co-authored-by: daniel <danielclarke@wearepopgun.com>
|
|
|
|
|
| |
* Remove Deprecated poDemon
* Remove Deprecated poDemon
|
| |
|
|
|
|
|
|
|
| |
* Ensure lines when process done
* eliminate post-EOF exit test
* Recommend fixes for execCmdEx/execProcess
|
|
|
|
|
|
|
| |
* fixes #18858 [backport]
* ensure async tests work with --experimental:strictEffects [backport]
* ensure async tests work with --experimental:strictEffects [backport]
|
|
|
|
|
| |
* typo: nonexistant => nonexistent
* fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
|
| |
|
| |
|
| |
|
|
|
|
| |
ConvFromXtoItselfNotNeeded, UnusedImport notes (#16764)
|
| |
|
|
|
|
| |
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
|
| |
|
|
|
| |
and from osproc.terminate docs
|
|
|
|
|
|
|
| |
(#16385) [backport]
* Add error check to closeHandle and fix closing handle twice in osproc
* Fix compile error on Linux
|
|
|
|
|
| |
* Fix broken links in docs
* Fix rand HSlice links
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add first draft of new osproc.readLines
* Add test for new osproc.readLines
* Rename test to start w/t to run; Also add newline to output
* Suppress hint messages.
* Output should match this time.
* Shoulda picked a program with simpler syntax than ..lol
* Address https://github.com/nim-lang/Nim/pull/15429#issuecomment-701890898
and https://github.com/nim-lang/Nim/pull/15429#issuecomment-701985976 by
factoring `readLines` into `iterator lines` and a wrapper `proc`.
* Address https://github.com/nim-lang/Nim/pull/15429#issuecomment-702127289
and also add a `ReadIOEffect` tag to the iterator (called by the wrapper..
so it should need no separate tag, if I understand correctly).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix #14906 by wrapping outputStream with PipeOutStream
* Fix compile error when ./build_all.sh
* Use PipeOutStream on posix
* Fix compile error when build_all.sh
* Use ptr UncheckedArray
* Replace copyRefObj
* Remove tmp buffer from posPeekData
* Add more tests for outputStream
* Add comments about PipeOutStream.buffer
* Fix bug in posReadLine
* Move implementation of newPipeOutStream to streamwrapper module
|
|
|
|
|
| |
This example doesn't work on our nightlies CI.
Other procs in this module already use 'code-block'.
|
|
|
|
|
|
|
| |
workingDir (#14211)
* `osproc.execCmdEx` now takes an optional `input` for stdin
* execCmdEx now also takes an optional ``workingDir` and `env`
|
|
|
|
| |
IO [backport] (#14296)
|
| |
|
| |
|
|
|
| |
Also modified tosprocterminate to verify waitForExit implementations.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* osproc: move fork-based code path under the when conditional
* osproc: avoid using the environ global on Haiku
* osenv: import environ from stdlib.h on Haiku
Haiku's environ is declared in `<stdlib.h>` by default, differing from
POSIX and/or Linux. Import it from there to avoid collision with anyone
importing `<stdlib.h>` from Nim.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
--styleCheck:error
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* correct argument name,
updated using poUsePath, based on feedback from c-blake
* Update osproc.nim
* explicit args parameter
|
|
|
|
| |
This reverts commit 1a13b3a14eafc35615c7e9f1b72b3ab646fa7550.
|
|
|
|
| |
The doc states "Make sure to pass options explicitly.", but the example didn't.
Since constructing a string for the shell with appropriate quotes is non-trivial, the first example should be how to use `execProcess` including `args`
|
|
|
|
|
| |
* better docs: osproc
* fix a typo in the docs, deprecate "demon"
|
| |
|
| |
|
| |
|