Skip to content

Conversation

squadgazzz
Copy link
Contributor

This reverts #1011 since I was able to reproduce a bug, which block any further code compilation for SC bindings generated from ABI jsons directly that use other SCs internally. Those derives don't propagate automatically to generated internal SC structs. The initial PR will be updated later with a more sophisticated unit test. Apologies for that.

…erives` to periphery SC structs (alloy-rs#1011)"

This reverts commit fad2642.
@Copilot Copilot AI review requested due to automatic review settings September 25, 2025 07:05
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reverts changes from #1011 that added contract-level derive propagation functionality. The revert addresses a compilation bug where derives don't properly propagate to generated internal smart contract structs when SC bindings are generated from ABI JSONs that use other smart contracts internally.

  • Removes comprehensive test file for contract-level derives (derives.rs)
  • Reverts logic changes in contract expansion that handled derive propagation
  • Restores original ordering and positioning of context attribute restoration

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
crates/sol-types/tests/derives.rs Complete removal of test file containing comprehensive tests for all_derives and extra_derives contract attributes
crates/sol-macro-expander/src/expand/contract.rs Reverts derive propagation logic, restores original enum expansion order, and moves context attribute restoration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@squadgazzz
Copy link
Contributor Author

I was able to find a proper fix for that. Preparing another PR.

@squadgazzz squadgazzz closed this Sep 25, 2025
@github-project-automation github-project-automation bot moved this to Done in Alloy Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant