microsoft / typespec

https://typespec.io/
MIT License
4.11k stars 197 forks source link

Consider moving eliding of properties of type `never` lower #1128

Open nguerrera opened 1 year ago

nguerrera commented 1 year ago
  1. Should we move the skipping of properties of type never into MetadataInfo.isPayloadProperty? ~2. [Yes] Should we also elide metadata properties (header, query, etc.) of type never?~

https://github.com/microsoft/cadl/pull/1127/files#r988024779

EDIT: Or should we go even farther and move this into the core, for example by having the checker drop the properties altogether?

nguerrera commented 1 year ago

I think yes to both.

daviwil commented 1 year ago

Beat me to it :) I think the answer to both is "yes" and "yes", though we can definitely discuss it in a design meeting.

nguerrera commented 1 year ago

OK, I agree. This is ready to discuss and hopefully just a quick approval. :)

bterlson commented 1 year ago

TeamYesYes

nguerrera commented 1 year ago

Leaving this as design we should also consider if it makes sense to go even lower into the core.

markcowl commented 1 year ago
markcowl commented 1 year ago

Moving forward, need a proposal on whether to provide this functionality in helpers, or in the compiler