Commit Graph

72 Commits

Author SHA1 Message Date
ringabout
e17237ce9d prepare for the enforcement of std prefix (#22873)
follow up https://github.com/nim-lang/Nim/pull/22851
2023-10-29 14:48:11 +01:00
ringabout
8761599aad fixes #22763; nimcache in nim.cfg uses the relative path to the config file (#22764)
fixes #22763
2023-09-28 18:09:58 +02:00
ringabout
7be2e2bef5 replaces doAssert false with raiseAssert for unreachable branches, which works better with strictdefs (#22436)
replaces `doAssert false` with `raiseAssert`, which works better with strictdefs
2023-08-10 14:26:40 +02:00
ringabout
c513e37a70 fixes #22212; Compile error when running a Nimscript that compares se… (#22213)
fixes #22212; Compile error when running a Nimscript that compares seq with switch("mm", "arc")
2023-07-03 14:15:44 +02:00
ringabout
4533e894ad adds an experimental mm:atomicArc switch (#21798) 2023-05-08 16:25:47 +02:00
ringabout
d51a392149 replaces implicit passes array registed at runtime with explicit function calls; simplify compilation pipeline (#21444)
* abolish using passes in the compiler; simplify compilation pipeline

* duplicate code

* Really cool to have the same signature...

* haul

* unify other backends

* refactor process

* introduce PipelinePhase

* refactor compiler

* fixes passes

* fixes nimsuggest

* add a sentinel

* enable docs checkj

* activate doc testing

* clean up

* complete cleanups
2023-03-03 07:36:38 +01:00
Andreas Rumpf
852cf596ed fixes a strange issue most likely caused by a git merge (#20822) 2022-11-12 13:12:28 +01:00
flywind
7f6e800caf move assertions out of system (#19599) 2022-03-23 20:34:53 +01:00
Timothee Cour
d5b5827bc2 fix setCommand so it behaves like regular nim invocation (#18555) 2021-07-22 08:00:29 +02:00
Timothee Cour
52829fc8d1 cmdline: improve command processing (#16056) 2020-11-26 15:55:56 -08:00
Timothee Cour
c1664f93b0 new: nim -e:cmd to run a command directly; also fixes #15731 (#15687)
* new: `nim -i cmd`
* rename -i to -e (for eval); consistent with majority of other programing languages
* `nim e -e:cmd` now works; bugfix: `echo cmd | nim e -` now works
* honor --betterRun
* address comments
* --eval alias for -e (replaces undocumented --eval which was a noop)
* --eval now defaults to e (nimscript) instead of r
* address comment: remove -e, only keep --eval
* address comment
* fixup
* Update compiler/nimconf.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-11-09 16:07:22 +01:00
Andreas Rumpf
226595515c explicit ID generation for easier IC (#15559)
* refactoring: idents don't need inheritance
* refactoring: adding an IdGenerator (part 1)
* refactoring: adding an IdGenerator (part 2)
* refactoring: adding an IdGenerator (part 3)
* refactoring: adding an IdGenerator (part 4)
* refactoring: adding an IdGenerator (part 5)
* refactoring: adding an IdGenerator (part 5)
* IdGenerator must be a ref type; hello world works again
* make bootstrapping work again
* progress: add back the 'exactReplica' ideas
* added back the missing exactReplica hacks
* make tcompilerapi work again
* make important packages green
* attempt to fix the build for 32 bit machines (probably need a better solution here)
2020-10-25 08:50:47 +01:00
cooldome
91ce4515c8 fix gc:arc in nimscript (#15525) 2020-10-09 08:52:26 +02:00
Timothee Cour
45cac4afda fix #14179, fix #14142, make CI 1.4x faster (2x faster locally) (#14658)
* fix #14142: no more clash with: import os + use of existsDir/dirExists/existsFile/fileExists/findExe in config.nims

* remove a comment

* Revert "fixes the regression #12860 caused; hotfix"

This reverts commit 3d2459bdc0.

* Revert "Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims (#12860)"

This reverts commit d38853c504.

* noNimScript => noWeirdTarget + noNimJs
2020-06-16 08:56:12 +02:00
Neelesh Chandola
d38853c504 Undefine paramCount & paramStr in nimscript.nim for *.nims (#12860)
* Remove `paramStr` and `paramCount` from implicitly imported nimscript.nim
* Update changelog.md
* Update stable nimble commit hash

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-04-27 19:16:40 +02:00
Timothee Cour
1d665adecd [RFC] 'walkDir' now has a new 'checkDir' flag, to mimic behaviour of other languages (#13642)
Co-authored-by: narimiran
2020-03-20 16:39:55 +01:00
Timothee Cour
af9c852701 fix nim doc subdir/foo which was generating broken css; + other fixes (#13647)
* docgen: minor refactoring via docOutDir
* fix css for `nim doc subdir/foo` without --outdir nor -o
* tcompilesetting.nim: keep `git status` clean
* re-enable pkg nimgame2 that got fixed upstream
2020-03-17 13:44:37 +01:00
genotrance
bbc231f8e0 Fix #12676 (#13634) 2020-03-12 08:53:11 +01:00
Timothee Cour
ce36fdc897 correctly honor cmdline --hint:conf:on/off ; correctly show Conf hints in order 2020-02-27 13:22:18 +01:00
Araq
61ea85687c refactoring: --newruntime consists of 3 different switches 2019-10-20 08:11:07 +02:00
Araq
3255b55266 fixes #11675 2019-09-08 13:08:41 +02:00
Andreas Rumpf
8397554315 fixes #12125 (#12131)
* fixes #12125
2019-09-06 07:23:59 +02:00
Araq
07d465ca42 [refactoring] remove unused imports in the compiler and in some stdlib modules 2019-07-18 00:36:03 +02:00
Kaushal Modi
7182922622 [feature] Added os.delEnv; add delEnv support to nimscript too (#11466)
[feature] Fixes https://github.com/nim-lang/Nim/issues/11452.
2019-06-15 11:32:26 +02:00
genotrance
c707267212 Add stdin read support to nimscrit #3983 (#10292) 2019-01-14 09:26:10 +01:00
Andreas Rumpf
d1b7aa28e7 fixes #10240 (#10269)
* kochdocs.nim: code cleanup

* fixes #10420
2019-01-11 15:55:16 +01:00
Araq
6acffcd28f incremental compilation: simple recompilation works 2018-11-19 17:16:52 +01:00
Andreas Rumpf
73c306258b Nimscript: fixes #9246 [backport] 2018-11-06 21:55:13 +01:00
Solitude
027a11d7c8 Add procs to retrieve project name, directory and full path to nimscript (#9274) 2018-10-11 09:56:12 +02:00
Timothee Cour
77f836b403 fix #9264 regression (#9265) 2018-10-09 23:48:27 +02:00
Andreas Rumpf
86556ebfdb compiler refactoring; use typesafe path handing; docgen: render symbols between modules 2018-09-07 19:21:16 +02:00
Timothee Cour
ed0cb7b85d make config.nims behave like nim.cfg in terms of where these scripts are searched / run (#8682)
* run project config.nims if exists, then inputfile.nims if exists
* ~/.config/nim/config.nims can now be used
* also check in getSystemConfigPath for config.nims
* refactor handleCmdLine for nim and nimsuggest
2018-08-30 13:52:32 +02:00
alaviss
7898f2a785 scriptconfig: register passes once (#8590)
fixes #8235
2018-08-17 11:09:33 +02:00
Andreas Rumpf
dae5450947 WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
Andreas Rumpf
826c1e2d78 incremental compilation: implemented basic replay logic 2018-06-02 09:41:27 +02:00
Andreas Rumpf
b92fcacb99 more compiler API cleanups 2018-05-28 23:48:25 +02:00
Andreas Rumpf
382bc34f93 vm now free of global variables 2018-05-28 14:41:49 +02:00
Andreas Rumpf
40ec7be45c refactoring: remove idents.legacy global variable and pass the IdentCache around explicitly 2018-05-27 22:09:15 +02:00
Andreas Rumpf
669a564492 remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
Andreas Rumpf
342e50e26c compiler compiles again; simple programs do work 2018-05-13 08:51:11 +02:00
Andreas Rumpf
61e57cfa13 big refactoring: parser compiles again 2018-05-10 10:49:51 +02:00
Andreas Rumpf
b7116a28ee compiler refactoring, pass config around explicitly 2018-05-05 18:47:29 +02:00
Andreas Rumpf
ee366f1746 .experimental can now be used to enable specific features 2018-04-24 09:34:29 +02:00
Oscar Nihlgård
f6df2d9956 Sub second time resolution (#6978)
* Add deprecation warnings to recently deprecated procs

* Fix bad usage of the times module

* Introduce sub second resolution

* Fix usage of C's time()

* Switch to nanosecond resolution

* Make Time & Duration opaque again and fix some errors

* Change back to TimeInterval for shorthands

* Fix JS test

* Fix build error for windows

* Undeprecate epochTime

* Documentation and minor changes

* Lots of bugfixes and doc comments

* Attempt to make travis & appveyor green

* Fix edge cases for dealing with the local timezone

* Workaround JS backend overflow/underflow bug

* Use better workaround for not knowing the size of time_t

* Use all available timezones for tests

* Fix indentation

* Add procs for accessing the fractional part of a duration

* Order time units from smallest to largest since it makes more sense

* Include months and years in `TimeUnit`

* Review fix
2018-04-13 07:36:30 +02:00
genotrance
f6c8f97fe8 Add a few useful os calls to nimscript (#7442) 2018-04-10 18:50:23 +02:00
cooldome
4790b6d63f Fixes 7283 (#7284) 2018-03-05 19:06:47 +01:00
Araq
77d56aaff6 cleanup times.nim 2017-12-21 10:11:45 +01:00
Lynn C. Rees
8fbe37b2d8 Show nimscript configuration files during compilation (#6750) 2017-11-28 14:16:59 +01:00
Andreas Rumpf
0895064983 getEnv now supports a 'default' parameter; refs #6019 2017-10-30 17:21:05 +01:00
Arne Döring
92c2a51bf7 removed compiler internal list implementation (#5371) 2017-02-22 17:33:12 +01:00