feat(build): honour panicFrames of a profile block #193
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/33-panic-frames"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #33
What
CompileProfile.macros()addsTORB_PANIC_FRAMES=1or=0from the project'spanicFrames. The program and the script host object get the same macros, and the host's cache key includes them.runtime/include/torb.h:TORB_FRAMESfollowsTORB_PANIC_FRAMESwhen it is defined (GCC and Clang only). When it is undefined, it falls back toTORB_PROFILE_DEVas before, and the comment says so. The emitted C does not change; the emit-c frame tests are untouched.Manifest.profileInside(name, roots), so it can be unit-tested.panicFramessentence dropped from "What is left"), theproject-trb.mdrow,standard-library/project.md,torb-build.md, PANICS.md,errors/panic.md, and the doc comments ofProfile,ProfileSettingsandCompileProfile.macros.skills/is regenerated.Why
Before this change,
panicFrameswas read and then ignored: the profile alone decided whether a panic printed frames.Tests
compiler/tests/driver.test.trb, "The macros of a profile": pins the macro list for the dev and release defaults, for a block that overrides either profile, and for a block inherited from a workspace root (where the member's own block wins).tools/panic-frames.sh, a new tier A gate inlane_sessions, checks againsttests/panic-frames/transcript.expected:dropped(profile "dev" { panicFrames = false }) andkept(profile "release" { panicFrames = true }) are each built under both profiles and run, and also run throughtorb test --nativeunder both profiles.manifest --checkgate.torb format --checkon the touched files,docs skill, andtools/check-commits.sh. No C compiler is available locally, so the native frame lines of the transcript are hand-written and CI confirms them.panicFramesof a profile block #33Approved. Checklist for
7f4c2a9:tools/panic-frames.shcovers both directions fortorb buildandtorb test --native, plus the VM. CI is green on this head (tier A, tier B, bootstrap, gates, pdisc).TORB_PANIC_FRAMES=1|0is appended after the profile macros.torb.hfalls back toTORB_PROFILE_DEVwhen the macro is undefined, so an older driver and a newer runtime still agree. The host object gets the same macros and they are in its cache key.profileInsidekeeps the previous inheritance semantics.skills/is regenerated and the pdisc check is green.Non-blocking: none.
Approved (review above), but the merge failed:
POST /pulls/193/merge(Do=rebase, head_commit_id=7f4c2a9, delete_branch_after_merge=true) returned HTTP 405{"message":"Please try again later"}. The PR is still open and mergeable=true at last check. Not retried; please merge it or request review again.