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

Add syntax_version identifier to molecule #64

Merged
merged 3 commits into from
Aug 22, 2023

Conversation

eval-exec
Copy link
Collaborator

@eval-exec eval-exec commented Jan 18, 2023

This PR want to make molecule support syntax version identifier.

We can specify syntax = {version} now.

  1. If syntax_version wasn't specified, it would be 1 by default.
  2. All schema file you imported must have same version : a syntax = 1 schema file can't import syntax = 2 file, and syntax = 2 file can't import syntax = 1 schema file either.

@yangby-cryptape @driftluo @code-monad @zhangsoledad Invite you to review this PR.

@eval-exec eval-exec marked this pull request as ready for review January 18, 2023 06:37
@eval-exec eval-exec force-pushed the feat/syntax_version branch 3 times, most recently from 21566f0 to 30c6f02 Compare January 19, 2023 04:55
@eval-exec eval-exec requested review from driftluo and removed request for zhangsoledad and yangby-cryptape January 19, 2023 06:35
@zhangsoledad zhangsoledad requested review from a team, quake, doitian, yangby-cryptape and zhangsoledad and removed request for a team, quake and doitian January 19, 2023 07:00
@eval-exec eval-exec force-pushed the feat/syntax_version branch 2 times, most recently from 206a6dd to 86682ea Compare January 20, 2023 09:40
@doitian
Copy link
Member

doitian commented Mar 22, 2023

Could you explain the motive to add syntax version?

@eval-exec
Copy link
Collaborator Author

eval-exec commented Mar 22, 2023

Could you explain the motive to add syntax version?

It's like Protocol Buffers' syntax identifier, https://protobuf.dev/reference/protobuf/proto3-spec/#syntax

The "molecule primitive types #62" feature will add uint{8,16,32,64}, int{8,16,32,64} and bool as primary types, so we need the syntax identifier to tell molecule whether to treat these types as primitive types or not.

@eval-exec eval-exec marked this pull request as ready for review August 21, 2023 07:01
@eval-exec eval-exec marked this pull request as draft August 21, 2023 07:02
@eval-exec eval-exec marked this pull request as ready for review August 21, 2023 07:05
@eval-exec
Copy link
Collaborator Author

Rebased on master branch. Ready for review. @quake

@quake quake merged commit 1b3bfe2 into nervosnetwork:master Aug 22, 2023
6 checks passed
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.

5 participants