Skip to content

Commit 66752e5

Browse files
redsun82Copilot
andcommitted
Just: assorted follow-up fixes
- restate which `just` version these recipes actually need, correcting the earlier guess - three recipes (Kotlin extractor generation and codegen) do what their name promised, which they had stopped doing since being folded into the shared verbs - a coding-standards reference in `cpp/justfile` follows the fragment to where it now lives - `format` reaches the rest of the checked Python, including the models-as-data scripts, which had no justfile of their own Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 6c5350a commit 66752e5

7 files changed

Lines changed: 20 additions & 11 deletions

File tree

cpp/justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import '../lib.just'
2-
import? '../../cpp-coding-standards.just'
2+
import? '../../buildutils-internal/just/cpp-coding-standards.just'
33

44
[group('build')]
55
build: (_build_dist "cpp")

java/ql/test-kotlin1/justfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import "../justfile"
22

3-
# These are CI shards of the Kotlin language tests, run as `just java
4-
# kotlin-language-tests-1`, so they only run when asked for by name.
3+
# These are CI shards of the Kotlin language tests, too long to run by accident,
4+
# so a verb coming from above passes over them and they run only when this
5+
# directory is named.
56
explicit_verbs := ['test']
67

78
# Kotlin tests may fail the diags.ql consistency test if the diagnostic limit is set.

java/ql/test-kotlin2/justfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import "../justfile"
22

3-
# These are CI shards of the Kotlin language tests, run as `just java
4-
# kotlin-language-tests-2`, so they only run when asked for by name.
3+
# These are CI shards of the Kotlin language tests, too long to run by accident,
4+
# so a verb coming from above passes over them and they run only when this
5+
# directory is named.
56
explicit_verbs := ['test']
67

78
# Kotlin tests may fail the diags.ql consistency test if the diagnostic limit is set.

misc/codegen/justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import "../just/lib.just"
22

3-
test *ARGS="": (_bazel ['test', '@codeql//misc/codegen/...'])
3+
test *ARGS: (_bazel (['test', '@codeql//misc/codegen/...'] ++ ARGS))
44

55
format *ARGS=".": (_format_py ARGS)

misc/just/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ have common verbs (`build`, `test`, `format`, `lint`, `generate`) that individua
44
of the project can implement, and some common functionality that can be used to that
55
effect.
66

7-
`just` 1.58 or newer is required: recipes forward argument lists using `set lists`, which
8-
is still unstable and did not exist before then. An older one stops with an
9-
`Unknown setting` error pointing at that line, which is clear enough but does not say
10-
which version to move to.
7+
`just` 1.53 or newer is required. Recipes forward argument lists rather than encoding
8+
them as whitespace separated strings, and every piece of that arrived in that one
9+
release: `set lists`, list literals, the `++` operator, and variadic parameters that pass
10+
their elements on one at a time rather than space-joined. Lists are still unstable, at
11+
1.58 as much as at 1.53, which is what `set unstable` in `defs.just` is for. An older
12+
`just` stops at the first list literal it parses, complaining about an unexpected `[` and
13+
saying nothing about versions; only `defs.just` read on its own gives the clearer
14+
`unknown setting` naming `lists`.
1115

1216
# Forwarding
1317

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import "../../just/lib.just"
2+
3+
format *ARGS=".": (_format_py ARGS)

python/justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build: (_build_dist "python")
66

77
# Long filename needed for extractor tests (too long for Git on Windows)
88
[no-cd]
9-
@_ensure_long_filename:
9+
@_ensure_long_filename: _require_semmle_code
1010
#!/usr/bin/env bash
1111
longfile="$SEMMLE_CODE/ql/python/ql/test/extractor-tests/long_path/really_rather_too_long_for_windows_path_length/with_unecessarily_longwinded_and_verbose_sub_folder/extremely_long_module_name_with_lots_of_digits_at_the_end_000000000000000000000000000000000000000000000000000000000000000000/test0000000000000000000000000000000000000000000000000000000.py"
1212
mkdir -p "$(dirname "$longfile")"

0 commit comments

Comments
 (0)