jaredly / milk Goto Github PK
View Code? Open in Web Editor NEWMilk ๐ฅ Stress-free serialization & deserialization for Reason/OCaml
Milk ๐ฅ Stress-free serialization & deserialization for Reason/OCaml
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!
(โ) 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
",/src/Serde.re"
), with a leading comma.No Serde.re file created
milk would exit with non-zero code or print an error as a result of invalid file system operation
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.
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
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.
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};
};
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.
I think $schemaVersion should be optional.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.