Git Product home page Git Product logo

errpy's Introduction

License: MIT

Errpy: An Error Recovering Rust Python Parser

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.

License

Errpy is licensed under the MIT license.

Building

Errpy depends upon the following:

  • Ocaml
  • Dune
  • Rust
  • Cargo

Platform

ERRPY is verified as being buildable on Linux on OCaml 4.14.0

Installing Ocaml and Dune

Install opam and run opam switch install "4.14.0"

Usage

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))

For local development

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

Formatting

When making Ocaml changes you can run ocamlformat in order to ensure code is formmated in a conistent manner. This is invoked as follows:

$ dune build @fmt
$ dune promote

errpy's People

Contributors

amyreese avatar bigfootjon avatar blonck avatar capickett avatar connernilsen avatar cooperlees avatar diliop avatar facebook-github-bot avatar fanzeyi avatar flplv avatar fried avatar hjacobs avatar jasontatton avatar jbaramidze avatar kinto0 avatar ngaijustin avatar pulcheri avatar remidomingues avatar stepancheg avatar stroxler avatar tcbegley avatar vthemelis avatar zertosh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

errpy's Issues

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.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.