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
Implement pre-compilation of exercises and graders #481
Conversation
This replaces the The main benefit is two-fold:
(these have been run on the learn-ocaml-corpus repository and the markov exercise, respectively. Check my (temporary) patches here) That's a 132x speedup on Todo:
|
This should finally be all good feature-wise. Last bits:
|
0699cef
to
d348acb
Compare
This is finalised and, I think, ready to review and go!
¹ at the loss however of the installed printers, on older versions of learn-ocaml, since they relied on the |
|
I know some teachers who were expecting this to be at least merged for their classes in June; can we go forward, or should I advise them to use an unofficial branch ? |
@AltGr thanks for your ping 👍. Sorry, was swamped with teaching lately, my plan actually is to integrate it as soon as possible once:
As a result, I'm afraid the feature won't be released this month, but definitely in July for September. |
Woops, I am really sorry for my lack of reply, I did not see the previous mention. I wonder if anyone actually uses the partitioning feature, I hope this is not a release-blocker. Anyway, even if I lack the time to implement any modification by myself, I am available to review or discuss any change if needed. |
Hi!
No worries, @nobrakal !
I think so (and hope so :)
But even if we don't have usage statistics, I think it is a "release-blocker", at least given the asak-partitioning feature was part of the previous stable releases of learn-ocaml!
OK, thanks… anyway we'll be able to discuss this with @yurug at the end of this week |
Having rushed to have this ready back in April, I have to say I am pretty disappointed that this hasn't been merged yet, esp. since I told a few teachers that it would be in a release for the semester start in September. I understand the issue with Asak getting temporarily disabled, but, like @nobrakal, I don't think that should be a release blocker: this is a massive overall improvement for everyone (the 100x speedup on |
@yurug I see you made attempt to repair Asak, thanks! did it work ? The patches make I don't remember precisely how Asak works but I think it should in theory be fine with just the |
Hi @AltGr, thanks a lot for your messages!, and for this very nice work 🙏
I fully understand—AFAICT, my OCaml lab sessions precisely start this week, and I would have loved to benefit from #481. No need to tell many details about the "why", but Yann and I got much less time than expected lately. BTW:
|
@gasche sure! as said previously, this PR is a priority! in particular as soon as the bugfix PR #506 is merged (certainly at our next learn-ocaml maintainer telco), we'll make a point release, then work on this PR #481. We'd also like to invite @AltGr at that point so that we can talk together with @yurug for the last steps of the review. |
|
||
let use_compiled_string code = | ||
(* jsoo supports dynload, but relies on expectations on the parent object that | ||
are no longer valid when running from a web-worker. Thus we compile with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it no longer valid ? Can anything be done on the jsoo side ? Consider opening a jsoo issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha, I am sorry, that was too long ago for me to remember precisely 😬
Indeed this could probably be worked around in jsoo; from what I remember, just trying to dynload from within a webworker is enough to point to the issue, with errors about stuff missing from the parent object.
`learn-ocaml build` now requires write access to the repository since it writes compilation artefacts in-place.
Signed-off-by: Yann Regis-Gianas <yann@regis-gianas.org>
Signed-off-by: Yann Regis-Gianas <yann@regis-gianas.org>
…haywire An uncaught exception could get caught upper on the stack, and lead the worker to start running pending lwt stuff that belong to the master.. Also attempt to fix "too many open files" error with many workers
since the libraries are already available
asak 0.4 is now released on opam
It's not expected that we remain compatible with versions that required exposing `solution.ml`.
these are required for compiling certain exercises
Closes ocaml-sf#529 which seemed to be a common complaint among teachers. * `learn-ocaml serve --replace` will kill an existing server (running on the same port) just before starting * `learn-ocaml build serve` with an existing server on the same port will fail fast (before actually doing the build) * `learn-ocaml build serve --replace` is more clever: - it will do the build *in a temporary directory* - then, only if everything is ok, kill the older server - swap the files and start the new server This is all done in order to minimise downtime and be convenient for server updates. Note that this PR sits on top of ocaml-sf#481 and should be rebased once it's merged.
Hi @AltGr, thanks for the merge!, but please wait for the learn-ocaml.el and learn-ocaml-client fixes before we can release 1.0.0 🚀 |
Congratulations for the merge! |
@erikmd Of course! Porting them should be less tedious now that this is merged |
It'll probably be worth releasing a 1.0~beta asap, to have a little more testing before the final release |
Hi @AltGr, More testing would be nice indeed!, but I think this does not require doing a beta release at all Indeed, end users can already use the Anyway, maybe you could prepare an announcement text mentioning |
Close #478, Close #414, Close #205, Close #312, Close #158