Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[move-model-2] Switch maps to IndexMap #21572

Merged
merged 7 commits into from
Mar 26, 2025
Merged

Conversation

tnowacki
Copy link
Contributor

Description

  • Module members are now ordered by their declared+compiled index
  • This means docgen and other tools preserve the order declared by the user

Test plan

  • 👀

Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

@tnowacki tnowacki requested a review from a team March 22, 2025 20:28
@tnowacki tnowacki requested a review from ronny-mysten as a code owner March 22, 2025 20:28
Copy link

vercel bot commented Mar 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 23, 2025 0:38am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Mar 23, 2025 0:38am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Mar 23, 2025 0:38am

Copy link
Contributor

@tzakian tzakian left a comment

Choose a reason for hiding this comment

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

Overall looks good to me, although I wonder -- this will only keep relative declaration order but not full declaration order in docgen right? Or will it do full "declaration order" output? i.e.,

public struct B()
public enum A {
    C
}
public struct D()

In docgen will this give something like

public struct B() 
public struct D()
public enum A {
   C
}

or will this give

public struct B()
public enum A {
    C
}
public struct D()

@tnowacki tnowacki merged commit 2c5490c into MystenLabs:main Mar 26, 2025
43 checks passed
@tnowacki
Copy link
Contributor Author

For now

public struct B() 
public struct D()
public enum A {
   C
}

We could store the full index order in the info and use that if it is present, but that sounds like a different PR :)

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.

2 participants