introduce eelco, a doctester
This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2023-08-10-documentation-team-meeting-notes-71/31558/1
The doctester app seems to fail when executed in the build phase. I'm guessing this has something to do with failing to creating a file that is part of creating a PTY.
Perhaps as a flake "check" this would be run in an environment that would allow such files to be created?
Can something be done otherwise to allow these files to be created?
Failure: https://github.com/NixOS/nix.dev/actions/runs/5832308481/job/15817476652?pr=672#step:5:907
Relevant crate: https://docs.rs/pty-process/latest/pty_process/index.html
Worked around this by making this a flake app, instead.
Regarding the fenced code block language tag, the following
```text nix-repl
would work, but it's not nice. I'd like to use the Sphinx API to create an extension that prepends text to nix-repl, avoiding the issue.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2023-08-14-documentation-team-meeting-notes-72/31722/1
I can refine the implementation but that can be done later, as well. This is already useful. Therefore, asking for review. A few hundred lines of Rust code. But you can also take the approach that it probably works and if it doesn't then @mightyiam will fix it.
I feel that there is some open source rust crate potential somewhere in this but haven't thought of where to draw that line yet.
Yes, there are no tests. I wonder whether anyone will insist on tests...
Have you seen https://github.com/OceanSprint/tesh
This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2023-08-17-documentation-team-meeting-notes-73/31853/1
Yes, and I don't know why we didn't start with integrating tesh to begin with.
It didn't seem to me like tesh provides the desired interface.
I'm in the process of extracting the vast majority of this PR into its own repo.
I suppose I will convert to draft. But I don't see the button. Are draft PRs disabled?
Well... today is the last day of https://thaigersprint.org/, during which I've been working primarily on this. The documentation example tester has been extracted and released. And I've updated this pull request.
All examples are skipped except for two. Those two are repl examples.
As it stands in this PR branch, repl examples and expression examples can be written and/or edited, as long as they're within the limited feature set of eelco. That is, channels cannot be used. Examples that consist of multiple files are not supported. Could be other things we wanna do that are not supported.
Should this be merged at this stage? Is it better than nothing? Is the design of eelco reasonable?
Closing this for now as it hasn't seen any progress in a long time and is far out of date. Feel free to reopen if there is any notable update.
Sorry for taking so long.