-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
51 lines (40 loc) · 1.94 KB
/
Copy pathjustfile
File metadata and controls
51 lines (40 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
set positional-arguments
native_build_dir := "build/native-abi3"
default:
@just --list
# Format the native Stable-ABI Rust workspace.
native-format:
cargo fmt --manifest-path native/dotpython-abi3/Cargo.toml --all
# Check native formatting and run Clippy with warnings as errors.
native-lint:
cargo fmt --manifest-path native/dotpython-abi3/Cargo.toml --all -- --check
cargo clippy --manifest-path native/dotpython-abi3/Cargo.toml --workspace --all-targets -- -D warnings
# Build, verify, test, and stage the native Stable-ABI artifacts.
native-test:
cargo test --manifest-path native/dotpython-abi3/Cargo.toml --workspace
native/dotpython-abi3/build.sh "{{native_build_dir}}"
# Format C#, project files, and native Rust sources with the configured tools.
format: native-format
dotnet tool restore
dotnet csharpier format .
# Pinned PEG grammar for the current Python language target (see ADR-015 for the re-pin procedure).
python_grammar := "src/DotPython.ParserGenerator/Grammar/python314-subset.gram"
generated_parser := "src/DotPython.ParserGenerator/Generated/PythonGrammar.g.cs"
# Regenerate the checked-in executable parser from the pinned PEG grammar.
parser-generate:
dotnet run --project src/DotPython.ParserGenerator.Tool -- generate {{python_grammar}} {{generated_parser}}
# Fail when the checked-in parser does not match deterministic regeneration.
parser-check:
dotnet run --project src/DotPython.ParserGenerator.Tool -- check {{python_grammar}} {{generated_parser}}
# Check formatting and compile with all configured analyzers and warnings as errors.
lint: parser-check native-lint
dotnet tool restore
dotnet csharpier check .
dotnet build DotPython.sln --configuration Release
# Run the DotPython CLI. Additional arguments are passed through unchanged.
run *args:
#!/bin/sh
if [ "${1-}" = "--" ]; then
shift
fi
dotnet run --project src/DotPython.Cli/DotPython.Cli.csproj -- "$@"