-
Notifications
You must be signed in to change notification settings - Fork 71
[build] Generate given_exo.{cmi,cmo,cmt}
files
#458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
erikmd
added a commit
to pfitaxel/learn-ocaml
that referenced
this pull request
Nov 7, 2021
Spotted with (docker, `learn-ocaml build --enable-cmo-build`) from PR ocaml-sf#458: ``` LOGS: Learnocaml v.0.14.0 running. Updating app at ./www given_int_0exo (build .cmo) Cannot process exercises: Env.Error(_) ``` Note: this latter exception backtrace could be improved (giving more details). Close ocaml-sf#438
erikmd
added a commit
to pfitaxel/learn-ocaml-corpus
that referenced
this pull request
Nov 7, 2021
MOTIVATION: After ocaml-sf/learn-ocaml#458, we'll precompile {prelude,prepare}.ml in `*.cm*` files. The previous implementation led to a compilation issue: ``` File "prepare.ml", line 7, characters 4-7: 7 | let (!), get_count = ^^^ Error: The type of this expression, '_weak1 ref -> '_weak1, contains type variables that cannot be generalized ```
erikmd
added a commit
to pfitaxel/learn-ocaml-corpus
that referenced
this pull request
Nov 7, 2021
MOTIVATION: After ocaml-sf/learn-ocaml#458, we'll precompile {prelude,prepare}.ml in `*.cm*` files. The previous implementation led to a compilation issue: ``` File "prepare.ml", line 7, characters 4-7: 7 | let (!), get_count = ^^^ Error: The type of this expression, '_weak1 ref -> '_weak1, contains type variables that cannot be generalized ```
erikmd
added a commit
to ocaml-sf/learn-ocaml-corpus
that referenced
this pull request
Nov 7, 2021
MOTIVATION: After ocaml-sf/learn-ocaml#458, we'll precompile {prelude,prepare}.ml in `*.cm*` files. The previous implementation led to a compilation issue: ``` File "prepare.ml", line 7, characters 4-7: 7 | let (!), get_count = ^^^ Error: The type of this expression, '_weak1 ref -> '_weak1, contains type variables that cannot be generalized ```
7dd6385
to
a05bf78
Compare
Closed
15 tasks
erikmd
commented
Dec 3, 2021
* This new experimental option is on by default (implicit mode) and generates `given_exo.{cmi,cmo,cmt}` in the www folder for each `prelude ^ " ;;\n" ^ prepare`. * This is a key feature for learn-ocaml.el (the Tuareg/Merlin frontend for Learn-OCaml, https://github.com/pfitaxel/learn-ocaml.el ); it can be disabled using the flag: $ learn-ocaml build --disable-cmo-build * If the www/exo.json file is up-to-date, the `exo.cm*` are not built. * But we can force the `exo.cm*` build (explicit mode) using the flag: $ learn-ocaml build --enable-cmo-build * This option may later become mandatory if/when the js_of_ocaml front also fetches similar `*.cmo` files.
Closed subsumed by #481. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Kind: feature
Address
learn-ocaml build -j 2
is broken #414 first (disabling broken optionlearn-ocaml build --jobs=2
)Description
learn-ocaml build --enable-cmo-build
given_exo.{cmi,cmo,cmt}
in the www folder for eachprelude ^ " ;;\n" ^ prepare
.exo.cm*
are not built.exo.cm*
build (explicit mode) even for un-changed exercises using the flag:*.cmo
files.ocamlc
naming convention:require that the input exercise id basename
exo-name
matches[0-9A-Za-z_-]+
, otherwise raise a warning,then bijectively replace
_
→_0
and-
→_1
inexo
, then yield the output filenamedir/given_exo_1name.cmo
.Checklist
learn-ocaml-client
counterpart of this feature within this PRNote to maintainers
Merge
for this one)