| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* adding new system module sysexitprocs and including system exit procedures when registering exit handlers defined in userland
* fixing failing tests and adding initialization guard to handle cases where the module's global init logic isn't invoked first as is the case with some gc implementaions
* js backend shouldn't try to invoke actual system exit procs
* fixing formatting in sysexitprocs.nim
* 256 was too much - my max number of plugins in my engine is 64 and I require two hooks per runtime it looks like with tls emulation turned off, so for my purposes 128 should be sufficient
* so atExit should be enough here, can get rid of all the extra cruft I had added on top since I didn't realize atExit already provided a stack
* done being cute - since newruntime prevents correct cpp codegen for object variants apparently and breaks tests if I try to use std/exitprocs, ddSysExitProc is just going into both modules. Since system doesn't include system/io, polluting system with it doesn't make sense either... at least it is only importc'd when it is required in either module and we don't have to have any weird when defined(nimOwnedEnabled) with a comment explaining why
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix #19052; [backport:1.6.0]
Adds a compile flag to avoid a getrandom syscall, fixing #19052.
This is neccesary when the getrandom syscall is missing, as noted in #19052, particularly in kernel versions < 3.17 when getrandom was introduced. Specifically relevant is this is missing from kernel 3.10, which is the supported kernel throughout RHEL 7 and CentOS 7, which is widely used at many organizations. Without this, versions of nim that include sysrand (i.e. versions >= 1.6.0) will not compile without modification, however with this change a compile flag may be used to fall back using /dev/urandom as done with any unknown Posix OS (preferred here as a fallback since it already supplies a cryptographically secure PRNG and existing code deals with entropy pool init, etc).
The change is placed behind a compile flag, as discussed in github ticket #19052 (summed up here):
* First, I can't seem to catch that a importc such as SYS_getrandom is declared without using it (the declared proc returns true, but compiler throws an undeclared identifier flag when referencing it).
* Second, it seemed preferable to be behaviorally explicit vs implicit when considering this is intended to be a cryptographically secure PRNG.
* Third, if I intend to compile on a kernel >= 3.17 while running the binary on at least one system < 3.17, I'll want to be able to target this without relying on a compile time determination if the getrandom syscall is available.
* Documenting compile flag for -d:nimNoGetRandom and adding changelog entry
Related to #19052 and comments in PR #19053. Also created a new changelog file since none currently exists.
Co-authored-by: Timothy Alexander <talexander@midwestlabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* deinitializing locks at program exit
* deinitLock shouldn't be called for js backend I guess...
* I suppose this is the best way to detect the
ewruntime option
* I guess I need these guards here too...
* fixing merge conflict
|
| |
|
|
|
|
|
| |
* enable nimPreviewJsonutilsHoleyEnum [backport]
* docuement nimPreviewJsonutilsHoleyEnum
|
|
|
|
|
| |
* unify comments
* more
|
|
|
|
|
| |
* rename licence
* spaces
|
| |
|
|
|
|
|
| |
* remove channels
* test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix initrand to avoid random number sequences overlapping
* Minor fix
* Fix compile error on js backend
* Disable new test for js backend
* Minor fix
* tempfiles module uses random.initRand()
* Remove unused module import from lib/std/tempfiles.nim
* Initialize baseState in initRand()
* Run tests/stdlib/trandom.nim from tests/test_nimscript.nims
* baseState is initialized only with sysrand.urandom and quit if failed
* Add comments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes #17369
* megatest is green for --cpu:arm64
* docgen output includes more tags/raises
* implemented 'effectsOf'
* algorithm.nim: uses new effectsOf annotation
* closes #18376
* closes #17475
* closes #13905
* allow effectsOf: [a, b]
* added a test case
* parameters that are not ours cannot be declared as .effectsOf
* documentation
* manual: added the 'sort' example
* bootstrap with the new better options
|
| |
|
|
|
|
|
|
|
| |
on windows) (#18729)
* close #17898
* no need to consider js
|
|
|
|
|
|
|
|
| |
* improvements to $(SomeInteger) and addInt
* remove mIntToStr, mInt64ToStr
* improvements
* fix tests/pragmas/tinjectstmt.nim; the diff is harmless, cgen code is identical with -d:danger or debug mode
* rm tests/system/tstrmantle.nim
* revert compiler/jsgen.nim for -d:nimVersion140
|
| |
|
|
|
|
|
|
| |
* Add optional recursive arg to distinctBase
* Add docs and examples
Co-authored-by: ALANVF <alan.invents@gmail.com>
|
|
|
|
| |
to avoid confusion with unrelated std/vmutils (#18660)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove unnecessary environment tracking
* try to fix windows
* fix delEnv
* make putEnv work on windows even with empty values; improve tests: add tests, add js, vm testing
* [skip ci] fix changelog
Co-authored-by: Caden Haustein <code@brightlysalty.33mail.com>
|
|
|
|
|
|
|
|
|
|
| |
* [enumutils] provide node kind for `Invalid node type` error
* [enumutils] add support for nnkAccQuoted in `genEnumCaseStmt`
For reasons unknown to me, when running `nim doc` on a file that uses
`parseEnum` with an enum that contains accented quotes errors at CT
with the `Invalid node for type` error. Further errors are raised,
probably because the enum parsing fails?
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented support for Nimble local cache with package directories with
a checksum of the package at the end of their names. Now the compiler
supports package paths in the form:
* /path_to_nimble_cache_dir/pkgs/package_name-1.2.3-
FEBADEAEA2345E777F0F6F8433F7F0A52EDD5D1B
* /path_to_nimble_cache_dir/pkgs/package_name-#head-
042D4BE2B90ED0672E717D71850ABDB0A2D19CD2
* /path_to_nimble_cache_dir/pkgs/package_name-#branch-name-
DBC1F902CB79946E990E38AF51F0BAD36ACFABD9
Related to nim-lang/nimble#127
|
|
|
|
|
|
|
| |
semantics (#18435)
* wrapnils now generates optimal code; also handles case objects
* changelog
* unsafeAddr => addr
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Simplify addInt, remove digits10
Co-authored-by: Charles Blake <charlechaud@gmail.com>
* Fix bootstrapping
* Add noInit to tmp array
* noInit -> noinit
Co-authored-by: Charles Blake <charlechaud@gmail.com>
|
|
|
|
|
| |
* docs now show nimExperimentalX APIs
* fix for windows
|
|
|
|
|
|
|
| |
* enable VM tracing in user code via `{.define(nimVmTrace).}`
* add vmutils.vmTrace
* add vmTrace
|
| |
|
|
|
|
|
| |
SIGSEGV (#18260)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
| |
info to successx, add gc to compilesettings (#18252)
* merge BuildMode into SuccessX, add more info
* refactor duplicated with drnim
* fixup
* address comment
|
| |
|
|
|
|
|
| |
* up to 20x faster jsonutils deserialization
* noinline
|
|
|
|
|
|
| |
* simplify extccomp.nim json logic via jsonutils
* fix #18084
* simplify further
* workaround for bootstrap that can be removed after updating csources_v1 >= 1.2
|
| |
|
|
|
|
|
| |
* jsonutils.toJson now serializes JsonNode as is (without deep copy nor treating it as a regular ref object)
* JsonNodeMode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
symbolName; add symbolRank (#18029)
* jsonutils: add customization for toJson via `ToJsonOptions`
* add enumutils.symbolRank
* lookup table implementation for HoleyEnum
* cleanup
* changelog
* fixup
* Update lib/std/jsonutils.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
invalid json (#18026)
* fix #18007: std/json now serializes nan,inf,-inf as raw strings instead of invalid json
* fix roundtrip
* fix tests
* fix changelog
* simplify
* add runnableExamples
* fix typo [skip ci]
|
|
|
|
|
|
|
|
|
| |
* ORC: progress
* ORC: bugfix; don't follow acyclic data even if only at runtime the subtype is marked as acyclic
* progress
* minor style changes
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* improve std/tempfiles
* fixup
* fix windows
* improve test
* improve runnableExamples and tests
* address comment
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
runnableExamples to system (#17896)
* misc fixes
* add runnableExamples for compileOption
* add runnableExamples for runnableExamples
* move tconsteval => tconst
* cleanup
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expected vs gotten (#17892)
* gitutils: add diffStrings, diffFiles, and use it in testament to compare expected vs gotten
* refactor with createTempDir
* cleanup
* refacotr
* PRTEMP fake test spec changes to show effect of diffStrings
* add runnableExamples for experimental/diff + cross-reference with gitutils
* Revert "PRTEMP fake test spec changes to show effect of diffStrings"
This reverts commit 57dc8d642dce6c1127c98b7cbc9edbfe747d4047.
|
|
|
|
|
|
|
|
|
|
|
| |
tempfiles.createTempFile (#17889)
* fix #17888: remove undefined behavior for posix.open; fix tempfiles.createTempFile
* fix for tests/async/tasyncfile.nim
* hide mode for now
* add notice regarding stability
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* refactor all code that builds csources
* fixup
* nim_csourcesDir_v0 + nim_csourcesDir
* remove deprecated, unused scripts from ci/
* reuse nimCsourcesHash in ci
* simplify CI pipelines by reusing nimBuildCsourcesIfNeeded
* simplify ci_docs.yml by reusing nimBuildCsourcesIfNeeded
* cleanup
* use csources_v1 as destination dir
* fixup
* remove pushCsources
* address comment: remove build.sh support for now
* fixup
|
|
|
|
| |
* close #9372 add std/tempfile
|