rust: re-export ModelPolicyState and ModelPickerCategory from crate root - #2051
rust: re-export ModelPolicyState and ModelPickerCategory from crate root#2051rinceyuan wants to merge 1 commit into
Conversation
Closes github#1674 Add ModelPickerCategory and ModelPolicyState to the curated pub use block in types.rs. These enums are field types of Model and ModelPolicy which are already re-exported, but the enums themselves required importing from copilot::rpc.
|
@microsoft-github-policy-service agree company=Microsoft |
|
@stephentoub Tiny consistency fix — 2 missing enum re-exports for types whose parent structs are already at the crate root. Thanks! |
|
Friendly follow-up — this has been open for 2 days. It's a one-line change (adding two enum re-exports to match the already-exported parent structs). Happy to address any feedback. |
|
@stephentoub Second follow-up — this one-liner has been open 5 days. Would appreciate a quick 👍/👎 so I know if the approach is right. Happy to adjust. |
|
@rinceyuan A mixture of team events and folks out on vacation last week meant we've got a bit behind. We'll be catching up over the next few days. |
|
Thanks for identifying this inconsistency. The current crate-root re-export list is unfortunately already somewhat arbitrary, and adding individual types as omissions are discovered would make that boundary harder to explain and maintain. The same reasoning here also applies to several other generated field types. We would prefer to define a clear policy for which generated types belong at the crate root, then have codegen produce that set automatically. Since that policy is not yet established, we do not want to extend the manually curated list further. All these types remain available through the intended |
Closes #1674
\ModelPolicy\ and \Model\ are re-exported at the crate root, but their field-type enums \ModelPolicyState\ and \ModelPickerCategory\ are not. This forces consumers to reach into \copilot::rpc\ for types that logically belong alongside the already-exported structs.
This adds both enums to the curated \pub use\ block in \ ypes.rs, in alphabetical order.