feat: allow components with duplicate procedure roots to be merged#2164
Merged
feat: allow components with duplicate procedure roots to be merged#2164
Conversation
bobbinth
approved these changes
Dec 11, 2025
Contributor
bobbinth
left a comment
There was a problem hiding this comment.
Looks good! Thank you! The changes in this PR by itself are fine, but I do think that we can simplify ProcedureInfoBuilder to be:
struct ProcedureInfoBuilder {
procedures: BTreeSet<AccountProcedureRoot>,
}And also, it is not clear to me whether the ProcedureInfoBuilder name is appropriate any more, and maybe we can refactor this structure to be more in-line with the new approach.
I left a comment about this in the base PR - so, we can do it either there or here.
Base automatically changed from
pgackst-remove-procedure-offset-and-size
to
next
December 13, 2025 18:17
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.
Allow components with duplicate procedure roots to be merged.
For #1329, named storage slots should technically solve the issue, because each getter will commit to the slot name it accesses. If we assume each component contains unique storage slots, then everything should work out fine (without this PR).
Thinking in terms of sharing slots between components #1394 (comment), I could imagine edge cases where it happens that two components have a procedure or getter that is identical. Merging these components would fail due to the duplicate root. I believe we could safely allow merging these after #2162, since there will no longer be any storage offset or size that would get overwritten, which is what this check was previously preventing.
cc @igamigo
closes #1329