feat: candid_service to specify actor type from Text#5878
Draft
feat: candid_service to specify actor type from Text#5878
candid_service to specify actor type from Text#5878Conversation
Contributor
77374de to
521387c
Compare
521387c to
c065ff8
Compare
ggreif
commented
Feb 26, 2026
This is the "left adjoint" to the forgetful `principalOfActor`, tacking on an `actor` signature.
also the subparser is now column-exact (modulo escapes)
ggreif
commented
Feb 27, 2026
candid_service to specify actor type from Textcandid_service to specify actor type from Text
ggreif
commented
Feb 27, 2026
| let adorn = List.map (let open Diag in function | ||
| | {cat="syntax" as cat; _} as msg -> { msg with cat = "candid " ^ cat; code = "M0246" } | ||
| | {cat="type" as cat; _} as msg -> { msg with cat = "candid " ^ cat; code = "M0247" } | ||
| | msg -> msg) in |
Contributor
Author
There was a problem hiding this comment.
there is also file and import and whatnot...
Contributor
Author
There was a problem hiding this comment.
(cd test/idl/ok && git grep -e ": .* error") | grep -vE "(type|syntax) error"Implements env-shim test demonstrating the new `from_candid` feature that derives actor types from Candid service definitions. The test includes a Backend module that reads an envvar, converts it to a Principal, and casts it to a typed actor using `from_candid` with inline Candid IDL syntax. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Use pipe operator |> with unwrapped underscore placeholders for cleaner functional composition. Apply bash-style function call syntax for envVar with single string argument. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I (for now) reused the
from_candidtoken on thetypeplane.