-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show compiler diagnostics in literate output #948
Conversation
Codecov Report
@@ Coverage Diff @@
## main #948 +/- ##
============================================
+ Coverage 82.89% 83.04% +0.15%
- Complexity 3452 3491 +39
============================================
Files 283 284 +1
Lines 10638 10734 +96
Branches 1295 1300 +5
============================================
+ Hits 8818 8914 +96
+ Misses 1100 1099 -1
- Partials 720 721 +1
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
In the docs, we should make the hover window less dark (or maybe make it white-ish). |
merge? |
wait a sec, lots of tweaks are coming ~ |
- show `Goal` - rewrite `merge` - simplify code
Merge? |
JavaScript master.... |
bors merge |
Build succeeded: |
959: Literate library r=ice1000 a=imkiva # Summary This PR adds support for pretty printing a library in our literate way. To customize the generation, new fields were added to `aya.json`: ```json "literate": { "linkPrefix": "/aya-prover/base/src/test/resources/success/build/pretty/", "pretty": { "prettierOptions": { "map": { "InlineMetas": true, "ShowImplicitArgs": false, "ShowImplicitPats": true, "ShowLambdaTypes": false } }, "renderOptions": { "colorScheme": "Emacs", "styleFamily": "Default" } } }, ``` - `linkPrefix`: the prefix to the link of "go to definition". This is useful when the generated page is not in the root folder of the HTTP server. The default value is "/" if unspecified. - `pretty`: same as the `prettierOptions` and `renderOptions` in `~/.aya/repl_config.json`. The default value comes from `repl_config.json` if unspecified. # How to build a literate library? Take the library `base/src/test/resources/success/` for example: ```shell aya --make base/src/test/resources/success --pretty-stage literate --pretty-format html ``` The above command outputs HTML files which are always located in `<library-root>/build/pretty`. Much like how we compile a single literate file. (Remember the `"linkPrefix": "/aya-prover/base/src/test/resources/success/build/pretty/"` above?) Note that the command line options `--prettyDir` and `--output` has no effect on libraries. ## For developers [LibraryTest.testLiterate](https://github.com/aya-prover/aya-dev/blob/6ce530cddf2256901b02edfc5fb460975d393fc9/base/src/test/java/org/aya/test/LibraryTest.java#L46) # TODO - [ ] Collect compiler diagnostics for libraries, see #948 - [ ] Build highlights for `import`, `open` Co-authored-by: imkiva <imkiva@islovely.icu>
This is the best feature I've ever implemented! The JavaScript code used to show the popup is copied from 1lab (thanks!!!!).