Currently the projection rule for import names looks like:
projection ::= '/' <label>
label ::= <word>
| <label> '-' <word>
This prevents projections for exports using the interfacename format, as these cannot be expressed simply as a label.
Say component foo:bar exports an instance with name bar:baz/qux (i.e. in interfacename format) and we wanted to import this instance from another component, but reference a possible implementation using an unlocked-dep import rather an import of an interface name. We're unable to express this because bar:baz/qux cannot be represented as a projection.
One possible solution:
Extend the projection rule as follows:
projection ::= '/' <projection-segment>
projection-segment ::= <label> | '<' <interfacename> '>'
Or using some other delimiter to denote that the segment is an interface name and not a label.
Currently the projection rule for import names looks like:
This prevents projections for exports using the
interfacenameformat, as these cannot be expressed simply as alabel.Say component
foo:barexports an instance with namebar:baz/qux(i.e. ininterfacenameformat) and we wanted to import this instance from another component, but reference a possible implementation using anunlocked-depimport rather an import of an interface name. We're unable to express this becausebar:baz/quxcannot be represented as a projection.One possible solution:
Extend the
projectionrule as follows:Or using some other delimiter to denote that the segment is an interface name and not a label.