magicblock-labs / magicblock-labs/bolt

[Bug] Re-ordering elements when definining a system will fail to compile

Open
#60 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority: medium
Dominant language
TypeScript
Stars
64
Forks
18
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

When changing the order of elements between: `#[system_input]`, `#[arguments]` and `execute` inside of a `#[system]` macro, it will fail to compile with a confusing error message.

**To Reproduce**

Simple way to reproduce is to put the arguments struct before the `execute` function for example.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure in a #[system] definition, moving the #[arguments] struct before the execute function while keeping #[system_input] in scope. Compare compilation with the original ordering and the reordered form; done means the reordered definition compiles or reports a clear, actionable error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.