Skip to content

Deprecate lib arg on contracttype/error/event#1951

Open
leighmcculloch wants to merge 2 commits into
mainfrom
deprecate-contracttype-lib
Open

Deprecate lib arg on contracttype/error/event#1951
leighmcculloch wants to merge 2 commits into
mainfrom
deprecate-contracttype-lib

Conversation

@leighmcculloch

@leighmcculloch leighmcculloch commented Jul 24, 2026

Copy link
Copy Markdown
Member

What

lib on contracttype/contracterror/contractevent now warns: deprecated.

Why

Nobody uses it. Undocumented, never shipped, zero on mainnet. Warn now, remove later.

Close #1952

@leighmcculloch leighmcculloch changed the title Deprecate lib arg on contracttype/error Deprecate lib arg on contracttype/error/event Jul 24, 2026
@leighmcculloch
leighmcculloch marked this pull request as ready for review July 24, 2026 12:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Deprecates the unused lib argument across Soroban contract type, error, and event macros.

Changes:

  • Emits a deprecation warning whenever lib is specified.
  • Adds compile-fail coverage for all three macros.

Reviewed changes

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

Show a summary per file
File Description
soroban-sdk-macros/src/lib.rs Adds and applies the deprecation marker.
soroban-sdk-macros/src/derive_event.rs Applies the warning to contract events.
soroban-sdk/tests/compile_fails.rs Registers the new compile-fail test.
soroban-sdk/tests/compile_fails/contracttype_lib_deprecated.rs Exercises all affected macros.
soroban-sdk/tests/compile_fails/contracttype_lib_deprecated.stderr Captures expected diagnostics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate the lib arg on contracttype/error/event

3 participants