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
Blocking bug: some graders fail with Error: Ctype.Unification_trace.Unify(_)
#457
Comments
I skimmed the compiler-libs code, so it seems the error comes from a call to the But I can't see where the exception |
Here is another example: let x = 10 ;;
let v = Introspection.get_value "x" [%ty: int] ;; It produces the following trace:
WorkaroundLike this, it works: module I = Introspection
let x = 10 ;;
let v = I.get_value "x" [%ty: int] ;; module Introspection = Introspection
module type tARITH_TEACHER = sig
type t
val zero : t
val one : t
val add : t -> t -> t
val mul : t -> t -> t
val opp : t -> t
val of_int : int -> t
val to_string : t -> string
end
let foo0 () = Introspection.get_value "INT" [%ty: (module tARITH_TEACHER)] Strange, isn't it? So, to fix (temporarily) the problem, you can add the following code: handle_error (internal_error [%i"while preparing the tests"]) @@
Toploop_ext.use_string ~print_outcome ~ppf_answer
"module Introspection = Introspection" ; to the file: https://github.com/ocaml-sf/learn-ocaml/blob/master/src/grader/grading.ml#L143 have a good day, Loïc |
Thanks a lot, @lsylvestre ! ✨ I'll merge your workaround now to be able to use |
Graders using module `Introspection` (which used to work with 0.12) should now work with `ocamlsf/learn-ocaml:master` as well, i.e., they should not raise `Ctype.Unification_trace.Unify(_)` any longer. href: ocaml-sf#457 (comment)
…461) Graders using module `Introspection` (which used to work with 0.12) should now work with `ocamlsf/learn-ocaml:master` as well, i.e., they should not raise `Ctype.Unification_trace.Unify(_)` any longer. href: #457 (comment)
Bug description
I noticed this week a regression:
some graders of my lab sessions (relying on and extending code from
Test_lib
, so involving direct calls toIntrospection
) worked fine with 0.12 but now fail noisily with 0.13.x with the following error:To Reproduce
I was able to craft a minimal working example:
test.ml
:@AltGr, would you have an idea to isolate/fix the issue?
I hope this could be fixed or workarounded (so that the grader behaves the same as with 0.12).
Current configuration
The text was updated successfully, but these errors were encountered: