fix(next tests): PaletteMenuVocabularyTests compiles again

Merged
TE
15d ago
+4-2

Summary

On feat-cmux-next, the CmuxNext test target doesn't compile. PaletteMenuVocabularyTests.swift:74 and :79 (from #23332 / #23360) call descriptor.arguments.contains(where: \.isRequired) inside #expect. Swift Testing expands that into a throwing call, and the compiler rejects it:

macro expansion #expect:2:3: error: call can throw, but it is not marked with 'try' and the error is not handled
PaletteMenuVocabularyTests.swift:74:106: note: expanded code originates here

Because the target doesn't build, every Swift suite run of the package is red. For example, cmux-ci step f9033a76c082591537a73108 ran on a branch of base f32bde63 that doesn't touch this file.

The fix reads the value into a let before calling #expect, the same way line 57 of this file already does. The assertions are unchanged.

Testing

  • Red on base: the fleet suite run above fails to compile.
  • Green on head: a fleet suite run on eb13ea34 is in progress, and I'll post the result.

Changelog

none

Agent session: cosmic-gray

šŸ¤– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the CmuxNext test target so it compiles again on feat-cmux-next. PaletteMenuVocabularyTests passed descriptor.arguments.contains(where: \.isRequired) inside #expect, and Swift Testing expands that into a throwing call the compiler rejects. The value is now read into a local let first; assertions are unchanged.