Paul King created GROOVY-12530:
----------------------------------
Summary: Registration channel for user-defined monadic carriers
Key: GROOVY-12530
URL: https://issues.apache.org/jira/browse/GROOVY-12530
Project: Groovy
Issue Type: Sub-task
Reporter: Paul King
Fix For: 7.x
Let applications and libraries add carriers to the monadic carrier registry so
that the runtime dispatcher, MonadicChecker and MonadicShapeChecker all see the
same entries. Today the only options are the built-in allow-list, a structural
flatMap/map, or @Monadic, and @Monadic cannot be applied to third-party classes.
Questions to settle, ideally on the dev list:
* Discovery: how both the compiler and the application runtime find
registrations. They may run in different JVMs with different classpaths: the
compile classpath or transform loader at compile time, the application
classpath at run time. A declarative descriptor on the classpath is one
candidate.
* Entry content: carrier class name, bind and map method names, optionally
unit, and optionally the bound type parameter (see the precedence decision on
the umbrella).
* Data, not code: name-keyed entries need no class loading or code execution at
compile time.
* Interaction with built-in entries: whether registrations may override them,
and the ordering.
* Diagnostics for malformed or conflicting registrations.
* Marking the API @Incubating.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)