Publish option_skip to test item clients - #1424
Merged
Merged
Conversation
JuliaWorkspaces now records the `skip` keyword argument of `@testitem`, but `publish_tests` dropped it, so it never reached the client. Without it the client cannot forward `skip` to TestItemControllers, and skipped test items would silently run. The field mirrors the JuliaWorkspaces type: `false`/`true` for a literal, or the source text of an expression that the test process evaluates just before the test item would run. Keeping the union (rather than normalising to a string) lets a client distinguish a test item that never runs from one whose outcome is only known at run time. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`option_skip` on `TestItemDetail` first ships in JuliaWorkspaces 12.0.0, which also changes test item ids from positional (`<uri>:<n>`) to stable (`<relpath>::<label>`). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forwards the
skipkeyword argument of@testitemthroughtextDocument/publishTests.JuliaWorkspaces records
option_skiponTestItemDetail(julia-vscode/JuliaWorkspaces.jl#255, shipped in 12.0.0), butpublish_testsdropped it. Without this the VS Code extension cannot seeskipand so cannot forward it to TestItemControllers — a test item markedskip=truewould silently run anyway.Wire shape
optionSkipmirrors the JuliaWorkspaces type,Union{Bool,String}:false/true— a literal, known staticallyKeeping the union rather than normalising to a string lets a client distinguish a test item that never runs (render it as skipped in the tree) from one whose outcome is only known at run time (run it and find out). The expression must be evaluated worker-side because it may inspect the worker's environment, e.g.
VERSION < v"1.11"orSys.iswindows(), which can differ from the language server's.@dict_readablehandles the union correctly —field_typecollapses a non-Missingunion toAny, so the value passes through unconverted. Verified both variants serialize to their natural JSON forms (boolean vs string) and round-trip through the generatedDictconstructor.Compat
Bumps
JuliaWorkspacesto"12". Besidesoption_skip, 12.0.0 changes test item ids from positional (<uri>:<n>) to stable (<relpath>::<label>) — ids are forwarded verbatim here, so no change was needed in this repo for that.Downstream
The VS Code extension needs a matching change to read
optionSkipand forward it when creating a test run; TestItemControllers'json_protocol.jlgains the corresponding field in julia-testitems/TestItemControllers.jl#39.🤖 Generated with Claude Code