You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overview
Adds support for line comments that are "associated" to types, fields and services in Candid. "Associated" means that there's no empty line between the last line of the comment and the underlying type, field or service.
Considerations
Still needs support for block comments.
Currently codegen uses candid::compile which pretty prints the semantic representation (candid/src/types/internal.rs) rather than the syntactic representation (candid_parser/src/types.rs). This is problematic in a few ways (eg. it loses the distinction between vec nat8 and blob), but it also means to print the documentation comments we need to cram then into the semantic types or store them off to the side somehow.
I suggested exploring if we can make the code generators produce the syntactic representation, and Luca said he's going to spend some time looking into that.
One problem I see is that we would need to pull the candid_parser as a dependency inside the candid and candid_derive crates, in order to use the IDL* types.
One problem I see is that we would need to pull the candid_parser as a dependency inside the candid and candid_derive crates, in order to use the IDL* types.
Hmm I see... I think I'd prefer moving the IDL* types into the candid crate (assuming that's the one at the "bottom" of the hierarchy)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds support for line comments that are "associated" to types, fields and services in Candid. "Associated" means that there's no empty line between the last line of the comment and the underlying type, field or service.
Considerations
Still needs support for block comments.