Commit Graph

6585 Commits

Author SHA1 Message Date
Timothee Cour
2d404a5a24 undo last commit (meant to send a PR instead) 2018-12-18 22:42:19 -08:00
Timothee Cour
7b9ba71b47 Update osproc.nim 2018-12-18 22:39:08 -08:00
Timothee Cour
25d3539da7 [os] fix #10017 regression, fix #10025 regression (#10018)
* [os] fix #10017 regression
* [os] fix #10025 regression
2018-12-18 12:43:25 +01:00
Andreas Rumpf
d7d17d5ab0 see what breaks with a global config.nims (#10016)
* see what breaks with a global config.nims

* make tests green with a global config.nims file
2018-12-18 09:29:15 +01:00
Timothee Cour
c4e3c4ca2d add getCurrentCompilerExe to vmops (eg allows to get nim compiler at CT); add tests for vmops (#9925) 2018-12-18 09:07:12 +01:00
Araq
09b9a54418 make tests green with a global config.nims file 2018-12-17 23:03:54 +01:00
Istvan
915a9ec082 Adding more documentation to logging.nim
Just minor addition to the documentation with the use of operators
2018-12-17 19:29:08 +01:00
Araq
9526009e0e fixes #9120 2018-12-16 20:34:07 +01:00
Araq
d91d1865b8 fixes #9420 2018-12-16 20:11:04 +01:00
Araq
d66eb04ce9 fixes #8991, fixes #4446 2018-12-16 19:22:49 +01:00
Araq
7ec77684e9 fixes #9153 2018-12-16 19:17:09 +01:00
alaviss
50193b95ea fix experimental/diff documentation rendering (#9983)
also remove references to non-existant parameters
2018-12-15 14:10:44 +01:00
Andreas Rumpf
e3a668a33b --gc:destructors: baby steps 2018-12-15 13:54:41 +01:00
c-blake
a54e3f4602 Allow an escape hatch for platform specific flags/default override (#9968)
* Allow an escape hatch for platform specific flags (of which there are many,
for example MAP_POPULATE itself is a Linux-only thing, not other Unix).

Continue with same defaults as before in this commit, but that really
should be changed to *not* include MAP_POPULATE.  While pre-faulting
all the pages can be useful sometimes *if* you know you're going to
access all the data, it is highly unlikely to be what users expect the
default to be.  For some things all that up front work is 1000s of
times slower than being lazy/on-demand/only ever faulting parts of the
file.  Even the MAP_POPULATE fan who originally in 2014 committed to
this file defaulted it to off (but turned it always-on as a "temporary"
work around for some long since gone/mutated compiler issue).

Anyway, at least something like this `mapFlags` gives users the ability
to override the poor default choice or activate any other idiosyncratic
platform-specific features.

* Use simple, efficient default flags, but also accept whatever the open/mapMem
caller specifies.  Save flags in MemFile so they can be used in `resize`.

This field should not need exporting like the others -- callers can always
save whatever values they pass -- but we include a cautionary comment in
case anyone ever asks for a `*` there, as well as for documentation.

Also make documentation for ``mapFlags`` in open more likely to inspire care.
2018-12-14 11:44:11 +01:00
Araq
3ba8f158fb added parseopt.remainingArgs; refs #9951 2018-12-14 11:41:19 +01:00
Araq
359a4b5fac timers.nim: avoid parser warning 2018-12-14 09:56:43 +01:00
Araq
ce9815bcf5 os.nim: use the new pathnorm.normalizePath implementation 2018-12-14 08:57:55 +01:00
Araq
5b39c7aca9 fixes joinPath regressions 2018-12-13 16:19:00 +01:00
Araq
9cc4a57768 os.nim: big refactoring, use the new pathnorm that was extracted by compiler/pathutils.nim; added os.relativePath 2018-12-13 12:05:50 +01:00
Neelesh Chandola
a3c4791e9c Give error when case has an else branch even though all cases are already covered (#9930)
* Give error when case has an else branch even though all cases are already covered.
* Don't check for invalid else for type tyFloat..tyFloat128, tyString, tyError
* Remove unnecessary else in unittest.nim
* Fix sockets.nim
2018-12-13 09:08:10 +01:00
Dominik Picheta
76c214a2e9 Merge pull request #9915 from zevv/asyncnet-unix
Added basic AF_UNIX support to asyncnet.
2018-12-12 23:06:08 +00:00
Araq
ac8274c60f fix merge conflict 2018-12-12 17:51:33 +01:00
Araq
eb8383cb28 move diff.nim to experimental 2018-12-12 17:48:30 +01:00
Andreas Rumpf
9f453592a4 Merge pull request #9552 from recloser/strmisc-doc
Add runnableExamples for strmisc procs and a better doc for expandTabs
2018-12-12 16:32:09 +01:00
Andreas Rumpf
a1bf9fd2b6 Merge branch 'devel' into sorted_deduplicate 2018-12-12 16:29:46 +01:00
Araq
f080a15da1 diff.nim: massive code cleanups 2018-12-12 16:17:35 +01:00
Araq
9ce21bb8de Merge branch 'std-diff' of https://github.com/krux02/Nim into krux02-std-diff 2018-12-12 15:43:03 +01:00
Araq
f828e5da49 clean up the implementation of the new memfiles.resize 2018-12-12 12:10:17 +01:00
Araq
77a884f178 export every field of MemFile for more low level trickery; refs #9922 2018-12-12 12:03:57 +01:00
Andreas Rumpf
cddc4be209 Merge pull request #9922 from c-blake/devel
Let handles be seen outside of `memfiles` module so that "updating"
2018-12-12 12:00:12 +01:00
Flaviu Tamas
c0a47f7e22 Rework nil/option for nre in light of ""==nil
Fixes #9243
2018-12-11 22:15:57 +00:00
Flaviu Tamas
22b3e9df27 Revert 7f49364fd0 for nre 2018-12-11 22:15:02 +00:00
Andreas Rumpf
5dc83d0c8f cleanup of excpt.nim 2018-12-11 23:04:49 +01:00
Andreas Rumpf
239846a528 Merge pull request #9805 from pacien/181126-list-append
add SinglyLinkedList.append procs
2018-12-11 22:18:40 +01:00
Andreas Rumpf
e3d91a5b74 Merge pull request #9923 from stefantalpalaru/calldepth
replace misleading "stack overflow" message when reaching Nim's call depth limit
2018-12-11 22:07:44 +01:00
Andreas Rumpf
bb1ce398af Merge pull request #9881 from timotheecour/pr_ref_9880
refs #9880 show index and bound in lots of `index out of bounds` errors
2018-12-11 21:49:08 +01:00
Araq
3b783f7e13 Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
Arne Döring
199018ef2e test can fail because of invalid spec 2018-12-11 21:23:20 +01:00
Charles Blake
b92594572e For now just implement resize per https://github.com/nim-lang/Nim/pull/9922
discussion (with special mremap usage on Linux, but ordinary munmap, mmap on
other POSIX).  Someone needs to do the when windows branch.
2018-12-11 14:57:28 -05:00
Charles Blake
369ac2dd2d Address dom96/Araq opinions in https://github.com/nim-lang/Nim/pull/9922
Updating accessors are also provided since the idea of this change is to
allow "updating" operations external to the module which are by their very
nature closely tied to module internals (as well as to OS interface details).
2018-12-11 10:27:27 -05:00
Andreas Rumpf
3177aee75f Merge pull request #9910 from nc-x/fix-semicolon
Fixes #9907
2018-12-11 12:26:23 +01:00
Neelesh Chandola
5aba5875da Address Comments 2018-12-11 10:44:43 +05:30
Ștefan Talpalaru
497e8c41e8 replace misleading "stack overflow" message on call depth limit
The new error message looks like this:
"Error: call depth limit reached in a debug build (2000 function calls).
You can change it with -d:nimCallDepthLimit=<int> or switch to a release
build with -d:release."
2018-12-10 19:35:37 +01:00
Charles Blake
740c5b13ea Let handles be seen outside of memfiles module so that "updating"
operations (like eg., resizing a file and re-mapping) do not need
to worry about race conditions of re-opened paths, renamed parent
directories and that sort of thing.  Operating directly on already
open handles is both safer and more efficient than relying upon the
stability of filesystem paths.
2018-12-10 11:40:08 -05:00
Timothee Cour
f3ecc15a94 refs #9880 show index and bound in lots of index out of bounds errors 2018-12-09 16:50:45 -08:00
Ico Doornekamp
71e9fff364 Added basic AF_UNIX support to asyncnet.
Unfortunately this required some code duplication because the
doConnect() from asynccommon.nim only works with addrInfo which does not
make sense for AF_UNIX.

makeUnixAddr() was moved to nativesocket.nim and exported
2018-12-09 20:53:05 +01:00
Andreas Rumpf
981dcc6b9a Merge pull request #9890 from nim-lang/remove-asynccommon
Merge async common into asyncdispatch.
2018-12-09 13:00:10 +01:00
Neelesh Chandola
abdfbd07a5 Fixes #9907 2018-12-09 10:35:30 +05:30
Oscar Nihlgård
0a749f1a37 Make options.UnpackError inherit from system.Defect 2018-12-08 10:04:53 +01:00
Dominik Picheta
775bfb3e8d Merge async common into asyncdispatch. 2018-12-07 22:47:10 +00:00