rrdelaney / ReasonablyTyped

:diamond_shape_with_a_dot_inside: Converts Flow and TypeScript definitions to Reason interfaces
https://rrdelaney.github.io/ReasonablyTyped/
MIT License
518 stars 24 forks source link

Add cases for new flow parser AST statements #28

Closed bbqbaron closed 7 years ago

bbqbaron commented 7 years ago

A pair of recent Flow commits have added some new AST types, DeclareTypeAlias and DeclareInterface. My recent local build of ReasonablyTyped started failing because the types of our test declarations have changed. Did you get this behavior too? If not, is it just that jbuilder doesn't constrain versions closely?

Anyway, this allows for those new types. I'm PRing it in case I've missed a piece of jbuilder arcana, since I assume builds with an older version of flow will fail if I just merge it.

P.S. For the curious, commit 1, commit 2

bbqbaron commented 7 years ago

Oho! CI build is in fact failing; I assume it's the cached flow version of 0.47 instead of my 0.52. Maybe this is a good time for me to understand jbuilder; are we just not pinning versions? Do we just wipe the CI cache, or do we pin to an old flow version?

(Sorry for leaving it to you; severe ocaml ecosystem naivete!)

rrdelaney commented 7 years ago

I'll check on this tonight 😊 Thanks for pointing it out!

What do you get when running "opam list"?

bbqbaron commented 7 years ago

My flow_parser is at 0.52.0. In case you happened to want the entire list (!) may as well dump it below:

(big props to pbcopy for actually truncating the output to the width of my console window :| )

# Installed packages for 4.04.0:
base-bigarray                  base  Bigarray library distributed with the OCaml
base-bytes                     base  Bytes library distributed with the OCaml co
base-threads                   base  Threads library distributed with the OCaml 
base-unix                      base  Unix library distributed with the OCaml com
biniou                        1.2.0  Binary data format designed for speed, safe
camomile                      0.8.5  A comprehensive Unicode library
cmdliner                      1.0.1  Declarative definition of command line inte
conf-m4                           1  Virtual package relying on m4
conf-which                        1  Virtual package relying on which
cppo                          1.5.0  Equivalent of the C preprocessor for OCaml 
easy-format                   1.2.0  High-level and functional interface to the 
flow_parser                  0.52.0  The Flow parser is a JavaScript parser writ
gen                             0.4  Simple and efficient iterators (modules Gen
jbuilder                 1.0+beta11  Fast, portable and opinionated build system
js_of_ocaml                     3.0  Compiler from OCaml bytecode to Javascript
js_of_ocaml-compiler            3.0  Compiler from OCaml bytecode to Javascript
lambda-term                    1.11  Terminal manipulation library for OCaml
lwt                           3.1.0  Concurrency based on promises
lwt_react                     1.1.0  Helpers for using React with Lwt
menhir                     20170418  LR(1) parser generator
merlin                        3.0.2  Editor helper, provides completion, typing 
merlin-extend                   0.3  A protocol to provide custom frontend to Me
ocaml-migrate-parsetree       1.0.2  Convert OCaml parsetrees between different 
ocamlbuild                   0.11.0  OCamlbuild is a build system with builtin r
ocamlfind                     1.7.3  A library manager for OCaml
ppx_tools_versioned           5.0.1  A variant of ppx_tools based on ocaml-migra
re                            1.7.1  RE is a regular expression library for OCam
react                         1.2.0  Declarative events and signals for OCaml
reason                        2.0.0  Reason: Meta Language Toolchain
reason-parser                 2.0.0  Reason Parser: Meta Language Toolchain
result                          1.2  Compatibility Result module
sedlex                       1.99.4  unicode-friendly lexer generator
topkg                         0.8.1  The transitory OCaml software packager
uchar                         0.0.2  Compatibility library for OCaml's Uchar mod
user-setup                      0.6  Helper for the configuration of editors for
utop                          2.0.1  Universal toplevel for OCaml
yojson                        1.4.0  Yojson is an optimized parsing and printing
zed                             1.5  Abstract engine for text edition in OCaml
rrdelaney commented 7 years ago

Looks like it still wants to install 0.47 without cache 🤔

screen shot 2017-08-07 at 9 06 56 pm
rrdelaney commented 7 years ago

Looks like the docker image we're using for build is out of date for Opam! Also, the build system is kind of a hack right now, we're not using jbuilder to install deps. Just running an opam command manually!

I'm running the build locally to see if running opam update before opam install fixes the problem!