Skip to content

[gateway-types] reorganize per RFD 619#9487

Merged
sunshowers merged 8 commits intomainfrom
sunshowers/spr/gateway-types-reorganize-per-rfd-619
Dec 16, 2025
Merged

[gateway-types] reorganize per RFD 619#9487
sunshowers merged 8 commits intomainfrom
sunshowers/spr/gateway-types-reorganize-per-rfd-619

Conversation

@sunshowers
Copy link
Contributor

No description provided.

Created using spr 1.3.6-beta.1
@sunshowers sunshowers changed the title [gateway-types] reorganize per RFD 619 [RFC] [gateway-types] reorganize per RFD 619 Dec 7, 2025
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Copy link
Contributor

@jgallagher jgallagher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I like how this is all shaping up quite a lot. Just some small style notes/preferences.

path: Path<PathSp>,
) -> Result<HttpResponseOk<SpState>, HttpError> {
path: Path<latest::component::PathSp>,
) -> Result<HttpResponseOk<latest::component::SpState>, HttpError> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is purely a style choice, but I think I would have imported all of the latest types so that this remained

    async fn sp_get(
        rqctx: RequestContext<Self::Context>,
        path: Path<PathSp>,
    ) -> Result<HttpResponseOk<SpState>, HttpError> {

and maybe would have done the same even in the *-api crate? And then only use explicit (non-latest) versions on the endpoints that need them.

I think this is mostly because adding latest::submodule:: to every type referenced in this file causes a lot of pretty long lines and makes this diff noisier than it would be otherwise. It seems fine to me for an unadorned type to implicitly be "the latest". But I don't feel as strongly about this as I did other things we've already discussed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have mixed opinions here. For new hires, and people not in the code a bunch, the types explicitly being marked latest could be informative at a glance. On the other hand I sympathize pretty heavily with eliminating the repetition and long lines.

I think I prefer John's suggestion, and would just add a comment to the import about unversioned types being latest.

One slight wrinkle is that some type names may conflict on their own. In that case though, the module can still be the prefix or we can use an alias. Nothing really changes how that currently works.

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
@sunshowers sunshowers changed the title [RFC] [gateway-types] reorganize per RFD 619 [gateway-types] reorganize per RFD 619 Dec 16, 2025
Created using spr 1.3.6-beta.1
@sunshowers sunshowers merged commit 2b45e93 into main Dec 16, 2025
18 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/gateway-types-reorganize-per-rfd-619 branch December 16, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants