Commit Graph

785 Commits

Author SHA1 Message Date
ringabout
b3912c25d3 remove outdated config (#22603) 2023-08-31 18:01:29 +02:00
ringabout
2e3d9cdbee fixes #22441; build documentation for more modules in the checksums (#22453)
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2023-08-17 13:54:00 +02:00
Emery Hemingway
1927ae72d0 Add Linux constant SO_BINDTODEVICE (#22468) 2023-08-14 21:00:48 +02:00
ringabout
9b5f310b9e build atlas documentation (#22071) 2023-06-11 19:18:32 +02:00
Andreas Rumpf
21d941c16a Atlas: now in its own repository (#22066)
* Atlas: now in its own repository

* progress
2023-06-10 17:32:11 +02:00
Juan Carlos
b2d7761975 Remove Deprecated Nimfix (#22062)
* Remove Deprecated Nimfix
* Trailing whitespace cleanups
2023-06-10 07:09:03 +02:00
Qinsi (James) ZHU
744a99d75c add const RLIMIT_STACK (#21772)
* add const RLIMIT_STACK

* generate by detect.nim

* add generated const for linux-amd64
2023-06-09 16:03:28 +02:00
Juan M Gómez
80fc749835 fixes #22025 vcc fails with The filename or extension is too long. when linking (#22026)
[vcc]makes paths relative when possible fixes #22025
2023-06-06 21:32:16 +02:00
Andreas Rumpf
b86060b2ba Atlas: --project switch and better graph representation (#21971) 2023-06-03 12:34:58 +02:00
Gruruya
ead7e20926 Atlas: avoid segfault on failed Github search (#21980)
* Atlas: avoid segfault on failed Github search

* Return empty array on failed search instead of nil
2023-06-02 05:02:40 +02:00
SirOlaf
bf9ee00998 Atlas: Use copyFileWithPermissions to copy nim executable (#21967)
Use copyFileWithPermissions to copy nim executable

Co-authored-by: SirOlaf <>
2023-05-31 06:26:51 +02:00
Andreas Rumpf
a9385a6b4a Atlas: virtual environments (#21965)
* Atlas: virtual environments

* fixes
2023-05-30 18:02:55 +02:00
Andreas Rumpf
4d20227438 Atlas: URL rewrite rules; --autoinit flag (#21963) 2023-05-30 14:00:09 +02:00
Andreas Rumpf
7ebb042f79 Atlas: some final cleanups (#21947) 2023-05-28 18:18:30 +02:00
ringabout
5997324709 fixes atlas logging colors on windows (#21946)
fixes atlas logging colors
2023-05-28 08:58:23 +02:00
Gruruya
9cb0fcf319 Atlas: checkout latest tagged commit with atlas use (#21944)
Now any deps with unspecified version reqs will checkout the last
tagged commit instead of the first commit.
2023-05-28 08:57:29 +02:00
ringabout
c2abcb06cc ship atlas and build documentation (#21945)
* ship atlas and build documentation

* move atlas.md and link it in tools' index
2023-05-28 08:28:49 +02:00
Andreas Rumpf
2900987c2f Atlas: use colored output (#21939)
* Atlas: use colored output

* fixes merge conflict

* another tiny improvement
2023-05-28 05:54:32 +02:00
Gruruya
d5ba14db61 Atlas: add atlas tag command (#21936)
* Initial structure, `GitTags` → `GitRefsTags`

* Determine if we should use v prefix

* get tag from latest tag, patch nimble file

* Just do tags for now

* atlas tag now tags and pushes

* Improve UX of `atlas tag`

* better description for `tag`

* Small fixup

* Consistent naming

* strip after checking status

* Take major/minor/patch as arg for `atlas tag`

* undo testing comment

* Fix for `v` prefixed versions

* Avoid useless assignment

* Remove uselss enum assignment

* Consistent parameter seperation

* Add error handling for non-semver tags

* Use `assert` to quit on error

* Update tools/atlas/atlas.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* Don't push tags if errors occurred

* Allow `atlas tag [tag]` again

* Add atlas tag `a..z` for fields > 3

* Document the three input options

* Take up less lines in help

* Less or in help

* One last doc pass

* Check args length

* clarify last tag

* consistency/order

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-05-27 20:49:19 +02:00
Andreas Rumpf
ef3c0bec1c Atlas: explicit graph representation (#21937) 2023-05-27 16:48:10 +02:00
Andreas Rumpf
73095e2abb Atlas: fixes 'use' command (#21932)
* Atlas: fixes 'use' command

* Atlas: refactoring + make tests green again
2023-05-27 13:53:07 +02:00
Gruruya
6048367a9f Atlas: clone with --recursive (#21933) 2023-05-27 10:55:31 +02:00
Gruruya
09f36f5198 atlas: search improvements (#21929)
* Get description and license from github json response

* Allow running `atlas search` outside of a workspace

* Check `len` instead of `dirExists`

* make `list` identical to `search`
2023-05-27 06:54:21 +02:00
Andreas Rumpf
2beea72810 atlas: better code (#21926) 2023-05-26 21:24:29 +02:00
Juan Carlos
f2d26f2973 Fix Nimgrab (#21918)
* .

* Fix nimgrab client not closing

* Fix nimgrab client not closing

* Fix nimgrab client not closing
2023-05-26 14:37:59 +02:00
SirOlaf
b50babd0ae Atlas: Actually use deps for use command (#21922)
Co-authored-by: SirOlaf <>
2023-05-26 14:36:20 +02:00
Andreas Rumpf
908e971732 Atlas: misc (#21919)
* Atlas: misc

* Atlas: use the lockfile if one exists
2023-05-26 09:24:01 +02:00
Andreas Rumpf
0eb508e434 atlas: better docs (#21911)
* atlas: better docs

* better workspace/project handling

* make tests green again

* bugfix
2023-05-25 22:23:07 +02:00
Andreas Rumpf
b63b5c930e Atlas: added 'use' command (#21902)
* Atlas: added 'use' command

* typo
2023-05-24 16:39:58 +02:00
Andreas Rumpf
9493e67291 Atlas: first lockfiles implementation; cleared up upated vs updateWor… (#21895)
Atlas: first lockfiles implementation; cleared up upated vs updateWorkspace commands
2023-05-23 23:48:00 +02:00
Andreas Rumpf
1252070193 minor atlas improvements (#21888)
* minor atlas improvements

* atlas: support a _deps workspace subdirectory
2023-05-23 13:47:51 +02:00
Andreas Rumpf
d696ef5ad7 Atlas tool: search github too, no need to register your project at pa… (#21884)
* Atlas tool: search github too, no need to register your project at packages.json

* added missing file
2023-05-22 20:35:27 +02:00
metagn
02be212dae clean up SOME pending/xxx/issue link comments (#21826)
* clean up SOME pending/xxx/issue link comments

* great
2023-05-11 10:23:52 +02:00
ringabout
62f1ad54ae build documentation for checksums/md5 and checksums/sha1 (#21791)
* build documentation for md5 and sha1

* fixes documentation reference
2023-05-04 17:40:37 +02:00
ringabout
afc30ca879 fixes #19863; move sha1, md5 to nimble packages for 2.0 (#21702)
* move sha1, md5 to nimble packages

* boot the compiler

* fixes tests

* build the documentation

* fixes docs

* lol, I forgot koch.nim

* add `nimHasChecksums` define

* clone checksums but maybe copying is better

* bump nimble hash

* use ChecksumsStableCommit

* fixes tests

* deprecate them

* fixes paths

* fixes koch
2023-05-02 10:49:17 +02:00
Andreas Rumpf
d84b02f0e0 atlas tool: 'update' command (#21557) 2023-03-21 15:24:57 +01:00
Joey
cae539996a Update LLDB debug script + Add Custom Nim formatters (#21517)
* Fix custom objects, fix handling of nil variables

* Rename because lldb complains about dashes in filename

* Add example of how to use custom type formatting from Nim

* Add synthetic objects with dynamic fields and add an example
2023-03-19 06:28:00 +01:00
Arnaud Moura
b2c5f8a05f fixes #21461 (#21463)
* fixes #21461; Move nim-gdb.py and add nim-lldb.py

* fixes bad path for nim-gdb.py
2023-03-03 23:37:12 +01:00
Jake Leahy
e54d3cc418 Support tuples in nim-gdb (#21410)
* Support for printing tuple types

* Add test of printing a tuple

* Add support for printing tuples in GDB

* Forgot to [skip ci]
2023-02-21 12:02:42 +01:00
Jake Leahy
c66dc913ce Support new runtime with nim-gdb (#21400)
* Add support for orc strings

* Cleaned up testing script

Enums now printing properly

Merged both old and new strings into the one printer

Moving onto sets which seem kinda difficult

* Sets working

Instead of trying to imitate how Nim represents enums, I just call the dollar proc for each enum value

While this runs into problems if the user doesn't call the dollar proc anywhere, I believe its a decent tradeoff

I've cleaned up the error message for when it cannot find dollar proc (Might add in proper message on how to fix)

* Support sequences

V2 runtime seems to have sequences that don't have a len (Guessing its some kind of short seq optimisation?) but I've rolled
the implementation into normal sequences since the implementation is practically the same

* Clean up test program so it isn't using diff

Also don't redirect the first nim compile to /dev/null so that we can check for any compilation errors

I found the diff to be annoying to read (Seeing as the test script already performs diffing)

* Tables are now supported

* Add colours to test output

It was getting difficult to tell apart test output from GDB output so I added colour to better tell them apart

* Both old and new runtime are working

Set exit code in python test script so that this could possibly be added to the CI. Only issue is that it can be flaky (GDB crashes randomly for some reason)

* Remove old code that was commented out

If I need it later I'll just use git

* Remove branch that never runs

* Remove the old test output [skip ci]
2023-02-20 21:19:46 +01:00
Juan M Gómez
642136ec4f Adds an extra optional argument to vcc: vctoolset Fixes #21335 (#21336) 2023-02-09 16:19:05 -05:00
Andrey Makarov
2620da9bf9 docgen: implement cross-document links (#20990)
* docgen: implement cross-document links

Fully implements https://github.com/nim-lang/RFCs/issues/125
Follow-up of: https://github.com/nim-lang/Nim/pull/18642 (for internal links)
and https://github.com/nim-lang/Nim/issues/20127.

Overview
--------

Explicit import-like directive is required, called `.. importdoc::`.
(the syntax is % RST, Markdown will use it for a while).

Then one can reference any symbols/headings/anchors, as if they
were in the local file (but they will be prefixed with a module name
or markup document in link text).
It's possible to reference anything from anywhere (any direction
in `.nim`/`.md`/`.rst` files).

See `doc/docgen.md` for full description.

Working is based on `.idx` files, hence one needs to generate
all `.idx` beforehand. A dedicated option `--index:only` is introduced
(and a separate stage for `--index:only` is added to `kochdocs.nim`).

Performance note
----------------

Full run for `./koch docs` now takes 185% of the time before this PR.
(After: 315 s, before: 170 s on my PC).
All the time seems to be spent on `--index:only` run, which takes
almost as much (85%) of normal doc run -- it seems that most time
is spent on file parsing, turning off HTML generation phase has not
helped much.
(One could avoid it by specifying list of files that can be referenced
and pre-processing only them. But it can become error-prone and I assume
that these linke will be **everywhere** in the repository anyway,
especially considering https://github.com/nim-lang/RFCs/issues/478.
So every `.nim`/`.md` file is processed for `.idx` first).

But that's all without significant part of repository converted to
cross-module auto links. To estimate impact I checked the time for
`doc`ing a few files (after all indexes have been generated), and
everywhere difference was **negligible**.
E.g. for `lib/std/private/osfiles.nim` that `importdoc`s large
`os.idx` and hence should have been a case with relatively large
performance impact, but:

* After: 0.59 s.
* Before: 0.59 s.

So Nim compiler works so slow that doc part basically does not matter :-)

Testing
-------

1) added `extlinks` test to `nimdoc/`
2) checked that `theindex.html` is still correct
2) fixed broken auto-links for modules that were derived from `os.nim`
   by adding appropriate ``importdoc``

Implementation note
-------------------

Parsing and formating of `.idx` entries is moved into a dedicated
`rstidx.nim` module from `rstgen.nim`.

`.idx` file format changed:

* fields are not escaped in most cases because we need original
  strings for referencing, not HTML ones
  (the exception is linkTitle for titles and headings).
  Escaping happens later -- on the stage of `rstgen` buildIndex, etc.
* all lines have fixed number of columns 6
* added discriminator tag as a first column,
  it always allows distinguish Nim/markup entries, titles/headings, etc.
  `rstgen` does not rely any more (in most cases) on ad-hoc logic
  to determine what type each entry is.
* there is now always a title entry added at the first line.
* add a line number as 6th column
* linkTitle (4th) column has a different format: before it was like
  `module: funcName()`, now it's `proc funcName()`.
  (This format is also propagated to `theindex.html` and search results,
  I kept it that way since I like it more though it's discussible.)
  This column is what used for Nim symbols resolution.
* also changed details on column format for headings and titles:
  "keyword" is original, "linkTitle" is HTML one

* fix paths on Windows + more clear code

* Update compiler/docgen.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* Handle .md and .nim paths uniformly in findRefFile

* handle titles better + more comments

* don't allow markup overwrite index title for .nim files

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-01-04 15:19:01 -05:00
ringabout
646932b3f3 fixes warnings when building csources (#21194)
* replace `symbolfiles` with `incremental`; fixes warnings when build csources

* fixes self conversion warnings
2022-12-28 20:41:27 +01:00
Andreas Rumpf
82d80e6e2c atlas: minor doc improvements (#21183)
* closes #20808

* atlas: better docs
2022-12-27 14:30:26 +01:00
Jake Leahy
86a6c90c9e Make search results be relative to documentation root (#21145)
Use Nim instead of JS for searching
2022-12-23 13:20:51 -05:00
Luca Guzzon
8a77798dac ucpu fix-up for arm64 value on macos m1 (#21142) 2022-12-20 20:29:42 +01:00
ringabout
8a3b76b287 csource building prefers bin/nim (#21115) 2022-12-16 07:59:18 +01:00
ringabout
9ba07edb2e build the documentation of official packages (#20986)
* remove db stuffs

* remove punycode

* remove

* fixes script

* add cloner

* patches

* disable

* patch

* fixes external packages

* disable two packages

* preview documentation build

* try again

* fixes URL

* fixes a bug

* simplify

* fixes documentaion

* fixes

* Apply suggestions from code review
2022-12-06 22:37:16 +08:00
Federico Ceratto
b36f5119ae Add HPPA and sparc64 architectures (#20934)
* Add comments on CPU arch detection

* Support HPPA/hppa/parisc64 CPU architecture

* Support sparc64 CPU architecture

* Update tools/niminst/makefile.nimf

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-12-01 12:48:47 +08:00
Federico Ceratto
8a68ed65d0 Support IBM Z architecture (#20943) 2022-11-28 13:33:09 -05:00