motoko icon indicating copy to clipboard operation
motoko copied to clipboard

enhancement: auto-generate inspect message message type

Open crusso opened this issue 4 months ago • 0 comments

Austin has a tool that needs to know the message type (the big variant) of the system method inspect.

The tool constructs the type from the did file and then injects the Motoko translation into the source code. That's painful and fragile and regeneration needs to run after every interface change.

(example here https://github.com/icdevsorg/inspect-mo/blob/main/test/standard-validation.test.mo)

A simpler solution would be for Motoko to implicitly bind the type of the inspect message in the actor itself.

We already have code to construct the type in the type checker, so adding an implicit type binding might be feasible (if a bit ugly).

https://dfinity.slack.com/archives/C09E347CB7U/p1757334986603009

crusso avatar Sep 08 '25 16:09 crusso