| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
| |
* fixes #21461; Move nim-gdb.py and add nim-lldb.py
* fixes bad path for nim-gdb.py
|
|
|
|
|
|
|
|
|
| |
* Support for printing tuple types
* Add test of printing a tuple
* Add support for printing tuples in GDB
* Forgot to [skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
| |
* replace `symbolfiles` with `incremental`; fixes warnings when build csources
* fixes self conversion warnings
|
|
|
|
|
| |
* closes #20808
* atlas: better docs
|
|
|
| |
Use Nim instead of JS for searching
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Remove confusing "ppc" block
The PowerPC arch is called "powerpc" in platforms.nim
The makefile shipped in release 1.6.10 populates the oFiles variable when myos=linux and mycpu=powerpc
mycpu=ppc instead leads to ``no C code generated for: [linux: ppc]. Stop``
* Handle ucpu=ppc
|
|
|
|
|
|
|
| |
* koch remove dead code for Travis CI
* Restart CI
* Restart CI
|
|
|
|
|
|
|
| |
* Use link from webpage. Closes #14476
* Update doc generation tests
* Update RST test
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* move syslocks first
* progress
* clean up
* go on
* clean up
* clean up
* add imports syslocks
* remove documentation
* public deallocOsPages
* fixes genode
* fixes more
* fixes boehmGC
* cover more cases
* fixes cyclic deps
* fixes genode
* cleanup
* unpublic fields
* cleanup
* clean up
|
|
|
|
|
|
|
| |
* Fix #20628 for Windows
* Move isRegular - !isSpecial and onlyRegular - skipSpecial
* Forgot to change it in 1 more place
|
|
|
|
|
| |
* Implement Unix file regularity check
* update std/dirs also
|
|
|
| |
fixes niminst with stricteffects; add testcase
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* move widestrs out of system
* fix osproc
|
|
|
| |
add plausibleAnalytics to koch docs[backport:1.6]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* system refactor, move out 600 lines
* compilation, slice, backwardsindex, misc_num moved out of system
* some procs/types moved into arithmetics, basic_types
* system no longer depends on syncio
* some procs moved around to fit with their surroundings
* make exceptions an import, old ops to misc_num
* move instantiationInfo back
* move back nim version, fix windows echo
* include compilation
* better docs for imported modules, fix unsigned ops
also remove ze, ze64, toU8, toU16, toU32 with nimPreviewSlimSystem
* fix terminal
* workaround IC test & weird csize bug, changelog
* move NimMajor etc back to compilation, rebase for CI
* try ic fix
* form single `indices`, slim out TaintedString, try fix IC
* fix CI, update changelog, addQuitProc
* fix CI
* try fix CI
* actually fix CI finally hopefully
* Update lib/system/compilation.nim
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* update kochdocs
* hopefully fix csize uses for slimsystem
* fix tquit
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
|
|
|
|
| |
* remove deprecated and broken nimweb tools
* readme
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* xxx
* More cleanups
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* change rst2tex -> md2tex also
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
- Fixes https://github.com/nim-lang/Nim/issues/18840
|
|
|
|
|
| |
* niminst: support DESTDIR (fix #9788)
* niminst: quote variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
| |
* rewrite docs JS in Nim
* fixup
* fix nimdoc/rsttester
|
|
|
|
|
|
|
|
|
|
| |
* 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 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
* fix tests
* fix tests
* next step
* rename to syncio
* rename
* fix nimscript
* comma
* fix
* fix parts of errors
* good for now
* fix test
|
| |
|
|
|
| |
It's currently misdetected as powerpc64.
|