Skip to content

Just: introduce common "verbs" #19978

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Just: introduce common "verbs" #19978

wants to merge 6 commits into from

Conversation

redsun82
Copy link
Contributor

@redsun82 redsun82 commented Jul 4, 2025

This introduces verbs (build, test, format, lint, generate) that individual parts of the project can implement, and some common functionality that can be used to that effect.

The core of the functionality is given by forwarding. The idea is that:

  • if you are in the directory where a verb is implemented, you will get that as per standard just behaviour.
  • if on the other hand you are beneath it, and you run something like just test rust/ql/test/..., then a forwarder script finds a common directory to all the positional arguments passed there, and then retries calling just test from there. If test is implemented beneath that (in that case, it is in rust/ql), it uses that recipe. Otherwise it detects falling back to the forwarder again and exits with an error.

Another point is how launching QL tests can be tweaked:

  • by default, the corresponding CLI is built from the internal repo (nothing is done if working in codeql standalone), and no additional database or consistency checks are made
  • --no-build can be passed to skip the build step (if no changes were made to the CLI/extractors). I'm considering unifying the options with pytest though (with a --codeql=built corresponding to the --no-build in this PR)
  • you can increase the "testing level" adding database and trap checks with a + argument, and adding consistency checks with ++. Both can be configured at the level of the ql directory

This is applied for the moment to rust, swift and codegen, although it does require changes in the internal repo to work.

@github-actions github-actions bot added Rust Pull requests that update Rust code Swift labels Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code Swift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant