pyrmont / documentarian Goto Github PK
View Code? Open in Web Editor NEWA document generation tool for Janet projects
License: MIT License
A document generation tool for Janet projects
License: MIT License
Janet 1.17 adds JANET_FN
and JANET_REG
macros that include source mapping information. This should obviate the need for the require-c
function.
I'm not sure if Documentarian should use the existing technique (which is very hacky) as a fallback or if it should be removed entirely.
In my purely native module I get the following error:
error: Project file must contain declare-project and declare-source
But in native modules only requires declare-project
and declare-native
to jpm to accept it
When running documentarian on fugue, I get this traceback:
error: expected integer key in range [0, 0), got :ns
in binding-details [src/documentarian.janet] on line 198, column 29
in extract-bindings [src/documentarian.janet] on line 278, column 11
in generate-doc [src/documentarian.janet] (tailcall) on line 427, column 17
Lemme know if this rings any bells!
Not sure where the error is here: in documentarian's build settings or in the void linux janet package.
But running documentarian on a package with a native module produces this error:
error: could not load native /usr/lib64/janet/jnj-primitives.so: /usr/lib64/janet/jnj-primitives.so: undefined symbol: janet_buffer_push_cstring
in native
in native-loader [boot.janet] on line 2615, column 40
in require-1 [boot.janet] on line 2638, column 18
in import* [boot.janet] on line 2669, column 15
in _thunk [jnj.janet] (tailcall) on line 1, column 1
in dofile [boot.janet] (tailcall) on line 2607, column 7
in source-loader [boot.janet] on line 2618, column 15
in require-1 [boot.janet] (tailcall) on line 2638, column 18
in extract-env [src/documentarian.janet] on line 355, column 18
in <anonymous> [src/documentarian.janet] on line 438, column 35
in reduce [boot.janet] on line 824, column 27
in generate-doc [src/documentarian.janet] (tailcall) on line 437, column 13
I've confirmed that I'm able to import that module from a Janet repl, so it's something particular to how it's being loaded in the documentarian context.
documentarian always looks for imports in the system janet path. It would be useful to be able to specify JANET_PATH
as a flag, or have it respect the JANET_PATH env variable, so it could be run on projects whose dependencies are installed in a local tree.
This one is kind of a bother to unit-test.
I'll use quotation marks as an example:
If a function definition has quotation marks within a code fence:
Example prose, followed by code:
```
(example-fun "argument")
```
Then documentarian will do the right thing and reproduce the code block verbatim in the markdown output.
However, if that same text is found in the doc section in a project.janet
, documentarian will convert the quotation marks to html entities, thus breaking the ultimate rendering of the code block:
Example prose, followed by code:
```
(example-fun "e;argument"e;)
```
This is what I get when I clone the repo and run jpm build
(on Ubuntu 20.04):
generating executable c source...
compile error: unknown symbol sort-by on line 132, column 3 while compiling src/documentarian.janet
compile error: unknown symbol bindings->items on line 180, column 14 while compiling src/documentarian.janet
error: expected integer key in range [0, 5), got nil
in <anonymous> [/usr/local/bin/jpm] on line 409, column 19
in do-rule [/usr/local/bin/jpm] on line 90, column 24
in do-rule [/usr/local/bin/jpm] (tailcall) on line 88, column 44
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.