This mode (enabled with `--codeql=build-as-test` or setting
`PYTEST_CODEQL=build-as-test` in the environment) is an experimental
mode that makes the pytest dist installation run as a test. This
allows to avoid running the installation in case nothing changed in the
dist, leveraging bazel's test caching mechanism, and accelrating the
dev loop when working on integration test code. This mode might become
the default for devs in the future.
Up until now, this mode was only working on POSIX systems. This commit
fixes it on Windows. The issue was `native_test` being unable to wrap
a `py_binary` target because of an `.exe` suffix mismatch. Turning the
`native_test` into a full-fledged `py_test` solves the issue.
A `publish` directory for a C# binary contains copies of some DLLs
inside localized subdirectories (e.g. `ru`). We want to ignore those, as
otherwise our packaging machinery now goes haywire, with the newer
version of `rules_csharp`. In any case we never shipped those.
This adds the possibility to add a special `proc_macro.rs` source file
to QL tests, which will be generated into a `proc_macro` crate the
usual `lib` crate depends on.
This allow to define procedural macros in QL tests, and is here used to
move the `macro-expansion` integration test to be a language test
instead.
As the generated manifests involved were starting to get a bit complex,
they are now generated from a `mustache` template.
This required some code changes because of some breaking changes in
`clap` and `tree-sitter`.
Also needed to assign a new bazel repo name to the `crates_vendor` to
avoid name conflicts in `MODULE.bazel`.
The rust-analyzer update will need more work as it seems to break rust
analysis on windows.
This was carried out using `cargo upgrade` from `cargo-edit`:
* getting exclusions options for rust-analyzer with
```bash
cargo upgrade -i --dry-run | grep -o 'ra_ap_\S\+' | sort -u | sed 's/^/--exclude=/' > /tmp/exclude
```
* running
```bash
cargo upgrade -i $(cat /tmp/exclude)
misc/bazel/3rdparty/update_cargo_deps.sh
```