Skip to content

Fix <greeting> format#92

Merged
djc merged 4 commits into
djc:mainfrom
valkum:fix-greeting-type
Jun 2, 2026
Merged

Fix <greeting> format#92
djc merged 4 commits into
djc:mainfrom
valkum:fix-greeting-type

Conversation

@valkum

@valkum valkum commented May 29, 2026

Copy link
Copy Markdown
Contributor

RFC 5730 allows multiple <lang> elements in a <greeting>. If a server advertises multiple languages, the deserialization failed.
The previous version tried to reuse types used in . Per RFC these are not identical.

I moved the types only used in the <login> command to the login module and introduced new ones for <greeting>.
I tried to keep breaking changes minimal; migrations should thus be easy.

I kept the ServiceMenu but flattened the Options, as they no longer made sense in this context.

You can no longer pass the options from the to login, you need to select a language. Language selection is left to the user.

@djc

djc commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Can you split this into multiple commits? Maybe like:

  • Move types used in <login> to the login module
  • Use separate types for <login> and <greeting>
  • Flatten Options

@valkum valkum force-pushed the fix-greeting-type branch 2 times, most recently from 8a4412d to e3bc249 Compare June 1, 2026 15:26
@valkum

valkum commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Split into two fix commits and a cleanup commit. I hope tests run through now; they used a partial checkout in an earlier run, it seems.

The types from <greeting> are not 100% compatible with <login>.
This is the first part of fixing this.
@valkum valkum force-pushed the fix-greeting-type branch from e3bc249 to af83092 Compare June 1, 2026 16:43
Comment thread src/hello.rs
valkum added 3 commits June 2, 2026 16:12
The fields in <svcMenu> can not be passed to <login> directly. Reusing
the type made this too easy. Instead ServiceMenu now uses it's own
Services higher level abstraction type.
<greeting> can contain multiple <lang> objects. The previous version
tried to reuse types used in <login> but they are incompatible
@valkum valkum force-pushed the fix-greeting-type branch from af83092 to 6c1ad92 Compare June 2, 2026 14:14
@djc djc merged commit 199ae68 into djc:main Jun 2, 2026
7 checks passed
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.

2 participants