Commit Graph

711 Commits

Author SHA1 Message Date
Anna
2549d398a9 niminst: support DESTDIR and quote variables (#20051)
* niminst: support DESTDIR (fix #9788)

* niminst: quote variables
2022-07-18 21:22:53 +02:00
Andrey Makarov
417b90a7e5 Improve Markdown code blocks & start moving docs to Markdown style (#19954)
- 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
2022-07-15 19:27:54 +02:00
Sam Zaydel
306810a748 Enable nim-lang to build correctly on illumos-based systems (#19952) 2022-06-30 23:16:50 +02:00
quantimnot
6f4bacff67 Extend and document compiler debugging utilities (#19841)
* 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>
2022-06-10 20:40:08 +02:00
Yardanico
06f02bb771 Always use httpclient in nimgrab (#19767) 2022-05-17 09:56:39 +02:00
flywind
ded8b0e541 rewrite docs JS in Nim (#19701)
* rewrite docs JS in Nim

* fixup

* fix nimdoc/rsttester
2022-04-09 17:50:57 +02:00
VlkrS
488e18f90d Fix CPU detection for i386 (#19577)
* Fix CPU detection for i386

Commit 787def271b 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
2022-03-03 14:41:35 +01:00
Juan Carlos
f0bfc0bd3f Remove define for jsfetch (#19530)
* 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
2022-02-25 20:34:16 +01:00
flywind
891329cd4b move io out of system (#19442)
* 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
2022-02-02 17:10:11 +01:00
Andrey Makarov
d7869a8009 Improve Zshell completion (#19354) 2022-01-18 15:58:18 -05:00
pkubaj
7a5314c571 Fix build on FreeBSD/powerpc (#19282)
It's currently misdetected as powerpc64.
2021-12-22 20:52:33 -05:00
snxx
609388e33f Add icon for Nim (#19258)
* Add Nim's file icon

* Add installer icon

* Add uninstaller icon
2021-12-17 08:58:05 +01:00
wenghongquan
742e9d65ad Add support for LoongArch (#19223)
* Add support for LoongArch

* Update compiler/installer.ini

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-12-09 14:00:33 +01:00
Andreas Rumpf
a0073d2d4c renamed 'gc' switch to 'mm'; [backport:1.6] (#19187)
* renamed 'gc' switch to 'mm'; [backport:1.6]
* better docs
2021-11-24 15:49:32 +01:00
Andrey Makarov
997ccc5889 fix nimindexterm in rst2tex/doc2tex [backport] (#19106)
* fix nimindexterm (rst2tex/doc2tex) [backport]

* Add support for indexing in rst
2021-11-09 19:01:47 +01:00
Kaushal Modi
efaaa38eef docstyle.rst: Do not export it to HTML as a standalone doc (#19083)
.. This doc is included in contributing.rst.

Fixes https://github.com/nim-lang/Nim/issues/14593.
2021-11-02 10:34:11 +01:00
ynfle
c80e2c1736 Docs: change clipboard cursor type to pointer (#19064) 2021-10-28 10:02:18 +02:00
Abishek PY
d634587423 feat: copy to clipboard (#18963)
* 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
2021-10-22 12:10:32 +02:00
Danil Yarantsev
5e2b9341f3 Add Elbrus 2000 architecture (#19024)
* Add Elbrus 2000 architecture

* Add e2k to niminst

* Update compiler/installer.ini

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-10-21 17:01:48 +02:00
antonl05
787def271b add OpenIndiana to list (#18972)
* add OpenIndiana support

* point sunos to solaris
2021-10-09 10:47:07 +02:00
quantimnot
19774a72e7 Fixed strictFuncs support for std/pegs (#18951)
* 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>
2021-10-07 12:16:58 +02:00
flywind
b2873f0f63 [tools] use the right parameter [backport:1.0] (#18957) 2021-10-06 12:47:46 +02:00
Dominik Picheta
6b0db5be1f Fixes build_all.sh failing on Nimble builds (#18945)
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.
2021-10-03 07:25:15 +02:00
Federico Ceratto
5325a366e7 Add armv8l support (Closes: #18898) (#18901) [backport] 2021-09-27 17:35:14 +02:00
Andreas Rumpf
5d315ebcc2 ported Nim to proprietary CrossOS [backport] (#18889) 2021-09-24 13:24:41 +02:00
Andreas Rumpf
928ea6bb4c atlas: added --cfgHere switch [backport] (#18873) 2021-09-20 13:32:33 +02:00
Federico Ceratto
a896f9f19e Clarify unknown processor error (#18829) 2021-09-09 13:57:21 +02:00
Andreas Rumpf
cc5422ae50 Atlas: added 'extract' command, as promised (#18813) 2021-09-06 13:19:11 +02:00
Andreas Rumpf
2e2d928846 formal grammar updates [backport:1.2] (#18803) 2021-09-04 19:52:57 +02:00
Timothee Cour
98f7254fb2 followup #18711 grammar_nanny now reports unused non-terminals (#18746)
* followup #18711 cleanup unused grammar rules

* make tools/grammar_nanny.nim report unused terminals

* revert removal of some grammar comments
2021-08-26 07:04:18 +02:00
Juan Carlos
e65dc36ddd Implement RFC-391 (#18585) 2021-08-22 12:32:55 -07:00
Kyle Brown
31fc0f9718 Remove unused imports, and deprecated function usage (#18663)
* clean up imports and slice to remove delete

* revert buggy code

* Replace "delete" with setlen to remove depreciation warning
2021-08-11 01:26:42 +02:00
flywind
2bc07554cc make proc names consistent (#18626)
* rename `endswith` to `endsWith`

* rename
2021-08-01 12:52:24 +01:00
Antonis Geralis
ecfc47b332 Modify atlas test for short commit hashes (#18619)
* test commit hashes support

* Update testdata.nim

* remove extra newlines
2021-07-30 16:36:16 +02:00
Andreas Rumpf
664dbb6bfb atlas tool: testing via mocking (#18588)
* atlas: refactoring
* Atlas: do some basic testing via mocking
2021-07-26 18:00:03 +02:00
Araq
b6f9f7a33e atlas: minor changes 2021-07-21 09:09:58 +02:00
Antonis Geralis
220b55c5d7 attempt to support short commit hashes (#18514)
* 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
2021-07-18 15:29:49 +02:00
Andreas Rumpf
089e741ce4 added Atlas helper tool (#18497)
* added Atlas helper tool
* further improvements
2021-07-16 07:42:35 +02:00
flywind
195300a938 [source code filter]fix Nightlies bug (#18475)
* workaround Nightlies bug

* Update tools/niminst/makefile.nimf
2021-07-12 14:26:46 +02:00
Timothee Cour
b72ecaf639 fix shebangs #! /xxx => #!/xxx (#18444) 2021-07-07 06:00:59 +02:00
Andrey Makarov
b88496ac67 fix compilation on Debian 7 (no git -C) (#18427)
* 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>
2021-07-06 20:09:56 +02:00
Timothee Cour
cb9496693a ./koch tools now builds bin/nim_dbg, a debug version of nim (#18289) 2021-06-28 17:15:20 +02:00
Federico Ceratto
908b2cc2e4 Switch IRC links to Libera Chat (#18370) 2021-06-27 21:12:12 +01:00
Timothee Cour
8535b26a75 docs now show nimExperimentalX APIs (#18345)
* docs now show nimExperimentalX APIs

* fix for windows
2021-06-25 16:47:10 +02:00
Andrey Makarov
969cb97c0a PCRE, nimgrep: add limit for buffer size (#18280) 2021-06-17 08:19:52 +02:00
Federico Ceratto
2d34b1f5bc Enable parallel build in build.sh (#18195)
Add help
2021-06-14 09:30:04 +02:00
Andrey Makarov
ba3ec7b049 docs: Latex generation improvements (#18141)
* docs: improve Latex generation

* make it work on Windows + fix ] escaping

* minor fixes with escapes and style
2021-06-01 20:47:23 +02:00
Timothee Cour
3b1aabdcff change --hint[X] => --hint:X in nim repo (avoids shell quoting issues) (#18085) 2021-05-26 09:51:48 +02:00
Timothee Cour
c495628255 refactor common code in CI pipelines (#18035)
* refactor CI with nimInternalInstallDepsWindows

* refactor CI with nimInternalBuildKochAndRunCI

* fixup
2021-05-26 09:43:30 +02:00
Timothee Cour
13b57524d3 ref #17913; fix typo in tools/ci_generate.nim generating build_all.sh (#17915) 2021-05-01 10:43:20 -07:00