This is a new project to provide an error-recovering Python parser, implemented in Rust based on tree-sitter. Our short-term goal is to use it in the pyre type checker, in order to provide better IDE features.
Errpy is licensed under the MIT license.
Errpy depends upon the following:
- Ocaml
- Dune
- Rust
- Cargo
ERRPY is verified as being buildable on Linux on OCaml 4.14.0
Install opam
and run opam switch install "4.14.0"
It is recommended to use dune as your build system. To use errpy in your dune project, you can add errpy to the libraries stanza in your dune file. For example,
(library
(name mylib)
(libraries errpy))
If you want to test your changes to errpy locally and use them in another OCaml project (.e.g. Pyre) you can try the following,
First clone the repo with: $ git clone https://github.com/facebook/errpy.git
Or use $ git clone --branch release https://github.com/facebook/errpy.git
if you're operating within an offline
rust enviroment.
... make the required changed ...
$ cd errpy
$ dune build @install # Build the errpy library
$ dune test # Run tests
$ opam pin add errpy . -n # pin opam to errpy
$ opam install errpy --verbose # install local build as errpy in opam
When making Ocaml changes you can run ocamlformat
in order to ensure code is
formatted in a conistent manner. This is invoked as follows:
$ dune build @fmt
$ dune promote
errpy's People
errpy's Issues
Add instructions for running the Rust build locally
The command here:
https://github.com/facebook/errpy/blob/main/README.md?plain=1#L46
fails due to ocaml/opam#3460
I locally worked around it by modifying the opam
sandbox script but there may be a better solution to this.
Could we add instructions on how to bypass the issue or add the necessary config?
Should this library have a Cargo lock file?
I would think that this is a good thing to add as it allows reproducible builds.
When I first tried to build this package, I wasn't sure if there was an actual issue with the code or if I'm just running with slightly different dependencies to the last person that built this library successfully.
Make the library runnable in bytecode
If I try to run the executable of this library as bytecode, I get the following:
◦ dune exec ./parse_and_print.bc
File "dune", line 35, characters 7-22:
35 | (name parse_and_print)
^^^^^^^^^^^^^^^
Error: No rule found for dllffi_ocaml.so
Could you add a dynamic library build as well?
I'm interested in this to allow running this and pyre in the debugger.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.