Repository navigation
sleek-wren-716 #1004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
sleek-wren-716 #1004
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
efc41ea
WIP: sleek-wren-716
briansrls 9676dfd
WIP: sleek-wren-716
briansrls 97b872b
Merge remote-tracking branch 'origin/main' into session/sleek-wren-716
briansrls 37fd1bd
chore: apply cargo fmt
briansrls 5518b68
WIP: sleek-wren-716
briansrls cb4e546
chore: apply cargo fmt
briansrls be441dd
WIP: sleek-wren-716
briansrls 4787680
fix(ci): sync parse corpus manifest and SG-0 test census
briansrls 1663a48
merge: origin/main into session/sleek-wren-716
briansrls 0c65c2c
Merge remote-tracking branch 'origin/main' into session/sleek-wren-716
briansrls fc7c859
merge: origin/main into session/sleek-wren-716
briansrls 650d22d
WIP: fierce-owl-161
briansrls e483082
WIP: fierce-owl-161
briansrls 67d5d2b
WIP: fierce-owl-161
briansrls File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
2,609 changes: 1,306 additions & 1,303 deletions
2,609
src/v3/compiler/src/bootstrap_generated_without_parse_surface.rs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
src/v3/compiler/tests/integration/shape_a_target_source_filtering_authority_test.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| //! **Layer:** integration | ||
| //! | ||
| //! Regen-clean ratchet: Shape-A Rust/Go/Python target specs must bind | ||
| //! `*_source_filtering.internal` to the single canonical | ||
| //! `data internal_source_filtering` in `computation_model.dag`, not fork | ||
| //! independent `excluded_prefixes` lists (internal/bootstrap declaration | ||
| //! prefix drift across targets). | ||
|
|
||
| const COMPUTATION_MODEL: &str = include_str!("../../../std/computation_model.dag"); | ||
| const RUST_SPEC: &str = include_str!("../../../spec/rust.dag"); | ||
| const GO_SPEC: &str = include_str!("../../../spec/go.dag"); | ||
| const PYTHON_SPEC: &str = include_str!("../../../spec/python.dag"); | ||
|
|
||
| const CANONICAL_BINDING: &str = "internal: internal_source_filtering"; | ||
|
|
||
| /// Returns the `{ ... }` value block for a `data <name>: <Ty> = {` row starting | ||
| /// at `row_prefix` (must be unique in `spec`). Used so the canonical `internal` | ||
| /// binding is asserted inside the specific declaration, not anywhere in the file. | ||
| fn struct_value_block<'a>(spec: &'a str, row_prefix: &str) -> &'a str { | ||
| let pos = spec.find(row_prefix).unwrap_or_else(|| { | ||
| panic!("expected `{row_prefix}` in spec"); | ||
| }); | ||
| let tail = &spec[pos..]; | ||
| let open = tail | ||
| .find('{') | ||
| .unwrap_or_else(|| panic!("expected `{{` after `{row_prefix}`")); | ||
| let from_brace = &tail[open..]; | ||
| let mut depth: i32 = 0; | ||
| let mut end_byte = 0usize; | ||
| for (i, c) in from_brace.char_indices() { | ||
| match c { | ||
| '{' => depth += 1, | ||
| '}' => { | ||
| depth -= 1; | ||
| if depth == 0 { | ||
| end_byte = i + c.len_utf8(); | ||
| break; | ||
| } | ||
| } | ||
| _ => {} | ||
| } | ||
| } | ||
| assert!(end_byte > 0, "unclosed `{{` for `{row_prefix}`"); | ||
| &from_brace[..end_byte] | ||
| } | ||
|
|
||
| #[test] | ||
| fn computation_model_declares_internal_source_filtering() { | ||
| assert!( | ||
| COMPUTATION_MODEL.contains("data internal_source_filtering: SourceFiltering"), | ||
| "expected `data internal_source_filtering: SourceFiltering` in computation_model.dag" | ||
| ); | ||
| } | ||
|
|
||
| #[test] | ||
| fn shape_a_target_specs_reference_canonical_internal_source_filtering() { | ||
| for (label, row, spec) in [ | ||
| ( | ||
| "rust.dag", | ||
| "data rust_source_filtering: ShapeATargetSourceFiltering", | ||
| RUST_SPEC, | ||
| ), | ||
| ( | ||
| "go.dag", | ||
| "data go_source_filtering: ShapeATargetSourceFiltering", | ||
| GO_SPEC, | ||
| ), | ||
| ( | ||
| "python.dag", | ||
| "data python_source_filtering: ShapeATargetSourceFiltering", | ||
| PYTHON_SPEC, | ||
| ), | ||
| ] { | ||
| assert!(spec.contains(row), "{label}: expected `{row}`"); | ||
| let block = struct_value_block(spec, row); | ||
| assert!( | ||
| block.contains(CANONICAL_BINDING), | ||
| "{label}: `{row}` value must bind `{CANONICAL_BINDING}` (got block: {block:?})" | ||
| ); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding
shape_a_target_source_filtering_authority_testintroduces a new hand-authored.rsfile undersrc/v3/compiler/tests/integration/, butEXPECTED_HAND_AUTHORED_TESTinsg0_census_test.rswas not updated, so the ratchet now fails (cargo test -p v3-compiler sg0_v3_hand_authored_censuspanics with census drift and reports this exact path as unexpected). This breaks the integration test suite until the new file is added to the census list (or otherwise moved behind a generator path).Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified — already fixed on branch
The finding was correct for the pre-fix tip (e.g.
be441ddd):shape_a_target_source_filtering_authority_test.rswas missing fromEXPECTED_HAND_AUTHORED_TEST.Current
session/sleek-wren-716includes478768063, which adds that path toEXPECTED_HAND_AUTHORED_TESTinsg0_census_test.rs(sorted with the otherintegration/*.rsentries).sg0_v3_hand_authored_census/sg0_v3_test_hand_authored_subratchetpass on that head.If the connector was pinned to an earlier SHA, refresh to
478768063or later.