Skip to content

Improve clerk handling of the exception-tree building#1050

Open
AltGr wants to merge 4 commits into
masterfrom
exntree
Open

Improve clerk handling of the exception-tree building#1050
AltGr wants to merge 4 commits into
masterfrom
exntree

Conversation

@AltGr

@AltGr AltGr commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

This relaxes the need to run ninja by fine-tuning the args needed by Catala.

NOTE: I removed the make_absolute from the JSON printing -- the relative path is now correct -- but the result in VScode should be checked for surprises

Also: adds a missing mli and hyperlinks (you can now click the conditions in the trace in terminal output)

@vincent-botbol vincent-botbol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this current state, it doesn't work properly in the extension. The path is relative to the project's root which is not necessarily our cwd when we are in VScode, hence the links are broken. Perhaps, the extension could do some work on its side but, for resilience sake, I think it's best to leave this path as absolute.

AltGr added 3 commits June 10, 2026 15:28
This adds a special "inline mode" for clerk targets, that will run `catala`
directly from the project root, with its stdlib pointing to its installed
directory rather than `_build/libcatala`. This mode assumes that the run command
does not write any files.
@AltGr

AltGr commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

I am still not convinced by absolute paths (although it certainly is the fastest reliable fix in this case) ; but you actually point to an issue outside of this consideration: when running clerk, the paths are generally expected to be relative to the CWD, not the project root. For example, you can run clerk test . from a subdirectory of your project, and the file names reported will be relative to that subdirectory.

Do you think that fixing this would solve your issue in any way, or is it unrelated ?

rather than the repository root. Also affects the json_schema command.
@AltGr

AltGr commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

I fixed that, and according to my tests that fixed it in the extension as well, @vincent-botbol what do you think ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants