Regarding dependencies: I know that dependencies with issues detected by JET.jl is a common concern with using JET.jl: In that case, it might be better run report_file on test/runtests.jl: Cf. Warning on analyze_from_definitions (which is the default for report_package) in Configurations · JET.jl
Not sure.
Check the result returned by report_package/report_file and call exit(status_code) with a non-zero status_code.
How? Is there a guide to what is returned there? Couldn’t figure out from the documentation.
Yes, just found it myself too!
So limiting it to my package indeed removes the external error.
However, now I have the opposite problem
All the sample errors are already caught during package precompilation stage.
What error would not be caught by compilation but will be caught by JET.jl?
Regarding checking result retuned by JET: Looks like the number of reports returned (somewhere) within the JET top-level result can be used to judge if errors were found by JET: JET.jl/print.jl at master · aviatesk/JET.jl · GitHub
There should be plenty of errors that JET can find, which will not be found by pre-compilation - check the docs.
LanguageServer.Diagnostic(LanguageServer.Range(LanguageServer.Position(2, 0), LanguageServer.Position(2, 26)), 3, missing, "Julia", "The included file can not be found.", missing, missing)
Is this the format of the log messages?
Does it just means the file was loaded incorrectly?
You are correct, this line in the file has an include("file.jl") statement.
I thought it was a matter of search path, but changing directory, or even putting the absolute path in include() doesn’t work, still gives the same error.
How would you go about debugging LanguageServer errors like this?
Thanks!
It reports errors in an external package which are not relevant, so I set CI_JULIA_JET_TARGET_DEFINED_MODULES: 'true'
Then:
result == "No errors detected"
result.res.toplevel_error_reports == JET.ToplevelErrorReport[]
result.res.inference_error_reports == JET.InferenceErrorReport[...errors...]
So it reports “No errors detected”, but then fails because inference_error_reports isn’t empty – it contains errors from that other package which I wanted to ignore (and not my package).