Coder Social home page Coder Social logo

milk's Issues

Abstract type support?

First of all - thank you for making this and open sourcing it. I'm loving it so far. I'm new to Reason and OCaml so forgive me if the way I phrase this question is vague.

I added a new field to my record that I'm encoding of type StringMap.t(list(string)). When I run milk, I get this error:

Fatal error: exception Failure("Abstract type found, but no 'helpers' module specified for this engine")
Raised at file "stdlib.ml", line 33, characters 17-33
Called from file "src/serde/MakeDeserializer.re", line 131, characters 16-98
Called from file "src/serde/MakeDeserializer.re", line 206, characters 10-20
Called from file "src/serde/MakeDeserializer.re", line 302, characters 16-82
Called from file "belt/belt_List.ml", line 172, characters 29-34
Called from file "src/SerdeFile.re", line 232, characters 12-94
Called from file "src/Milk.re", line 190, characters 12-271
Called from file "src/Milk.re", line 212, characters 4-11
Called from file "src/Milk.re", line 241, characters 10-44
Called from file "bin/Main.re", line 104, characters 4-47

This error goes away when I remove the StringMap.t(..). I'm inferring from the error that the "abstract type" is the StringMap.t and that I need to provide my own serialize and deserialize functions. I think this makes sense. Can you point me to a place in the documentation where I can learn more about doing this? If there isn't any, I'd be happy to write some if you give me a hand.

Thanks!

No error when engine.t.output invalid

env

(โœ“) 20:26:52 [~/code/milktest]
$ uname -a
Linux **** 5.0.0-31-generic #33~18.04.1-Ubuntu SMP Tue Oct 1 10:20:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
(โœ“) 20:27:00 [~/code/milktest]
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Pop!_OS 18.04 LTS
Release:        18.04
Codename:       bionic

Recreate

  1. Make a "bad" path as types.json.engine.t.output (I typo'd ",/src/Serde.re"), with a leading comma.
  2. Run milk
  3. milk exits with no error code or message

What Happened

No Serde.re file created

What I expected to happen

milk would exit with non-zero code or print an error as a result of invalid file system operation

Error with [email protected]

I attempted to upgrade to bs-platform 5.1.0 and received this error after running `milk v1.0.0-alpha3``

Fatal error: exception Failure("Failed to load <project-path>/node_modules/.lsp/Types.cmt as a cmt w/ ocaml version 402, error: <project-path>/node_modules/.lsp/Types.cmt\nis not a compiled interface")
Raised at file "stdlib.ml", line 33, characters 17-33
Called from file "belt/belt_List.ml", line 172, characters 29-34
Called from file "src/Milk.re", line 66, characters 4-675
Called from file "src/Milk.re", line 139, characters 47-66
Called from file "bin/Main.re", line 104, characters **4-47**

After re-installing 5.0.6, milk ran successfully. I'd love to help with this but have no idea where to start.

Cant find exported type when ppx is used

Hi @jaredly! I was trying to use milk and https://github.com/ELLIOTTCABLE/bs-deriving

when i have ppx in bsconfig.json milk throws error that it can't find desired type.

Fatal error: exception Failure("No exported type t in module file:///~/demo/src/Config.re ")
Raised at file "stdlib.ml", line 33, characters 17-33
Called from file "belt/belt_List.ml", line 172, characters 29-34
Called from file "src/Milk.re", line 66, characters 4-675
Called from file "src/Milk.re", line 139, characters 47-66
Called from file "bin/Main.re", line 104, characters 4-47

removing ppx from bsconfig helps

Error with inline record definitions

I have a type like this:

type event = Foo{bar: int}

but the translation doesn't contain the inline record anymore. If I change to regular records it works.

syntax error with variants that have record parameters

This code:

type bar = {x: int};
type event =
  | Foo(int)
  | Bar(bar);

Generates this output, which has a syntax error:

module Types1 = {
  type _Lib__Events__event =
    Lib__Events.event = | Foo(int) | Bar(_lib__Events__bar)
  and _lib__Events__bar = lib__Events.bar = {x: int};
};

"Unsupported OCaml version"

Hello,
Trying to use this project as it sounds like the best alternative for me.
but when trying to execute milk I get -
Fatal error: exception Failure("Unsupported OCaml version: 4.14.0") error.

  1. What are the supported versions?
  2. Why 4.14.0 is not supported? I mean, what should I change to make it be supported?

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.