Skip to content

Differences from yaml-language-server

View as Markdown

Each entry: what differs, why, the test that pins it. Parity counts exclude these.

# Area yls behaviour oxyaml behaviour Why Test
1 Position encoding UTF-16 only selects UTF-8 when the client offers it in general.positionEncodings, else UTF-16 no conversion cost for clients that can take bytes document_sync::utf8_negotiated
2 Diagnostics model push only (publishDiagnostics) pull (textDocument/diagnostic) when the client supports it, else push client controls timing; no wasted work on hidden files diagnostics::pull_when_supported
3 serverInfo name yaml-language-server and its version name oxyaml and the binary version identifies the server server_lifecycle::server_info
4 Capabilities all yls providers only the providers it implements never advertise what is not implemented server_lifecycle::advertised_capabilities
5 Launch flags --node-ipc, --socket=, --pipe= select a transport these exit with code 2 and a clear message; other unknown flags are ignored; stdio is the default stdio is what every editor uses; a client waiting on another transport would hang server_lifecycle::launch_flags
6 Settings at initialize reads settings only from the workspace/configuration pull (initializationOptions is used for l10nPath only) also applies initializationOptions, an object keyed by section name (yaml, http, [yaml], editor), as the first settings clients that cannot answer pulls, and settings known before the first pull settings_intake::initialization_options_provide_the_first_settings
7 Push-only clients on didChangeConfiguration and initialized always sends workspace/configuration, even when the client did not advertise it, and ignores params.settings pulls only when the client advertises workspace.configuration; otherwise applies the pushed params.settings a request the client cannot answer is wasted and the pushed values would be lost settings_intake::push_only_client_gets_no_request_and_uses_pushed_settings
8 Version ordering applies every didChange whatever its version ignores a change whose version is lower than the open document’s (an equal version is applied) an out-of-order change would corrupt the text every feature reads document_sync::stale_change_ignored
9 Alias bomb in the AST convertAST caches per alias node but not per target, so n aliases of an anchor with m nodes allocate n*m nodes (6M nodes: 93 s and 1.2 GB for 20,000 aliases of 300 items; its Alias.resolve rescans the document per alias) stops expanding aliases once the document’s AST has 2,000,000 nodes (MAX_AST_NODES); the aliases past that stay without a value node a hostile file must not exhaust memory; real documents are far below it ast::bomb_of_many_aliases_is_capped
10 Deep alias cycles an anchor that contains an alias to itself, nested a few levels deep (&a {k: [{j: *a}]}), overflows the JS stack: parse() throws and the file gets no diagnostics or features the cycle is cut after 1000 open aliases or 6000 nested conversions (MAX_REF_COUNT, MAX_LEVELS) and the file is served normally no crash, no stack overflow; the shape cut by yls’s own 1000-alias limit (&a [*a]) is identical ast::alias_cycle_that_overflows_the_js_stack_in_yls_is_converted_and_capped
11 Validation delay validates 200 ms after the last change (validationDelayMs), so a burst of edits costs one run validates as soon as a worker is free; work queued or running for an older version is cancelled and never published (a result for an older version never follows a newer one) the delay is only latency; coalescing needs no timer diagnostics::stale_result_dropped
12 Scoped yaml.validate sends workspace/configuration for [yaml] with the document as scopeUri before every validation reads [yaml] yaml.validate from the settings pull (one request per settings change, no scope), and revalidates all open documents after each pull one round trip per file would delay every diagnostic; a per-resource value is not visible to editors that answer the same for every file diagnostics::scoped_yaml_validate_overrides_the_global_setting
13 Validator limits no depth or work limit: a recursive schema over a deep document recurses until the JS stack overflows validation stops below 256 nested levels (MAX_DEPTH), on active (node, schema) recursion cycles, or after a work budget of max(MAX_STEPS, schema_objs * 256) + 256 * min(ast_nodes, 2 * doc_bytes) steps (MAX_STEPS = 250_000); problems found so far are kept hostile schemas and documents must not crash or hang a worker; legitimate files of any size scale linearly and stay far below all three validate::deeply_nested_document_against_a_recursive_schema_stops_at_the_depth_limit
14 First diagnostics validates 200 ms after a change, usually after the first workspace/configuration pull has answered; a document opened earlier is validated with the defaults and again after the pull publishes nothing for a document while a settings pull sent less than 2 s ago is unanswered, then validates with the new settings (a client that never answers gets diagnostics from its next change on) (no result computed with defaults that the settings would change, such as yaml.schemas) one correct publish instead of a wrong one followed by a right one; replaces the delay of entry 11 for this case schema_content::diagnostics_wait_for_the_first_settings_pull
15 Client schema content waits for the answer to vscode/content, custom/schema/request and custom/schema/content without limit stops waiting after 30 s and reports the schema as unloadable; the wait also ends when the server stops a client that never answers must not hold a worker or the exit schema_content::a_client_that_never_answers_blocks_neither_the_loop_nor_the_exit
16 TLS verification http.proxyStrictSSL unset means false: schema downloads over https accept any certificate unset means true (OS trust store); an explicit false turns verification off as in yls a language server must not fetch schemas over unverified TLS by default; VS Code sends true anyway settings::proxy_strict_ssl_defaults_to_verification
17 Formatting request indentation seeds tabWidth from the request’s tabSize, then applies scoped formatter settings also accepts a nonzero options.tabWidth in the request, with scoped formatter settings still taking precedence clients can send the formatter’s indentation option directly formatting::tab_width_falls_back_to_tab_size
18 Code lenses during configuration codeLensHandler waits indefinitely for an unanswered workspace/configuration request waits up to 2 s from the oldest unanswered pull, then uses the settings in force an editor that never answers cannot hold a code lens request indefinitely code_lens::unanswered_configuration_does_not_hold_code_lens
19 Diagnostics after close clears diagnostics, then can publish again if validation was already waiting for a schema discards results for the closed document, including results already computed when it closed diagnostics must stay cleared after close schema_loading::closing_before_schema_arrival_keeps_diagnostics_cleared
20 External schema loads $ref and custom dialect loads have no per-resolution budget stops starting external loads after 64 attempts or 30 s, bounds HTTP by the remaining time, and reports Problems loading reference a schema cannot keep a worker waiting on an unbounded series of fetches resolve::external_schema_loads_stop_at_the_limit, http::http_schema_load_stops_at_the_resolution_deadline
21 Local schema files reads the entire file without a size or file type check returns No content for files over 64 MiB or paths that do not resolve to regular files FIFOs can block a worker, and devices and large files can exhaust memory service::oversized_file_schema_is_unloadable, service::fifo_schema_is_unloadable_without_waiting_for_a_writer
22 HTTP cache entries the schema request handler has no disk cache writes entries atomically and checks the stored URL. LSP uses cached entries on fetch failure. oxyaml check reads entries from bounded regular files and also uses fresh entries as described in Caching offline validation, bounded batch cache reads, and warm CLI runs without fetch latency http::offline_does_not_use_a_cache_entry_for_a_different_url, http::cache_refresh_does_not_modify_an_open_copy, http::batch_uses_a_fresh_custom_meta_schema_without_a_request, http::batch_ignores_fifo_cache_entries, http::batch_ignores_oversized_cache_entries
23 Kubernetes CRD URL fields interpolates the group and kind into the CRD URL verbatim uses the Kubernetes fallback when the group or kind contains .., ?, or # malformed fields can change the CRD request path, query, or fragment service::kubernetes_fields_cannot_change_the_crd_url_structure