Closed vrindisbacher closed 2 weeks ago
Closes (#835).
@nilehmann, is there a straight forward way to get the span for the wrapping function? I only know how to get the struct's (and it's related impls) span, since it seems like the span for the field access in the function body has no parent.
no, there's no easy way right now. When we construct a CheckerError
we only pass the Span
of the current Statement
being checked and I don't think you can go from that to the span of the containing function. However, I think we don't emit CheckerError
s in too many places so something we could try is not implement Diagnostic
for CheckerError
this will point to all the places where we emit it and hopefully we will have the DefId
of the function at those places, for example, here https://github.com/flux-rs/flux/blob/main/crates/flux-refineck/src/lib.rs/#L154. At those places, we can call a helper function that takes a GlobalEnv
, a CheckerError
, and the DefId
of the containing function, it then constructs the Diag
and emits it.
Hmm, not sure why the CI stuff is failing. It builds fine locally, and the line it's complaining about is different than what the dialog points to...
@vrindisbacher I think you local branch is too old. The ci is failing because it runs on the code after being merged with main.
See here