Support Instruction Dependency column and Discovery.adoc scraping/XML output#80
Open
raul-marquez-csa wants to merge 2 commits into
Open
Support Instruction Dependency column and Discovery.adoc scraping/XML output#80raul-marquez-csa wants to merge 2 commits into
raul-marquez-csa wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for parsing and rendering "Instruction Dependency" attributes in bitmaps, and adds specialized rendering logic for discovery bitmaps in the dm package. The review feedback highlights two critical issues: a type switch modification in matter/spec/table_info.go that changes a pointer type to a value type, which will cause runtime failures when matching AST elements, and a missing nil check in isDiscoveryDoc that could lead to a nil pointer dereference panic.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.
Addresses
Alchemy for hint tables #71750
Add Instruction Dependency column support
Alchemy ignores any bitmap-table column it doesn't have an explicit
TableColumnfor, so the new column has to be threaded through the whole pipeline. The following was performed:matter/tables.go
TableColumnInstructionDependencycolumn and registered it in the bitmap table's column setmatter/spec/table.go
"Instruction Dependency"header to that columnmatter/bitmap.go
InstructionDependencyfield (plus getter/setter) toBitmapBit, exposed it on theBitinterface,and propagated it through
Clone/JSONmatter/spec/bitmap.go
toBitmap()reads the column per bitdm/bitmap.go
renderBit()emits aninstructionDependencyXML attribute when a value is presentFix SpecialCharacter table-cell parsing
SpecialCharacter cells are stored as values, not pointers, so the pointer-form type switch never matched and any cell containing one errored out, a path the
PairingHintBitmaptable's bit-21 row is the first to hit. The fix:matter/spec/table_info.go
readRowCellValueElements()from case*asciidoc.SpecialCharacter:to the value form caseasciidoc.SpecialCharacter:Impact
instructionDependencyattribute on each ; bitmaps without the column are unaffected, since the attribute is omitted when empty.PairingHintBitmapis now generated todiscovery/PairingHint.xmlICDManagement.xml Excerpt
Before
After
Discovery.xml Excerpt