summary refs log tree commit diff stats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* nimgrep: add `--inContext` and `--notinContext` options (#19528)Andrey Makarov2022-09-141-71/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | * nimgrep: add `--matchContext` and `--noMatchContext` options * Rename options for uniformity * Revise option names, add `--parentPath` options * Revert --bin deprecation * Copy-paste an original test from quantimnot The origin was: https://gist.githubusercontent.com/quantimnot/5d23b32fe0936ffc453220d20a87b9e2/raw/96544656d52332118295e55aa73718c389e5d194/tnimgrep.nim * Change ! to n * Attempt to fix test * Fix test on Windows * Change --contentsFile -> --inFile, add more tests * Bump * Change --parentPath to --dirpath
* Cleanup dochack (#20299)Amjad Ben Hedhili2022-09-041-88/+36
| | | | | | | * Cleanup dochack * xxx * More cleanups
* remove deprecated type pragma syntax, fix bugs that required it (#20199)metagn2022-09-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | * remove deprecated pragma syntax from 0.20.0 closes #4651, closes #16653 with a cheap fix for now due to how early `tfFinal` is set * remove type pragma between name and generics * undo removal, try removing bind expression (0.8.14) * fix test, unremove bind expr * remove again * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * dependencies @ HEAD & weave test dependencies * try fix package ci Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fix `nim md2tex` and `koch pdf` commands (#20280)Andrey Makarov2022-08-281-11/+11
| | | | | * fix `nim md2tex` and `koch pdf` commands * change rst2tex -> md2tex also
* Docs auto dark mode (#20188)Amjad Ben Hedhili2022-08-211-26/+14
| | | | | | | | | | | | | * Implement auto dark mode * Rename class * Fix borders cutout * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* make sure tools/heapdumprepl.nim continues to compile (#20146)ringabout2022-08-191-4/+2
|
* make implicit cstring conversions explicit (#19488)ee72022-08-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Build compiler with --noNimblePath (#20168)Ivan Yonchovski2022-08-091-1/+1
| | | - Fixes https://github.com/nim-lang/Nim/issues/18840
* niminst: support DESTDIR and quote variables (#20051)Anna2022-07-181-42/+45
| | | | | * niminst: support DESTDIR (fix #9788) * niminst: quote variables
* Improve Markdown code blocks & start moving docs to Markdown style (#19954)Andrey Makarov2022-07-151-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add additional parameters parsing (other implementations will just ignore them). E.g. if in RST we have: .. code:: nim :test: "nim c $1" ... then in Markdown that will be: ```nim test="nim c $1" ... ``` - implement Markdown interpretation of additional indentation which is less than 4 spaces (>=4 spaces is a code block but it's not implemented yet). RST interpretes it as quoted block, for Markdown it's just normal paragraphs. - add separate `md2html` and `md2tex` commands. This is to separate Markdown behavior in cases when it diverges w.r.t. RST significantly — most conspicously like in the case of additional indentation above, and also currently the contradicting inline rule of Markdown is also turned on only in `md2html` and `md2tex`. **Rationale:** mixing Markdown and RST arbitrarily is a way to nowhere, we need to provide a way to fix the particular behavior. Note that still all commands have **both** Markdown and RST features **enabled**. In this PR `*.nim` files can be processed only in Markdown mode, while `md2html` is for `*.md` files and `rst2html` for `*.rst` files. - rename `*.rst` files to `.*md` as our current default behavior is already Markdown-ish - convert code blocks in `docgen.rst` to Markdown style as an example. Other code blocks will be converted in the follow-up PRs - fix indentation inside Markdown code blocks — additional indentation is preserved there - allow more than 3 backticks open/close blocks (tildas \~ are still not allowed to avoid conflict with RST adornment headings) see also https://github.com/nim-lang/RFCs/issues/355 - better error messages - (other) fix a bug that admonitions cannot be used in sandbox mode; fix annoying warning on line 2711
* Enable nim-lang to build correctly on illumos-based systems (#19952)Sam Zaydel2022-06-301-1/+1
|
* Extend and document compiler debugging utilities (#19841)quantimnot2022-06-102-0/+79
| | | | | | | | | * Add two debugutils procs that native debuggers can break on use to execute commands when code of interest is being compiled. * Add GDB and LLDB programs to disable and enable breakpoints and watchpoints when code of interest is being compiled. * Extend the `intern.rst` docs regarding debugging the compiler. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* Always use httpclient in nimgrab (#19767)Yardanico2022-05-172-459/+9
|
* rewrite docs JS in Nim (#19701)flywind2022-04-091-1/+35
| | | | | | | * rewrite docs JS in Nim * fixup * fix nimdoc/rsttester
* Fix CPU detection for i386 (#19577)VlkrS2022-03-031-1/+1
| | | | | | | | | | * Fix CPU detection for i386 Commit 787def271b1cabc6f898caa42f892125de9fa908 breaks CPU detection for i386 on OpenBSD and probably on other platforms. [ isOpenIndiana -eq "yes" ] always returns 0, so mycpu is always set to "amd64". * Update buildsh.nimf Fix accidental bashism
* Remove define for jsfetch (#19530)Juan Carlos2022-02-251-1/+1
| | | | | | | | | * Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch * Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch * Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch * Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch
* move io out of system (#19442)flywind2022-02-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * move io out of system * fix tests * fix tests * next step * rename to syncio * rename * fix nimscript * comma * fix * fix parts of errors * good for now * fix test
* Improve Zshell completion (#19354)Andrey Makarov2022-01-181-144/+114
|
* Fix build on FreeBSD/powerpc (#19282)pkubaj2021-12-221-2/+4
| | | It's currently misdetected as powerpc64.
* Add icon for Nim (#19258)snxx2021-12-173-0/+0
| | | | | | | * Add Nim's file icon * Add installer icon * Add uninstaller icon
* Add support for LoongArch (#19223)wenghongquan2021-12-093-0/+6
| | | | | | | * Add support for LoongArch * Update compiler/installer.ini Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* renamed 'gc' switch to 'mm'; [backport:1.6] (#19187)Andreas Rumpf2021-11-241-1/+1
| | | | * renamed 'gc' switch to 'mm'; [backport:1.6] * better docs
* fix nimindexterm in rst2tex/doc2tex [backport] (#19106)Andrey Makarov2021-11-091-0/+6
| | | | | * fix nimindexterm (rst2tex/doc2tex) [backport] * Add support for indexing in rst
* docstyle.rst: Do not export it to HTML as a standalone doc (#19083)Kaushal Modi2021-11-021-1/+4
| | | | | .. This doc is included in contributing.rst. Fixes https://github.com/nim-lang/Nim/issues/14593.
* Docs: change clipboard cursor type to `pointer` (#19064)ynfle2021-10-281-1/+2
|
* feat: copy to clipboard (#18963)Abishek PY2021-10-221-0/+56
| | | | | | | | | | | * feat: copy to clipboard * fix: CI failure related issue * fix: CI failure issue * fix: copy to clipboard button bug * feat: copy pragmadots value to clipboard
* Add Elbrus 2000 architecture (#19024)Danil Yarantsev2021-10-213-0/+6
| | | | | | | | | * Add Elbrus 2000 architecture * Add e2k to niminst * Update compiler/installer.ini Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* add OpenIndiana to list (#18972)antonl052021-10-091-1/+11
| | | | | * add OpenIndiana support * point sunos to solaris
* Fixed `strictFuncs` support for `std/pegs` (#18951)quantimnot2021-10-071-3/+8
| | | | | | | | | | | | | | | | | * Fixed `strictFuncs` support for `std/pegs` Enabled `std/pegs` in the `strictFuncs` import test. Fixes #18057 Fixes #16892 See #18111 * Rebased from `devel` * Conditionally compile `std/pegs` in `koch` This is for supporting `csources` bootstrap. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* [tools] use the right parameter [backport:1.0] (#18957)flywind2021-10-061-1/+1
|
* Fixes build_all.sh failing on Nimble builds (#18945)Dominik Picheta2021-10-031-3/+3
| | | | | | | | | | | | | | | | | | | | | When running `build_all.sh` I was getting: ``` bin/nim c -o:bin/nimsuggest -d:danger --skipUserCfg --skipParentCfg --hints:off nimsuggest/nimsuggest.nim bin/nim c -o:bin/nimgrep -d:release --skipUserCfg --skipParentCfg --hints:off tools/nimgrep.nim bin/nim c -o:bin/nimpretty -d:release --skipUserCfg --skipParentCfg --hints:off nimpretty/nimpretty.nim bin/nim c -o:bin/testament -d:release --skipUserCfg --skipParentCfg --hints:off testament/testament.nim bin/nim c -o:bin/nim_dbg --opt:speed --stacktrace -d:debug --stacktraceMsgs -d:nimCompilerStacktraceHints --skipUserCfg --skipParentCfg --hints:off compiler/nim.nim bin/nim c -o:bin/atlas -d:release --skipUserCfg --skipParentCfg --hints:off tools/atlas/atlas.nim /home/dom/.choosenim/toolchains/nim-#devel/koch.nim(722) koch /home/dom/.choosenim/toolchains/nim-#devel/koch.nim(149) bundleNimbleExe /home/dom/.choosenim/toolchains/nim-#devel/tools/deps.nim(32) cloneDependency /home/dom/.choosenim/toolchains/nim-#devel/lib/pure/os.nim(1438) setCurrentDir /home/dom/.choosenim/toolchains/nim-#devel/lib/pure/includes/oserr.nim(95) raiseOSError Error: unhandled exception: No such file or directory Additional info: '/home/dom/.choosenim/toolchains/nim-#devel/dist/nimble' [OSError] ``` With this patch it builds.
* Add armv8l support (Closes: #18898) (#18901) [backport]Federico Ceratto2021-09-272-1/+4
|
* ported Nim to proprietary CrossOS [backport] (#18889)Andreas Rumpf2021-09-241-0/+5
|
* atlas: added --cfgHere switch [backport] (#18873)Andreas Rumpf2021-09-201-6/+19
|
* Clarify unknown processor error (#18829)Federico Ceratto2021-09-091-1/+1
|
* Atlas: added 'extract' command, as promised (#18813)Andreas Rumpf2021-09-061-1/+9
|
* formal grammar updates [backport:1.2] (#18803)Andreas Rumpf2021-09-041-0/+1
|
* followup #18711 grammar_nanny now reports unused non-terminals (#18746)Timothee Cour2021-08-261-1/+5
| | | | | | | * followup #18711 cleanup unused grammar rules * make tools/grammar_nanny.nim report unused terminals * revert removal of some grammar comments
* Implement RFC-391 (#18585)Juan Carlos2021-08-221-1/+1
|
* Remove unused imports, and deprecated function usage (#18663)Kyle Brown2021-08-112-2/+1
| | | | | | | * clean up imports and slice to remove delete * revert buggy code * Replace "delete" with setlen to remove depreciation warning
* make proc names consistent (#18626)flywind2021-08-012-2/+2
| | | | | * rename `endswith` to `endsWith` * rename
* Modify atlas test for short commit hashes (#18619)Antonis Geralis2021-07-303-4/+2
| | | | | | | * test commit hashes support * Update testdata.nim * remove extra newlines
* atlas tool: testing via mocking (#18588)Andreas Rumpf2021-07-2612-58/+385
| | | | | * atlas: refactoring * Atlas: do some basic testing via mocking
* atlas: minor changesAraq2021-07-211-2/+2
|
* attempt to support short commit hashes (#18514)Antonis Geralis2021-07-181-5/+16
| | | | | | | | | * attempt to support short commit hashes Not sure if that's the correct way and what happens when the short hash matches "head" * need to remove # * Output needs to be stripped of newlines
* added Atlas helper tool (#18497)Andreas Rumpf2021-07-165-0/+744
| | | | | * added Atlas helper tool * further improvements
* [source code filter]fix Nightlies bug (#18475)flywind2021-07-121-1/+1
| | | | | * workaround Nightlies bug * Update tools/niminst/makefile.nimf
* fix shebangs #! /xxx => #!/xxx (#18444)Timothee Cour2021-07-074-4/+4
|
* fix compilation on Debian 7 (no git -C) (#18427)Andrey Makarov2021-07-063-4/+10
| | | | | | | | | | | | | | | | | | | | | | * fix compilation on Debian 7 (no git -C) * address review * allow specify branch for testing unmerged csources * temporarily change csources checkout parameters for testing * Update tools/deps.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * fix failure * Update config/build_config.txt * set proper git branch/hash Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* `./koch tools` now builds bin/nim_dbg, a debug version of nim (#18289)Timothee Cour2021-06-281-2/+3
|