| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
`^[[0m` to stderr when callStyledWriteLineStderr not called (#14214)
* fix https://github.com/timotheecour/Nim/issues/152 `^[[0m` is inserted in stderr for `echo code | nim c -`
* resetAttributes not even needed, already handled in styledWriteLine
* simplify tests in tests/trunner.nim thanks to this fix
|
| |
|
|
|
|
|
| |
* destructors: don't produce stupid code for 'cast'
* fixes #14207
|
|
|
|
|
|
|
|
|
|
| |
* => supports pragmas & names (+ changed behavior)
(x, y: int) is now parsed as (x: int, y: int) instead of
(x: auto, y: int) inside => and ->.
* fix pragma check
* fixes, use since & LHS of -> supports pragmas
|
| |
|
|
|
|
| |
* move since from inclrtl to std/private/since
* move since import in system below for HCR
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
* add discard warning in manual
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* added high level sendTo and recvFrom to std/asyncnet; tests were also added.
* add .since annotation, a changelog entry and fixed to standard library style guide.
* Improved asserts msgs and added notes for use with UDP sockets
* pointers removed in parameters and fixes
* added .since annotation
* minor fixes
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* fixes #14054
* make tests green again
* more tests are green
* maybe now
|
|
|
|
|
| |
* Fix #14160
* Add testcase
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* many bugfixes for js
fixes #12672, fixes #14153, closes #14123, closes #11331, fixes #11783, fixes #13966, fixes #14087, fixes #14117, closes #12256.
mostly fixes the fact that it was allowed to assign to newly created temp variables. additionally attempts to get rid of null initialized seqs/strings (though they might pop up here and there); this simplifies a lot of things and makes code size smaller. even if null seqs/strings pop up here and there it's still better than all those bugs existing.
* formatting fixes
* CI fixes
* more CI fixes
|
|
|
|
|
| |
* Fix negative arrays for JS, refs #13966
* small extra fix: no need to .slice() cstring in JS
|
|
|
| |
Co-authored-by: cooldome <ariabushenko@bk.ru>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Error -> Defect for defects
The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.
With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
|
|
|
|
|
| |
* StringStream & more stdlib modules support for JS/NimScript
* change back pegs test in line with #14134
|
| |
|
| |
|
|
|
|
| |
* $(unsigned) now works for js
* move NimMajor+friends closer to NimVersion according as per reviewer feedback
|
|
|
|
|
|
|
|
|
| |
ints (#14134)
* fix https://github.com/timotheecour/Nim/issues/133; $(a: float) works in nim js like in other backends
* fix tests
* fix test for windows that prints 1.1e17 differently than other OS
|
| |
|
|
|
|
|
|
|
|
|
| |
* cycle collector: new implementation
* cycle collector: make self-adaptive based on its previous effectiveness
* cycle collector: added Lins's jump stack to improve traversal from 3*N to 2*N
* cycle collector: make tests green
* API extensions and bugfixes
* code cleanup and use --gc:orc for tasyncawait
|
|
|
| |
add tests for tinclrtl
|
|
|
|
|
|
|
|
|
| |
(#14109)
* added high level sendTo and recvFrom to std/asyncnet; tests were also added.
* add .since annotation, a changelog entry and fixed to standard library style guide.
* Improved asserts msgs and added notes for use with UDP sockets
|
| |
|
|
|
|
|
| |
* Make await a template
* Generate await inside async/multisync
|
|
|
|
| |
(#14115)
|
|
|
| |
Co-authored-by: cooldome <ariabushenko@bk.ru>
|
|
|
|
|
| |
* Set path to libSDL for NetBSD.
* Disable SFML test on NetBSD
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
checks (#13926)
* -d:checkabi obsolete (ABI check now enforced); add `addTypeHeader` helper
* cleanups
* import sizeof at CT for {.completeType.}
* address comments; revert default enabling of -d:checkAbi for now
* mimportc_size_check.nim => msizeof5.nim; merge mabi_check.nim into msizeof5.nim; refactor
* all pragmas in errmsgs should be written: '.importc' (un-ambiguous and less verbose than {.importc.})
|
|
|
|
| |
FreeBSD. (#14076)
|
|
|
|
| |
* figured out the wrong cycle trace proc problem
* cycle collector/break refactorings and minor improvements
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* base `parseEnum` on a case statement, fixes #14030
* apply simplifactions / clean up, remove `norm` node, use strVal
* export `normalize` in json.nim
* cmp using nimIdentNormalize, error at CT if ambiguous enum found
`nimIdentNormalize` provided by @cooldome.
We track all names of the branches we have created so far and error if
a duplicate is found.
Dummy change to make github react...
* fix docstring of `nimIdentNormalize`
* make `typ` arg `typedesc`, add lineinfo, call norm. only once
|
|
|
|
|
|
|
| |
* Support detection in docker container.
* Get only ID information in os-release.
* Add test to distros module.
* Fix Linux OS detection in Windows.
* Fix OS detection for FreeBSD and OpenBSD.
|
|
|
|
|
|
|
|
|
| |
* * relativePath(foo) now works
* relativePath(rel, abs) and relativePath(abs, rel) now work (fixes #13222)
* relativePath, absolutePath, getCurrentDir now available in more targets (eg: vm, nodejs etc)
* fix bug: isAbsolutePath now works with -d:js; add tests
* workaround https://github.com/nim-lang/Nim/issues/13469
* remove `relativePath(path)` overload for now
* add back changelog after rebase
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Working on OpenBSD CI
* Condense steps into 2 steps to make output easier to follow.
* Move up one directory after csources build.
* Remove FreeBSD build manifest and add OpenBSD test ignores for coroutines and hot code reloading.
* If runCI fails, run the test results script.
* Add email trigger for build failure
* Remove .git from repository URL
* Disable SFML test on OpenBSD
* Disable tgetaddrinfo on OpenBSD as only UDP and TCP protocols are supported.
* Remove getFilePermissions as it causes CI test failures with NimScript.
* Set clang as cc in nim.cfg and use gmake to build csources.
* Add getCurrentDir to nimscript.
* Remove duplicate getCurrentDir and check for not weirdTarget.
* Add CI badge for OpenBSD.
* Disable tests which allocate lots of memory for OpenBSD.
* Use `CORO_BACKEND_SETJMP` on OpenBSD rather than ucontext.
* Simplify building of koch
* Disable t8657 on OpenBSD. See issue #13760.
* Fix #12142 - tarray_of_channels fails on OpenBSD
* Disable thhtpclient_ssl and tosprocterminate on OpenBSD. These tests can be enabled at a later date after fixing them.
* Install libffi.
* Set path to libc for openbsd.
* Disable tevalffi for now.
* Remove tevalffi.nim.
* Use ncpuonline sysctl rather than ncpu.
* Disable tacceptcloserace and tasynchttpserver on OpenBSD.
* Enable tacceptcloserace and tasynchttpserver.
* Fix #13775 as suggested by @alaviss - use /bin/cat on OpenBSD rather than /bin/sh.
* Enable test on OpenBSD.
* Disable tflowvar on OpenBSD.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix mapIt issues #12625 & #12639:
1. fallback to call `map` when the result of `op` is a closure;
2. use `items(s)` in the for loop.
* fix test errors.
* add comments and InType is moved.
* fix ident.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* io: make file descriptors non-inheritable by default
This prevents file descriptors/handles leakage to child processes
that might cause issues like running out of file descriptors, or potential
security issues like leaking a file descriptor to a restricted file.
While this breaks backward compatibility, I'm rather certain that not
many programs (if any) actually make use of this implementation detail.
A new API `setInheritable` is provided for the few that actually want to
use this functionality.
* io: disable inheritance at file creation time for supported platforms
Some platforms provide extension to fopen-family of functions to allow
for disabling descriptor inheritance atomically during File creation.
This guards against possible leaks when a child process is spawned
before we managed to disable the file descriptor inheritance
(ie. in a multi-threaded program).
* net, nativesockets: make sockets non inheritable by default
With this commit, sockets will no longer leak to child processes when
you don't want it to. Should solves a lot of "address in use" that might
occur when your server has just restarted.
All APIs that create sockets in these modules now expose a `inheritable`
flag that allow users to toggle inheritance for the resulting sockets.
An implementation of `setInheritance()` is also provided for SocketHandle.
While atomically disabling inheritance at creation time is supported on
Windows, it's only implemented by native winsock2, which is too much for
now. This support can be implemented in a future patch.
* posix: add F_DUPFD_CLOEXEC
This command duplicates file descriptor with close-on-exec flag set.
Defined in POSIX.1-2008.
* ioselectors_kqueue: don't leak file descriptors
File descriptors internally used by ioselectors on BSD/OSX are now
shielded from leakage.
* posix: add O_CLOEXEC
This flag allows file descriptors to be open() with close-on-exec flag
set atomically.
This flag is specified in POSIX.1-2008
* tfdleak: test for selectors leakage
Also simplified the test by using handle-type agnostic APIs to test for
validity.
* ioselectors_epoll: mark all fd created close-on-exec
File descriptors from ioselectors should no longer leaks on Linux.
* tfdleak: don't check for selector leakage on Windows
The getFd proc for ioselectors_select returns a hardcoded -1
* io: add NoInheritFlag at compile time
* io: add support for ioctl-based close-on-exec
This allows for the flag to be set/unset in one syscall. While the
performance gains might be negliable, we have one less failure point
to deal with.
* tfdleak: add a test for setInheritable
* stdlib: add nimInheritHandles to restore old behaviors
* memfiles: make file handle not inheritable by default for posix
* io: setInheritable now operates on OS file handle
On Windows, the native handle is the only thing that's inheritable, thus
we can assume that users of this function will already have the handle
available to them. This also allows users to pass down file descriptors
from memfiles on Windows with ease, should that be desired.
With this, nativesockets.setInheritable can be made much simpler.
* changelog: clarify
* nativesockets: document setInheritable return value
* posix_utils: atomically disable fd inheritance for mkstemp
|