Skip to content
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

Merged
merged 41 commits into from
Nov 3, 2023

Commits on Nov 3, 2023

  1. feat!: Implement pre-compilation of exercises and graders

    to cmi, cma and js.
    
    Includes changes to the toploop to handle the dynamic loading.
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    b03bdfe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    47d5a06 View commit details
    Browse the repository at this point in the history
  3. refactor: Get rid of the pseudo-cipher

    Finally :)
    
    This should give a nice economy of bandwidth since the unciphered compilation
    artifacts will compress much better.
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    2792faf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    87ee902 View commit details
    Browse the repository at this point in the history
  5. perf: Make learn-ocaml build parallel by default

    (now that it's fixed)
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    eaad14c View commit details
    Browse the repository at this point in the history
  6. feat: Include Prelude/Prepare and shadow them

    instead of just `open`. This restores the toplevel output on values defined in
    Prelude, and forbids access to the interface of Prepare (which were two small
    regressions with pre-compilation).
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    787840b View commit details
    Browse the repository at this point in the history
  7. fix: Properly type samplers

    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    a97f813 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7422ca4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e63359e View commit details
    Browse the repository at this point in the history
  10. fix: Fix segfault on graders using samplers returning newly defined e…

    …xceptions
    
    (or extensible variant cases)
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    c61a4d0 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    7825a6b View commit details
    Browse the repository at this point in the history
  12. build: Make make testrun parallel

    (now that it works!)
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    46631d8 View commit details
    Browse the repository at this point in the history
  13. feat(ppx-metaquot): Add transformation introducing the `register_samp…

    …ler` calls
    
    * A new transformation has been added that inserts
      `let () = Introspection.register_sampler name fun`
      for each toplevel binding prefixed with `sample_*` in test.ml.
    
    * Compilation units stored in `demo-repository/exercises/exercise_name/`
      during the precompilation are no longer staged.
    hernoufM authored and AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    3cd75f5 View commit details
    Browse the repository at this point in the history
  14. feat: Restore compatibility with static deployment

    Previous patch on byte/js selection broke static servers. This restores
    the compatible API by using GET args to filter the answer (on a static
    server, no filtering will be done but that just means a little more
    bandwidth usage).
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    f0e8346 View commit details
    Browse the repository at this point in the history
  15. refactor: Rename and generalise recorder to ppx_autoregister

    Functorising to add parameters so that it can be used to inject printer
    registerers as well, for example.
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    99e913d View commit details
    Browse the repository at this point in the history
  16. feat: Add support for a test_libs.txt file in exercises

    It just contains the names of the ocamlfind libraries to link in.
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    d22a788 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    e768616 View commit details
    Browse the repository at this point in the history
  18. feat: Provide lib to compile grader helper libraries

    and facility to link them during the `build` step.
    
    NOTE: the helper library is going to be included in every exercise. A
    lighter approach could be to keep loading it separately, e.g. after
    loading the cma/js file from a directory holding static content on the
    server (and removing the `.cma` from the compilation line in
    `precompile_exercise.ml`).
    
    This will probably fit well once we include such a mechanism for loading
    custom libraries as the prelude to exercises, the main difference being
    that the latter will also need the `cmi` files.
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    3fc41ca View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    7d27523 View commit details
    Browse the repository at this point in the history
  20. fix: Do some cleanup & Fix mutation_testing test lib

    Now, an optional library that demonstrates the use of grader libraries.
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    c432909 View commit details
    Browse the repository at this point in the history
  21. refactor: Generalize sampler typing

    sync'ing with printer handling and the newer ppx that has the module name.
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    264db4c View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    1ec3af6 View commit details
    Browse the repository at this point in the history
  23. refactor: Disable debug flags

    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    54851dd View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    f028b75 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    9155145 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    2c89d9e View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    32ad13e View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    466e80c View commit details
    Browse the repository at this point in the history
  29. fix(ci): Fix permission issues

    `learn-ocaml build` now requires write access to the repository since it writes
    compilation artefacts in-place.
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    fa2cd23 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    5b4e0ab View commit details
    Browse the repository at this point in the history
  31. fix: Expose prepare.ml file

    Signed-off-by: Yann Regis-Gianas <yann@regis-gianas.org>
    yurug authored and AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    365cbb7 View commit details
    Browse the repository at this point in the history
  32. fix(partition-view): Reactivate the feature

    Signed-off-by: Yann Regis-Gianas <yann@regis-gianas.org>
    yurug authored and AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    57ca10b View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    ee57ac1 View commit details
    Browse the repository at this point in the history
  34. strengthening(grader): Add a safeguard against grading workers going …

    …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
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    cb417d1 View commit details
    Browse the repository at this point in the history
  35. fix(grader): allow exercises to use vg, gg

    since the libraries are already available
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    ead187e View commit details
    Browse the repository at this point in the history
  36. fix(teacher_tab): use newer asak compatible with precompilation

    asak 0.4 is now released on opam
    nobrakal authored and AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    942edc2 View commit details
    Browse the repository at this point in the history
  37. doc: update index.md

    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    f572990 View commit details
    Browse the repository at this point in the history
  38. fix(build): update lockfiles

    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    f1abb7d View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    b94f053 View commit details
    Browse the repository at this point in the history
  40. fix(CI): disable compat tests with 0.12, 0.13

    It's not expected that we remain compatible with versions that required exposing
    `solution.ml`.
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    91a418e View commit details
    Browse the repository at this point in the history
  41. fix(docker): install more libs in server image

    these are required for compiling certain exercises
    AltGr committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    6ce797f View commit details
    Browse the repository at this point in the history