Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Parsing dates in online REPL #553

Open
jeromesimeon opened this issue Feb 20, 2019 · 2 comments
Open

Parsing dates in online REPL #553

jeromesimeon opened this issue Feb 20, 2019 · 2 comments
Labels
Type: Bug 🐛 Something isn't working

Comments

@jeromesimeon
Copy link
Member

Using some date operations in the JavaScript version of the Ergo REPL (e.g., at https://ergorepl.netlify.com) will fail. This is due to the calendar library which uses the OCaml Str library which isn't supported by js_of_ocaml.

We should switch to the (hopefully) upcoming version of Calendar from https://github.com/ocaml-community/calendar which relies on Re.Str as soon as it is available on opam.

@jeromesimeon jeromesimeon added the Type: Bug 🐛 Something isn't working label Feb 20, 2019
@jeromesimeon jeromesimeon added this to To do in REPL Feb 20, 2019
@jeromesimeon
Copy link
Member Author

The relevant js_of_ocaml warning during compilation:

ocamlfind ocamlc -linkpkg -package js_of_ocaml.ppx -package js_of_ocaml -package calendar -package re.str -package base64 -package unix -package atdgen -I src -I extracted src/DateTime.cmo src/Monitor_t.cmo src/Monitor_j.cmo src/Util.cmo extracted/ErgoComp.cmo src/Cto_t.cmo extracted/Resources.cmo src/ErgoStdlib.cmo src/ErgoUtil.cmo src/Cto_j.cmo src/CtoImport.cmo src/LexUtil.cmo src/ErgoParser.cmo src/ErgoLexer.cmo src/ParseUtil.cmo src/ErgoConfig.cmo src/PrettyCommon.cmo src/PrettyIL.cmo src/ErgoCompile.cmo ergoc.cmo ergocJS.cmo -o ergocJS.byte
js_of_ocaml _build_js/ergocJS.byte -o _build_js/ergocJS.js
There are some missing primitives
Dummy implementations (raising 'Failure' exception) will be used if they are not available at runtime.
You can prevent the generation of dummy implementations with the commandline option '--disable genprim'
Missing primitives:
  re_search_forward

@jeromesimeon
Copy link
Member Author

There is hope of a new release. Most recent thread about that is at ocaml-community/calendar#26

@jeromesimeon jeromesimeon moved this from To do to In progress in REPL Oct 26, 2019
@jeromesimeon jeromesimeon removed this from In progress in REPL Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant