Operations allow me to specify an interface as a return type. Well. Kind of. Should they?
Only the openapi emitter complains about operations returning interfaces. But otherwise it seem to compile just fine. Is that intentional?
Think this is the same base problem as #561
- fix in the compiler
pri: 1 est: 5
@markcowl, questions on this.
- should the label be Required for DPG 2.0?
- Tim says it's the same problem as #561 but that is on the backlog. Just confirming this is something we want to do this sprint.
- Are we saying this is a bug (it's not labeled as such)? When you say "fix in compiler" do you mean that this should emit an error (warning?) when this happens?
This is not required for DPG 2.0.
This is not required for DPG 2.0.
Then is this really Pri 1 for this sprint?
Yeah, the only reason this was marked as 'required' was in case it heralded a larger problem - if Timothee identified the problem, then this should no longer be required. I downgraded it in the sprint.
I think typespec itself should allow this, to be able to model capability-based RPC like Cap’n Proto, and capnweb.dev. Each individual emitter should probably complain when they don’t support this pattern.