Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 17 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bug report
description: WeaveC crashed, rejected valid code, or accepted unsafe code
description: weavec-cc crashed, trapped on a correct program, or let a memory bug through
title: "[bug]: "
labels: [bug, needs-triage]
body:
Expand All @@ -8,10 +8,12 @@ body:
attributes:
label: Kind of bug
options:
- False positive (safe code rejected)
- False negative (unsafe code accepted)
- Crash / assertion failure
- Wrong or unhelpful diagnostic
- False trap (a correct program stopped)
- Missed bug (an unsafe access ran)
- Crash / assertion failure in weavec-cc
- Wrong or unhelpful report
- Project fails to build with weavec-cc (drop-in)
- Performance (run time, build time, memory)
- Build or installation problem
- Other
validations:
Expand All @@ -22,8 +24,9 @@ body:
attributes:
label: Minimal reproducer
description: >
The smallest C program that shows the problem, plus the exact `weavec`
command line. Please avoid system headers where possible.
The smallest C program that shows the problem, plus the exact
`weavec-cc` command line and how you ran the program. Please avoid
system headers where possible.
render: c
validations:
required: true
Expand All @@ -32,7 +35,10 @@ body:
id: actual
attributes:
label: Actual behaviour
description: Full diagnostic output or crash backtrace.
description: >
The full report (`weavec: <kind> at ...`), compiler output or crash
backtrace. `WEAVEC_RT_BACKTRACE=1` adds the stack of the access that
stopped the program.
render: text
validations:
required: true
Expand All @@ -47,8 +53,9 @@ body:
- type: input
id: version
attributes:
label: weavec --version
placeholder: "weavec version 0.1.0-dev (abc123def456), built with LLVM 23.1.0"
label: weavec-cc --version
description: The `weavec-cc version` lines at the end of `weavec-cc --version`.
placeholder: "weavec-cc version 0.16.0 (abc123def456), built with LLVM 23.1.0"
validations:
required: true

Expand Down
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature request
description: Propose an analysis, annotation, diagnostic, or tooling improvement
description: Propose a guard, runtime, driver, or tooling improvement
title: "[feature]: "
labels: [enhancement, needs-triage]
body:
Expand All @@ -16,8 +16,8 @@ body:
attributes:
label: Proposal
description: >
How should WeaveC behave? Include example C code and the diagnostics or
inference results you would expect.
How should WeaveC behave? Include example C code and what you would
expect `weavec-cc` and the program it builds to do.
validations:
required: true

Expand All @@ -31,8 +31,8 @@ body:
attributes:
label: Affected areas
options:
- label: Core ownership / borrow / lifetime model (`lib/Core`)
- label: Inference or checkers (`lib/Analysis`)
- label: Clang integration or driver (`lib/Frontend`, `tools/`)
- label: Annotations (`weavec.h`)
- label: Guard passes (`lib/Frontend/Guard*.cpp`)
- label: Library table (`lib/Core/LibrarySpec.txt`)
- label: Runtime (`runtime/`)
- label: Driver (`lib/Frontend/Driver.cpp`, `tools/weavec-cc`)
- label: Build, CI, or documentation
16 changes: 8 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ Small, focused PRs are much easier to review than large ones.

<!--
Anything a reviewer should know: alternatives considered, trade-offs,
interactions with the ownership model, follow-up work. Changes to Core,
checker rules, annotations or diagnostic ids must link the RFC in docs/rfcs/
that specifies them.
what it costs at run time or build time, follow-up work. Changes to the
library table, the guard passes, the runtime, the annotation or the
run-time report kinds must link the RFC in docs/rfcs/ that specifies them.
Delete this section if not applicable.
-->

## Test plan

<!-- How was this verified? New lit/unit tests? Manual runs? -->
<!-- How was this verified? New lit/unit tests, cases, corpus runs? -->

- [ ] Unit tests added/updated (`unittests/`)
- [ ] Integration tests added/updated (`test/`)
- [ ] `ninja check-weavec` passes locally
- [ ] Unit tests added/updated (`unittests/`, `runtime/test/rt_test.c`)
- [ ] Integration tests added/updated (`test/Guards`, `test/Driver`, `test/cases`)
- [ ] `ctest --preset dev` passes locally (a runtime change: on Darwin and Linux)

## Checklist

- [ ] Code is formatted (`scripts/format.sh`) and passes clang-tidy
- [ ] Public headers and behaviour changes are documented
- [ ] Conventional Commit PR title and user-visible changes documented (changelog is generated)
- [ ] No new dependencies on Clang/LLVM introduced into `lib/Core`
- [ ] `scripts/check-hygiene.py` passes (no Clang/LLVM in `lib/Core`, runtime entry points declared in `weavec_rt.h`, line budgets)
29 changes: 9 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ jobs:
- name: Linux / Clang / Debug + ASan/UBSan
os: ubuntu-24.04
preset: ci-debug
# The test/cases suites analyse and build (guard passes and all)
# under ASan, without running the case programs.
# The test/cases suites build (guard passes and all) under ASan,
# without running the case programs.
configure-args: -DWEAVEC_CASES_ARGS=--no-run
- name: Linux / Clang / Release
os: ubuntu-24.04
Expand Down Expand Up @@ -148,37 +148,27 @@ jobs:
ulimit -c 0
ctest --preset "${{ matrix.preset }}" -j "$(getconf _NPROCESSORS_ONLN)"

- name: Documentation examples
env:
ASAN_OPTIONS: detect_leaks=0:allow_user_poisoning=0
run: |
python3 docs/scripts/check-examples.py \
--weavec "build/${{ matrix.preset }}/bin/weavec" \
--weavec-cc "build/${{ matrix.preset }}/bin/weavec-cc"

# RFC 0035 gate H1: no checked-mode or old-engine residue, no library
# names compared outside the LibrarySpec table, no corpus project names
# in lib/, the engine seam, and the engine, library and runtime line
# budgets.
# RFC 0036 gate H1: no library names compared outside the LibrarySpec
# table, no corpus project names in lib/, the layering of lib/Core and
# the runtime, the runtime's entry points against the passes', and the
# library and runtime line budgets.
- name: Repository hygiene
if: runner.os == 'Linux' && matrix.preset == 'ci-release'
run: |
python3 scripts/test_check_hygiene.py
python3 scripts/check-hygiene.py

# RFC 0035 (section 11): the corpus gate's own tests, then --quick over
# pinned corpus configurations in test/corpus/: the weavec analysis
# against the triage in test/corpus/triage.json, and the enforcement
# ledgers of per-file weavec-cc compiles against the ratchet in
# pinned corpus configurations in test/corpus/: the enforcement ledgers
# of per-file weavec-cc compiles against the ratchet in
# test/corpus/expected.json. The weekly Corpus workflow runs --full.
- name: Pinned corpus
if: matrix.preset == 'ci-release'
run: |
python3 scripts/test_corpus_gate.py
python3 scripts/corpus-gate.py --quick \
--weavec "build/${{ matrix.preset }}/bin/weavec" \
--weavec-cc "build/${{ matrix.preset }}/bin/weavec-cc" \
--only log.c --only cJSON-program --only linenoise-program \
--only log.c --only cJSON --only linenoise-program \
--only jansson --json corpus-gate-quick.json

- name: Upload pinned corpus results
Expand All @@ -192,7 +182,6 @@ jobs:
- name: Smoke-test install
run: |
cmake --install "build/${{ matrix.preset }}" --prefix "$RUNNER_TEMP/weavec-install"
"$RUNNER_TEMP/weavec-install/bin/weavec" --version
"$RUNNER_TEMP/weavec-install/bin/weavec-cc" --version
printf 'int main(void) { return 0; }\n' > "$RUNNER_TEMP/hello.c"
"$RUNNER_TEMP/weavec-install/bin/weavec-cc" "$RUNNER_TEMP/hello.c" -o "$RUNNER_TEMP/hello"
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/corpus.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Corpus

# Runs the full corpus gate (RFC 0035, section 11) over the projects pinned
# by SHA in test/corpus/manifest.json, but the sealed sets: the weavec
# analysis and the per-file enforcement ledgers (checked against
# test/corpus/triage.json and test/corpus/expected.json), each project's
# build and test suite with CC=weavec-cc in trap mode (rerun in report mode,
# by SHA in test/corpus/manifest.json, but the sealed sets: the per-file
# enforcement ledgers (checked against test/corpus/expected.json), each
# project's build and test suite with CC=weavec-cc in trap mode (rerun in
# report mode, with the guard failures of test/corpus/triage.json allowed,
# and built once more with the reference compiler for the build-time gate),
# the injected bugs and the benchmarks (against the reference compiler and
# ASan). The gate clones the projects into build/corpus. Pull requests run
Expand Down Expand Up @@ -61,7 +61,6 @@ jobs:
- name: Run corpus gate
run: |
python3 scripts/corpus-gate.py --full \
--weavec build/ci-release/bin/weavec \
--weavec-cc build/ci-release/bin/weavec-cc \
--json corpus-gate-full.json

Expand Down
Loading
Loading