-
Notifications
You must be signed in to change notification settings - Fork 81
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
feat!: split candid crate #471
Conversation
remove code under "parser" feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LG. Can you also update the changelog?
Benchmark for c99ab8dClick to view benchmark
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this to a beta
branch. I have a few other breaking changes to make after this. Let's aim for an official release early November.
"rust/candid_derive", | ||
"rust/ic_principal", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you recall why we put Principal
back to candid
a while ago? Also do we want to give it a more general name, e.g. ic_types
, to accommodate more types in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to have the ic-types
crate which contained principal
and hash_tree
modules.
The modules were moved to candid
and agent-rs
repo respectively. And ic-types
is deprecated.
IMO, it's better to have ic_principal
crate which contains only Principal
. It will be a stable crate on the top of the dependency tree. We won't have to bump its version because of changes in other parts.
I just pushed the |
Benchmark for 94c03ccClick to view benchmark
|
Currently, the
candid
crate mainly consists of two parts:The second part evolves fast which forces us to bump major version frequently.
Such version bumps propagated to the downstream projects (agent-rs, cdk-rs, sdk, ic monorepo, etc).
By splitting out
candid_parser
, we expect to have a stablecandid
crate.Also, I move
Principal
into a separateic_principal
crate. Therefore, we can provide a lightweight dependency for those who only needPrincipal
.Notable changes
parse_idl_args()
andparse_idl_value()
because incandid_parser
we cannot implementFromStr
forIDLArgs
andIDLValue
which are defined incandid
.TypeEnv
is defined incandid
, so we can't implement type methodast_to_type
incandid_parser
. Instead I turned it into a function which takesTypeEnv
as the first argument. Similarly,size_helper()
andsize()
are changed.Checklist
Cargo.toml
files