Repository navigation
Conversation
…-ignore-element `arxmodel values PATTERN <file|dir>...` merges the files as get does and prints every value whose AUTOSAR path a path glob matches, or lies below a path it matches, one a line, `path = "text"`. A value the merge names by its definition (an ECUC parameter or reference value) is its container's path and the definition's last name (`/Pkg/Cfg/Dim = "10"`), its label a key; its other parts follow a `#`. Any other value is named as findings name elements (`/Pkg/Lamp#WATTS = "55"`). The walk writes each path into one builder and matches the glob on its bytes: a string is made only for a value printed. Checked.values is the library's. `--ignore-element NAME` (check, merge, get, list, values, diff, merge3, git-diff) treats an element as structured comments are treated: its content is not compared. Its differences are no finding, no change and no conflict, and it is no part of the content that tells the values of one definition apart (the schema's identity roles and the built-in rules alike) nor of a repeated role's content hash. The repetition hashes now leave structured comments out too, as the merge does. On a large real-world model: a value query takes the load and merge plus up to 0.6 s, at the same peak memory; check and diff take the same time and memory as before and, without the option, give the same output. A diff between two versions of that model printed mostly a tool's annotations (a value gaining one even showed as removed and added); with them not compared, about an eighth of the lines remain: the configuration that changed. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- values: an element with a path of its own is no item, though the built-in rules name it by its definition too (a container's SHORT-NAME was printed as a value); an item that gives no definition is not named by one, as the merge does not name it so. - merge3: two sides adding content not compared, differently, is no conflict: for an addition the conflict's node is the base's parent, so the added node is the one to look at. - Content hashes: an element not compared is its name alone, also where it is a repeated role's item itself; the repetition check says nothing in content not compared. - The built-in identity rules' state is copied per Flat, the rule's keys bound to the copy: a second ruling's ignored elements no longer reach the first's keys. new_ruling and check_typed build on the Flat's rules, not the original's. Each has a test that fails without it. On a large real-world model: check and diff take the same time and peak memory as on main and, without the option, give the same output. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- values `/`: the root, so every value (no segment matched nothing). - An item name two identity roles share, under different parents: every role is a candidate, not the last one read. - An element a key reads (a short name, a definition, a label: Flat.key_elements) is always compared: ignore_content leaves it out, and the command refuses it (exit 2), since items named by it would otherwise come and go as it changes. - An item's value is the last element its first fragment writes, after its definition, as the file has it: an ignored value makes no other part the value, and neither does the merge's order (under the built-in rules, where two files give an item each its own value, the first file's takes the item's path). - merge3: a node one side removed while the other changed only content not compared inside it is removed, ours or theirs, and no conflict; a node with a conflict besides keeps ours. A move on one side and a change inside on the other is no conflict to begin with (flatxml's moved conflicts are moves on both sides). On a large real-world model with its schema, values gives the same output as before at the same time and peak memory. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- merge3: both sides adding one node that differs only in content not compared is no conflict (their content hashed without it, fragment by fragment); ours is kept. - values: an item's value is, of its parts, one no fragment writes another part after; of several the last in the merged view, and of copies of that element (one a file) the first, the first file's. An item split over files, its first fragment holding only a flag, no longer makes the flag its value. - check: case_only says nothing in content not compared. - Repetitions: an ignored item of a repeated role is no item of its sequence, so fragments holding different numbers of it do not differ. On a large real-world model, values gives the same output as before, with its schema and with the built-in rules. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…nly) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Closed rather than rebased. The real need is diff noise from tool bookkeeping: on a real ECUC commit, 65 of 79 diff lines were ANNOTATIONS. Filtering the output covers it ( |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Split out of #9 so
valuescould merge: this is the--ignore-elementwork and its review rounds, parked.State: the branch still carries the old #9 history (values included) and a half-done fix commit; it needs a rebase onto
mainonce #9 is in, and is not ready for review.Open review findings to address (from #9):
The scope question stays open too: keeping
--ignore-elementtocheck,diffandvalues, and refusing it formerge3, would remove most of these.🤖 Generated with Claude Code