refactor!: move IDL* types into the candid crate#622
Conversation
Click to see raw report |
christoph-dfinity
left a comment
There was a problem hiding this comment.
Looks good to me. One bikeshed comment would be that src/types/syntax.rs rather than src/types/parser.rs might be a nicer name, as the idea is that it describes the syntax of candid files. Not just the parser is a consumer of this format, but also everyone that wants to generate a .did file.
@christoph-dfinity good point. I've renamed both the module and the feature flag accordingly. |
|
Since this PR introduces breaking changes, I'll wait before merging it to check if the changes make sense in the branch I'm working on: https://github.com/dfinity/candid/compare/luca/idl-types-in-parser |
IDL* types into the candid crate, under the parser feature flagIDL* types into the candid crate
|
@christoph-dfinity I realized I need the |
|
Luca and I discussed the upcoming changes offline. We've decided to proceed with the current PR structure for now, given the dependent work (e.g., #625). However, we'll plan to move the types into a separate, privately-dependent crate (could be named Since development in this repo has been slow, we can continue using the master branch as our active development branch and aren't expecting any patch releases soon. |
Overview
Move the parser's
IDL*types to thecandidcrate, in order to share it between both thecandidand thecandid_parsercrates.The main reason is that we want to use the
IDL*types in the bindings generators, instead of bringing around theTypeEnv, which holds innerTypes that are not meant for codegen.Considerations
Introduces breaking changes.