Skip to content

lang: Rename utils module of declare_program! to parsers#4151

Merged
acheroncrypto merged 7 commits into
otter-sec:masterfrom
acheroncrypto:lang-rename-utils-module-of-declare_program-to-parsers
Dec 26, 2025
Merged

lang: Rename utils module of declare_program! to parsers#4151
acheroncrypto merged 7 commits into
otter-sec:masterfrom
acheroncrypto:lang-rename-utils-module-of-declare_program-to-parsers

Conversation

@acheroncrypto

Copy link
Copy Markdown
Collaborator

Problem

The utils module was added as a catch-all module for things that didn't belong to the existing modules. However, it currently consists of only parsers and nothing more.

People often don't know that declare_program! supports parsing functionality, which is why I think having a dedicated module for parsers would help their discoverability.

Summary of changes

  • Rename the utils module to parsers
  • Rename the try_from_bytes and try_from_solana_instruction methods to parse
  • Update parser tests to use the new names

Note: This is a breaking change. Normally, I'd keep the old modules/methods and deprecate them, but since we're planning to go for v1 soon, I didn't want to keep deprecated functions around.

@vercel

vercel Bot commented Dec 24, 2025

Copy link
Copy Markdown

@acheroncrypto is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto merged commit 347c059 into otter-sec:master Dec 26, 2025
54 of 57 checks passed
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant