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

Auto sort modules by dependency order and review native function errors #971

Merged
merged 10 commits into from
Oct 16, 2023

Conversation

pause125
Copy link
Collaborator

Summary

  1. Auto sort modules by dependency order. Resolve [Framework] Check module dependency order when publish #928
  2. Review native functions and unify error code. Resolve [NativeFunction] Native Function error code #960

@vercel
Copy link

vercel bot commented Oct 15, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2023 2:54pm

@@ -19,8 +19,10 @@ module moveos_std::raw_table {
const ErrorAlreadyExists: u64 = 1;
/// Can not found the key in the table
const ErrorNotFound: u64 = 2;
/// Duplicate operation on the table
const ErrorDuplicateOperation: u64 = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

These errors are different from the raw_table native implemention.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ErrorNotEmpty is only used in raw_table.move, not in native functions. Should we defined an unused ErrorNotEmpty in native function?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is better to define it and make sure the error code in Rust is consistent with error code in Move.

@pause125
Copy link
Collaborator Author

abort code is not wrapped with std::error in moveos_stdlib and move_stdlib, should we unify them all?

@jolestar jolestar merged commit f7573bb into rooch-network:main Oct 16, 2023
@pause125 pause125 deleted the module-order branch November 3, 2023 01:00
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.

[NativeFunction] Native Function error code [Framework] Check module dependency order when publish
2 participants