From bebf3576ab77300a5c874396c6d92cb095cb11c3 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Fri, 28 Aug 2026 17:28:37 -0700 Subject: [PATCH 1/5] chore: raise MSRV to Rust 1.85 --- .github/dependabot.yaml | 14 -------------- Cargo.lock | 41 ++++++++++++++++++++++++++++------------- Cargo.toml | 2 +- prqlc/prqlc/Cargo.toml | 2 +- web/book/Cargo.toml | 4 ++-- 5 files changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 708afe5ef047..0b05d7aadf79 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -13,20 +13,6 @@ updates: patch: update-types: - patch - ignore: - # `mdbook-core` 0.5.3+ requires `toml ^1.1.2` (0.5.2 needed `toml ^0.9.8`) - # and `mdbook-preprocessor` 0.5.3 requires `mdbook-core ^0.5.3`; `toml` 1.1 - # requires `indexmap ^2.13`; every `indexmap` from 2.12 on declares - # `rust-version` >= 1.82, above the project's declared 1.81.0 MSRV. So the - # bump lands in the workspace lockfile and fails `test-msrv` — it recurred - # weekly as #6035, #6062, #6132 and #6203, each closed unmerged. Staying on - # 0.5.2 is a deliberate choice pending an MSRV decision (see #6203). Drop - # these two entries once `rust-version` in the workspace `Cargo.toml` and - # `metadata.msrv` in `prqlc/prqlc/Cargo.toml` are raised. - - dependency-name: "mdbook-core" - versions: [">= 0.5.3"] - - dependency-name: "mdbook-preprocessor" - versions: [">= 0.5.3"] # We exclude labels throughout because of https://github.com/dependabot/dependabot-core/issues/7645#issuecomment-1986212847 labels: [] diff --git a/Cargo.lock b/Cargo.lock index 26ae0438371b..cb5f3121a7b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -1538,6 +1538,12 @@ dependencies = [ "foldhash 0.2.0", ] +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + [[package]] name = "hashlink" version = "0.10.0" @@ -1860,12 +1866,12 @@ checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" [[package]] name = "indexmap" -version = "2.11.4" +version = "2.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" +checksum = "07aa2048142242915a31d35844fb311e0e53fcca590c3a0a40dcf1b841fa09eb" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown 0.17.1", ] [[package]] @@ -2285,9 +2291,9 @@ dependencies = [ [[package]] name = "mdbook-core" -version = "0.5.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39a3873d4afac65583f1acb56ff058df989d5b4a2464bb02c785549727d307ee" +checksum = "8725b7f8e94a5c40a00c907e4006301ba2fc06722de489a0cb19db1823fdf200" dependencies = [ "anyhow", "regex", @@ -2299,9 +2305,9 @@ dependencies = [ [[package]] name = "mdbook-preprocessor" -version = "0.5.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d87bf40be0597f26f0822f939a64f02bf92c4655ba04490aadbf83601a013bb" +checksum = "f8e75b08763e31982701d5b2680124bd4bd9bed4a4e1b5a499381320ccae199f" dependencies = [ "anyhow", "mdbook-core", @@ -4391,17 +4397,17 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.12+spec-1.1.0" +version = "1.1.4+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" dependencies = [ "indexmap", "serde_core", "serde_spanned", - "toml_datetime", + "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", "toml_writer", - "winnow 0.7.14", + "winnow 1.0.3", ] [[package]] @@ -4413,6 +4419,15 @@ dependencies = [ "serde_core", ] +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + [[package]] name = "toml_edit" version = "0.23.5" @@ -4420,7 +4435,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2ad0b7ae9cfeef5605163839cb9221f453399f15cfb5c10be9885fcf56611f9" dependencies = [ "indexmap", - "toml_datetime", + "toml_datetime 0.7.5+spec-1.1.0", "toml_parser", "winnow 0.7.14", ] diff --git a/Cargo.toml b/Cargo.toml index 6d7dc7f377e1..418bdaee171a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ license = "Apache-2.0" repository = "https://github.com/PRQL/prql" # This isn't tested since `cargo-msrv` doesn't support workspaces; instead we # test `metadata.msrv` in `prqlc` -rust-version = "1.81.0" +rust-version = "1.85.0" version = "0.13.15" [profile.release] diff --git a/prqlc/prqlc/Cargo.toml b/prqlc/prqlc/Cargo.toml index 9d92af307af4..e757058751c8 100644 --- a/prqlc/prqlc/Cargo.toml +++ b/prqlc/prqlc/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true version.workspace = true # Required for `cargo-msrv`, which doesn't yet support workspaces -metadata.msrv = "1.81.0" +metadata.msrv = "1.85.0" build = "build.rs" diff --git a/web/book/Cargo.toml b/web/book/Cargo.toml index 65c19a4ce2dc..6c3c514494d3 100644 --- a/web/book/Cargo.toml +++ b/web/book/Cargo.toml @@ -21,8 +21,8 @@ test = false ansi-to-html = "0.2.3" anyhow = { workspace = true } itertools = { workspace = true } -mdbook-core = { version = "0.5.2", default-features = false } -mdbook-preprocessor = { version = "0.5.2", default-features = false } +mdbook-core = { version = "0.5.4", default-features = false } +mdbook-preprocessor = { version = "0.5.4", default-features = false } prqlc = { path = "../../prqlc/prqlc", default-features = false } pulldown-cmark = { version = "0.13.0", default-features = false } pulldown-cmark-to-cmark = "22.0.0" From 13caf2fdd5df0239faf4198cba2c1d5c281bea61 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Fri, 28 Aug 2026 17:45:16 -0700 Subject: [PATCH 2/5] chore: align minimum dependency versions --- Cargo.lock | 18 +- Cargo.toml | 4 +- prqlc/prqlc/Cargo.toml | 4 +- .../prqlc__cli__test__shell_completion-2.snap | 35 +-- .../prqlc__cli__test__shell_completion-4.snap | 201 +++++++------ .../prqlc__cli__test__shell_completion.snap | 275 +++++++++--------- web/book/Cargo.toml | 2 +- 7 files changed, 265 insertions(+), 274 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cb5f3121a7b5..b80594cfd08a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -654,9 +654,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.66" +version = "4.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c757a3b7e39161a4e56f9365141ada2a6c915a8622c408ab6bb4b5d047371031" +checksum = "3be2ad0423bdbbb0e25bc89add796f3559706d4a95e1bc98e4d9662a957b6a19" dependencies = [ "clap", ] @@ -1225,7 +1225,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -1973,7 +1973,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2510,7 +2510,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -3114,7 +3114,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -3470,7 +3470,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -4116,7 +4116,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -4968,7 +4968,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 418bdaee171a..4d10aa3922c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ allow-branch = ["*"] consolidate-commits = true [workspace.dependencies] -anyhow = "1.0.102" +anyhow = "1.0.103" arrow = { version = "53", features = [ "pyarrow", "prettyprint", @@ -59,7 +59,7 @@ pyo3-build-config = "0.27.1" schemars = "1.2.1" semver = { version = "1.0.28", features = ["serde"] } serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.149" +serde_json = "1.0.150" serde_yaml = { version = "0.9.34" } similar = "2.7.0" similar-asserts = "1.7.0" diff --git a/prqlc/prqlc/Cargo.toml b/prqlc/prqlc/Cargo.toml index e757058751c8..70a8d82def78 100644 --- a/prqlc/prqlc/Cargo.toml +++ b/prqlc/prqlc/Cargo.toml @@ -63,7 +63,7 @@ csv = "1.4.0" enum-as-inner = { workspace = true } itertools = { workspace = true } log = { workspace = true } -regex = "1.12.3" +regex = "1.12.4" schemars = { workspace = true } semver = { workspace = true } # serde is required for the `from_text` feature of PRQL, so we can't really put @@ -88,7 +88,7 @@ vergen-gitcl = { version = "1.0.8", features = ["build"] } # unique dependencies from the CLI, marked as optional and included in the 'cli' # feature -anyhow = { version = "1.0.102", features = ["backtrace"], optional = true } +anyhow = { version = "1.0.103", features = ["backtrace"], optional = true } clap = { version = "4.5.61", features = [ "derive", "env", diff --git a/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion-2.snap b/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion-2.snap index 72f6b9aa1f6f..31013ffd1790 100644 --- a/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion-2.snap +++ b/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion-2.snap @@ -7,38 +7,35 @@ info: - shell-completion - fish env: - CLICOLOR_FORCE: "" NO_COLOR: "1" - RUST_BACKTRACE: "" - RUST_LOG: "" --- success: true exit_code: 0 ----- stdout ----- # Print an optspec for argparse to handle cmd's options that are independent of any subcommand. function __fish_prqlc_global_optspecs - string join \n color= h/help V/version + string join \n color= h/help V/version end function __fish_prqlc_needs_command - # Figure out if the current invocation already has a command. - set -l cmd (commandline -opc) - set -e cmd[1] - argparse -s (__fish_prqlc_global_optspecs) -- $cmd 2>/dev/null - or return - if set -q argv[1] - # Also print the command, so this can be used to figure out what it is. - echo $argv[1] - return 1 - end - return 0 + # Figure out if the current invocation already has a command. + set -l cmd (commandline -opc) + set -e cmd[1] + argparse -s (__fish_prqlc_global_optspecs) -- $cmd 2>/dev/null + or return + if set -q argv[1] + # Also print the command, so this can be used to figure out what it is. + echo $argv[1] + return 1 + end + return 0 end function __fish_prqlc_using_subcommand - set -l cmd (__fish_prqlc_needs_command) - test -z "$cmd" - and return 1 - contains -- $cmd[1] $argv + set -l cmd (__fish_prqlc_needs_command) + test -z "$cmd" + and return 1 + contains -- $cmd[1] $argv end complete -c prqlc -n "__fish_prqlc_needs_command" -l color -d 'Controls when to use color' -r -f -a "auto\t'' diff --git a/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion-4.snap b/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion-4.snap index 5fcedbb9ebe7..e98a163ce54e 100644 --- a/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion-4.snap +++ b/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion-4.snap @@ -7,10 +7,7 @@ info: - shell-completion - zsh env: - CLICOLOR_FORCE: "" NO_COLOR: "1" - RUST_BACKTRACE: "" - RUST_LOG: "" --- success: true exit_code: 0 @@ -91,7 +88,7 @@ _arguments "${_arguments_options[@]}" : \ '--color=[Controls when to use color]:WHEN:(auto always never)' \ '-h[Print help]' \ '--help[Print help]' \ -":: :_prqlc__debug_commands" \ +":: :_prqlc__subcmd__debug_commands" \ "*::: :->debug" \ && ret=0 @@ -139,7 +136,7 @@ _arguments "${_arguments_options[@]}" : \ ;; (help) _arguments "${_arguments_options[@]}" : \ -":: :_prqlc__debug__help_commands" \ +":: :_prqlc__subcmd__debug__subcmd__help_commands" \ "*::: :->help" \ && ret=0 @@ -182,7 +179,7 @@ _arguments "${_arguments_options[@]}" : \ '--color=[Controls when to use color]:WHEN:(auto always never)' \ '-h[Print help]' \ '--help[Print help]' \ -":: :_prqlc__experimental_commands" \ +":: :_prqlc__subcmd__experimental_commands" \ "*::: :->experimental" \ && ret=0 @@ -215,7 +212,7 @@ _arguments "${_arguments_options[@]}" : \ ;; (help) _arguments "${_arguments_options[@]}" : \ -":: :_prqlc__experimental__help_commands" \ +":: :_prqlc__subcmd__experimental__subcmd__help_commands" \ "*::: :->help" \ && ret=0 @@ -294,7 +291,7 @@ _arguments "${_arguments_options[@]}" : \ ;; (help) _arguments "${_arguments_options[@]}" : \ -":: :_prqlc__help_commands" \ +":: :_prqlc__subcmd__help_commands" \ "*::: :->help" \ && ret=0 @@ -322,7 +319,7 @@ _arguments "${_arguments_options[@]}" : \ ;; (debug) _arguments "${_arguments_options[@]}" : \ -":: :_prqlc__help__debug_commands" \ +":: :_prqlc__subcmd__help__subcmd__debug_commands" \ "*::: :->debug" \ && ret=0 @@ -354,7 +351,7 @@ esac ;; (experimental) _arguments "${_arguments_options[@]}" : \ -":: :_prqlc__help__experimental_commands" \ +":: :_prqlc__subcmd__help__subcmd__experimental_commands" \ "*::: :->experimental" \ && ret=0 @@ -427,18 +424,18 @@ _prqlc_commands() { ) _describe -t commands 'prqlc commands' commands "$@" } -(( $+functions[_prqlc__collect_commands] )) || -_prqlc__collect_commands() { +(( $+functions[_prqlc__subcmd__collect_commands] )) || +_prqlc__subcmd__collect_commands() { local commands; commands=() _describe -t commands 'prqlc collect commands' commands "$@" } -(( $+functions[_prqlc__compile_commands] )) || -_prqlc__compile_commands() { +(( $+functions[_prqlc__subcmd__compile_commands] )) || +_prqlc__subcmd__compile_commands() { local commands; commands=() _describe -t commands 'prqlc compile commands' commands "$@" } -(( $+functions[_prqlc__debug_commands] )) || -_prqlc__debug_commands() { +(( $+functions[_prqlc__subcmd__debug_commands] )) || +_prqlc__subcmd__debug_commands() { local commands; commands=( 'annotate:Parse, resolve & combine source with comments annotating relation type' \ 'lineage:Output column-level lineage graph' \ @@ -448,18 +445,18 @@ _prqlc__debug_commands() { ) _describe -t commands 'prqlc debug commands' commands "$@" } -(( $+functions[_prqlc__debug__annotate_commands] )) || -_prqlc__debug__annotate_commands() { +(( $+functions[_prqlc__subcmd__debug__subcmd__annotate_commands] )) || +_prqlc__subcmd__debug__subcmd__annotate_commands() { local commands; commands=() _describe -t commands 'prqlc debug annotate commands' commands "$@" } -(( $+functions[_prqlc__debug__ast_commands] )) || -_prqlc__debug__ast_commands() { +(( $+functions[_prqlc__subcmd__debug__subcmd__ast_commands] )) || +_prqlc__subcmd__debug__subcmd__ast_commands() { local commands; commands=() _describe -t commands 'prqlc debug ast commands' commands "$@" } -(( $+functions[_prqlc__debug__help_commands] )) || -_prqlc__debug__help_commands() { +(( $+functions[_prqlc__subcmd__debug__subcmd__help_commands] )) || +_prqlc__subcmd__debug__subcmd__help_commands() { local commands; commands=( 'annotate:Parse, resolve & combine source with comments annotating relation type' \ 'lineage:Output column-level lineage graph' \ @@ -469,43 +466,43 @@ _prqlc__debug__help_commands() { ) _describe -t commands 'prqlc debug help commands' commands "$@" } -(( $+functions[_prqlc__debug__help__annotate_commands] )) || -_prqlc__debug__help__annotate_commands() { +(( $+functions[_prqlc__subcmd__debug__subcmd__help__subcmd__annotate_commands] )) || +_prqlc__subcmd__debug__subcmd__help__subcmd__annotate_commands() { local commands; commands=() _describe -t commands 'prqlc debug help annotate commands' commands "$@" } -(( $+functions[_prqlc__debug__help__ast_commands] )) || -_prqlc__debug__help__ast_commands() { +(( $+functions[_prqlc__subcmd__debug__subcmd__help__subcmd__ast_commands] )) || +_prqlc__subcmd__debug__subcmd__help__subcmd__ast_commands() { local commands; commands=() _describe -t commands 'prqlc debug help ast commands' commands "$@" } -(( $+functions[_prqlc__debug__help__help_commands] )) || -_prqlc__debug__help__help_commands() { +(( $+functions[_prqlc__subcmd__debug__subcmd__help__subcmd__help_commands] )) || +_prqlc__subcmd__debug__subcmd__help__subcmd__help_commands() { local commands; commands=() _describe -t commands 'prqlc debug help help commands' commands "$@" } -(( $+functions[_prqlc__debug__help__json-schema_commands] )) || -_prqlc__debug__help__json-schema_commands() { +(( $+functions[_prqlc__subcmd__debug__subcmd__help__subcmd__json-schema_commands] )) || +_prqlc__subcmd__debug__subcmd__help__subcmd__json-schema_commands() { local commands; commands=() _describe -t commands 'prqlc debug help json-schema commands' commands "$@" } -(( $+functions[_prqlc__debug__help__lineage_commands] )) || -_prqlc__debug__help__lineage_commands() { +(( $+functions[_prqlc__subcmd__debug__subcmd__help__subcmd__lineage_commands] )) || +_prqlc__subcmd__debug__subcmd__help__subcmd__lineage_commands() { local commands; commands=() _describe -t commands 'prqlc debug help lineage commands' commands "$@" } -(( $+functions[_prqlc__debug__json-schema_commands] )) || -_prqlc__debug__json-schema_commands() { +(( $+functions[_prqlc__subcmd__debug__subcmd__json-schema_commands] )) || +_prqlc__subcmd__debug__subcmd__json-schema_commands() { local commands; commands=() _describe -t commands 'prqlc debug json-schema commands' commands "$@" } -(( $+functions[_prqlc__debug__lineage_commands] )) || -_prqlc__debug__lineage_commands() { +(( $+functions[_prqlc__subcmd__debug__subcmd__lineage_commands] )) || +_prqlc__subcmd__debug__subcmd__lineage_commands() { local commands; commands=() _describe -t commands 'prqlc debug lineage commands' commands "$@" } -(( $+functions[_prqlc__experimental_commands] )) || -_prqlc__experimental_commands() { +(( $+functions[_prqlc__subcmd__experimental_commands] )) || +_prqlc__subcmd__experimental_commands() { local commands; commands=( 'doc:Generate Markdown documentation' \ 'highlight:Syntax highlight' \ @@ -513,13 +510,13 @@ _prqlc__experimental_commands() { ) _describe -t commands 'prqlc experimental commands' commands "$@" } -(( $+functions[_prqlc__experimental__doc_commands] )) || -_prqlc__experimental__doc_commands() { +(( $+functions[_prqlc__subcmd__experimental__subcmd__doc_commands] )) || +_prqlc__subcmd__experimental__subcmd__doc_commands() { local commands; commands=() _describe -t commands 'prqlc experimental doc commands' commands "$@" } -(( $+functions[_prqlc__experimental__help_commands] )) || -_prqlc__experimental__help_commands() { +(( $+functions[_prqlc__subcmd__experimental__subcmd__help_commands] )) || +_prqlc__subcmd__experimental__subcmd__help_commands() { local commands; commands=( 'doc:Generate Markdown documentation' \ 'highlight:Syntax highlight' \ @@ -527,33 +524,33 @@ _prqlc__experimental__help_commands() { ) _describe -t commands 'prqlc experimental help commands' commands "$@" } -(( $+functions[_prqlc__experimental__help__doc_commands] )) || -_prqlc__experimental__help__doc_commands() { +(( $+functions[_prqlc__subcmd__experimental__subcmd__help__subcmd__doc_commands] )) || +_prqlc__subcmd__experimental__subcmd__help__subcmd__doc_commands() { local commands; commands=() _describe -t commands 'prqlc experimental help doc commands' commands "$@" } -(( $+functions[_prqlc__experimental__help__help_commands] )) || -_prqlc__experimental__help__help_commands() { +(( $+functions[_prqlc__subcmd__experimental__subcmd__help__subcmd__help_commands] )) || +_prqlc__subcmd__experimental__subcmd__help__subcmd__help_commands() { local commands; commands=() _describe -t commands 'prqlc experimental help help commands' commands "$@" } -(( $+functions[_prqlc__experimental__help__highlight_commands] )) || -_prqlc__experimental__help__highlight_commands() { +(( $+functions[_prqlc__subcmd__experimental__subcmd__help__subcmd__highlight_commands] )) || +_prqlc__subcmd__experimental__subcmd__help__subcmd__highlight_commands() { local commands; commands=() _describe -t commands 'prqlc experimental help highlight commands' commands "$@" } -(( $+functions[_prqlc__experimental__highlight_commands] )) || -_prqlc__experimental__highlight_commands() { +(( $+functions[_prqlc__subcmd__experimental__subcmd__highlight_commands] )) || +_prqlc__subcmd__experimental__subcmd__highlight_commands() { local commands; commands=() _describe -t commands 'prqlc experimental highlight commands' commands "$@" } -(( $+functions[_prqlc__fmt_commands] )) || -_prqlc__fmt_commands() { +(( $+functions[_prqlc__subcmd__fmt_commands] )) || +_prqlc__subcmd__fmt_commands() { local commands; commands=() _describe -t commands 'prqlc fmt commands' commands "$@" } -(( $+functions[_prqlc__help_commands] )) || -_prqlc__help_commands() { +(( $+functions[_prqlc__subcmd__help_commands] )) || +_prqlc__subcmd__help_commands() { local commands; commands=( 'parse:Parse into PL AST' \ 'lex:Lex into Lexer Representation' \ @@ -570,18 +567,18 @@ _prqlc__help_commands() { ) _describe -t commands 'prqlc help commands' commands "$@" } -(( $+functions[_prqlc__help__collect_commands] )) || -_prqlc__help__collect_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__collect_commands] )) || +_prqlc__subcmd__help__subcmd__collect_commands() { local commands; commands=() _describe -t commands 'prqlc help collect commands' commands "$@" } -(( $+functions[_prqlc__help__compile_commands] )) || -_prqlc__help__compile_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__compile_commands] )) || +_prqlc__subcmd__help__subcmd__compile_commands() { local commands; commands=() _describe -t commands 'prqlc help compile commands' commands "$@" } -(( $+functions[_prqlc__help__debug_commands] )) || -_prqlc__help__debug_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__debug_commands] )) || +_prqlc__subcmd__help__subcmd__debug_commands() { local commands; commands=( 'annotate:Parse, resolve & combine source with comments annotating relation type' \ 'lineage:Output column-level lineage graph' \ @@ -590,111 +587,111 @@ _prqlc__help__debug_commands() { ) _describe -t commands 'prqlc help debug commands' commands "$@" } -(( $+functions[_prqlc__help__debug__annotate_commands] )) || -_prqlc__help__debug__annotate_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__debug__subcmd__annotate_commands] )) || +_prqlc__subcmd__help__subcmd__debug__subcmd__annotate_commands() { local commands; commands=() _describe -t commands 'prqlc help debug annotate commands' commands "$@" } -(( $+functions[_prqlc__help__debug__ast_commands] )) || -_prqlc__help__debug__ast_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__debug__subcmd__ast_commands] )) || +_prqlc__subcmd__help__subcmd__debug__subcmd__ast_commands() { local commands; commands=() _describe -t commands 'prqlc help debug ast commands' commands "$@" } -(( $+functions[_prqlc__help__debug__json-schema_commands] )) || -_prqlc__help__debug__json-schema_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__debug__subcmd__json-schema_commands] )) || +_prqlc__subcmd__help__subcmd__debug__subcmd__json-schema_commands() { local commands; commands=() _describe -t commands 'prqlc help debug json-schema commands' commands "$@" } -(( $+functions[_prqlc__help__debug__lineage_commands] )) || -_prqlc__help__debug__lineage_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__debug__subcmd__lineage_commands] )) || +_prqlc__subcmd__help__subcmd__debug__subcmd__lineage_commands() { local commands; commands=() _describe -t commands 'prqlc help debug lineage commands' commands "$@" } -(( $+functions[_prqlc__help__experimental_commands] )) || -_prqlc__help__experimental_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__experimental_commands] )) || +_prqlc__subcmd__help__subcmd__experimental_commands() { local commands; commands=( 'doc:Generate Markdown documentation' \ 'highlight:Syntax highlight' \ ) _describe -t commands 'prqlc help experimental commands' commands "$@" } -(( $+functions[_prqlc__help__experimental__doc_commands] )) || -_prqlc__help__experimental__doc_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__experimental__subcmd__doc_commands] )) || +_prqlc__subcmd__help__subcmd__experimental__subcmd__doc_commands() { local commands; commands=() _describe -t commands 'prqlc help experimental doc commands' commands "$@" } -(( $+functions[_prqlc__help__experimental__highlight_commands] )) || -_prqlc__help__experimental__highlight_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__experimental__subcmd__highlight_commands] )) || +_prqlc__subcmd__help__subcmd__experimental__subcmd__highlight_commands() { local commands; commands=() _describe -t commands 'prqlc help experimental highlight commands' commands "$@" } -(( $+functions[_prqlc__help__fmt_commands] )) || -_prqlc__help__fmt_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__fmt_commands] )) || +_prqlc__subcmd__help__subcmd__fmt_commands() { local commands; commands=() _describe -t commands 'prqlc help fmt commands' commands "$@" } -(( $+functions[_prqlc__help__help_commands] )) || -_prqlc__help__help_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__help_commands] )) || +_prqlc__subcmd__help__subcmd__help_commands() { local commands; commands=() _describe -t commands 'prqlc help help commands' commands "$@" } -(( $+functions[_prqlc__help__lex_commands] )) || -_prqlc__help__lex_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__lex_commands] )) || +_prqlc__subcmd__help__subcmd__lex_commands() { local commands; commands=() _describe -t commands 'prqlc help lex commands' commands "$@" } -(( $+functions[_prqlc__help__list-targets_commands] )) || -_prqlc__help__list-targets_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__list-targets_commands] )) || +_prqlc__subcmd__help__subcmd__list-targets_commands() { local commands; commands=() _describe -t commands 'prqlc help list-targets commands' commands "$@" } -(( $+functions[_prqlc__help__lsp_commands] )) || -_prqlc__help__lsp_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__lsp_commands] )) || +_prqlc__subcmd__help__subcmd__lsp_commands() { local commands; commands=() _describe -t commands 'prqlc help lsp commands' commands "$@" } -(( $+functions[_prqlc__help__parse_commands] )) || -_prqlc__help__parse_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__parse_commands] )) || +_prqlc__subcmd__help__subcmd__parse_commands() { local commands; commands=() _describe -t commands 'prqlc help parse commands' commands "$@" } -(( $+functions[_prqlc__help__shell-completion_commands] )) || -_prqlc__help__shell-completion_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__shell-completion_commands] )) || +_prqlc__subcmd__help__subcmd__shell-completion_commands() { local commands; commands=() _describe -t commands 'prqlc help shell-completion commands' commands "$@" } -(( $+functions[_prqlc__help__watch_commands] )) || -_prqlc__help__watch_commands() { +(( $+functions[_prqlc__subcmd__help__subcmd__watch_commands] )) || +_prqlc__subcmd__help__subcmd__watch_commands() { local commands; commands=() _describe -t commands 'prqlc help watch commands' commands "$@" } -(( $+functions[_prqlc__lex_commands] )) || -_prqlc__lex_commands() { +(( $+functions[_prqlc__subcmd__lex_commands] )) || +_prqlc__subcmd__lex_commands() { local commands; commands=() _describe -t commands 'prqlc lex commands' commands "$@" } -(( $+functions[_prqlc__list-targets_commands] )) || -_prqlc__list-targets_commands() { +(( $+functions[_prqlc__subcmd__list-targets_commands] )) || +_prqlc__subcmd__list-targets_commands() { local commands; commands=() _describe -t commands 'prqlc list-targets commands' commands "$@" } -(( $+functions[_prqlc__lsp_commands] )) || -_prqlc__lsp_commands() { +(( $+functions[_prqlc__subcmd__lsp_commands] )) || +_prqlc__subcmd__lsp_commands() { local commands; commands=() _describe -t commands 'prqlc lsp commands' commands "$@" } -(( $+functions[_prqlc__parse_commands] )) || -_prqlc__parse_commands() { +(( $+functions[_prqlc__subcmd__parse_commands] )) || +_prqlc__subcmd__parse_commands() { local commands; commands=() _describe -t commands 'prqlc parse commands' commands "$@" } -(( $+functions[_prqlc__shell-completion_commands] )) || -_prqlc__shell-completion_commands() { +(( $+functions[_prqlc__subcmd__shell-completion_commands] )) || +_prqlc__subcmd__shell-completion_commands() { local commands; commands=() _describe -t commands 'prqlc shell-completion commands' commands "$@" } -(( $+functions[_prqlc__watch_commands] )) || -_prqlc__watch_commands() { +(( $+functions[_prqlc__subcmd__watch_commands] )) || +_prqlc__subcmd__watch_commands() { local commands; commands=() _describe -t commands 'prqlc watch commands' commands "$@" } diff --git a/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion.snap b/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion.snap index 63401562b38c..f2c157a5db69 100644 --- a/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion.snap +++ b/prqlc/prqlc/src/cli/snapshots/prqlc__cli__test__shell_completion.snap @@ -7,10 +7,7 @@ info: - shell-completion - bash env: - CLICOLOR_FORCE: "" NO_COLOR: "1" - RUST_BACKTRACE: "" - RUST_LOG: "" --- success: true exit_code: 0 @@ -34,142 +31,142 @@ _prqlc() { cmd="prqlc" ;; prqlc,collect) - cmd="prqlc__collect" + cmd="prqlc__subcmd__collect" ;; prqlc,compile) - cmd="prqlc__compile" + cmd="prqlc__subcmd__compile" ;; prqlc,debug) - cmd="prqlc__debug" + cmd="prqlc__subcmd__debug" ;; prqlc,experimental) - cmd="prqlc__experimental" + cmd="prqlc__subcmd__experimental" ;; prqlc,fmt) - cmd="prqlc__fmt" + cmd="prqlc__subcmd__fmt" ;; prqlc,help) - cmd="prqlc__help" + cmd="prqlc__subcmd__help" ;; prqlc,lex) - cmd="prqlc__lex" + cmd="prqlc__subcmd__lex" ;; prqlc,list-targets) - cmd="prqlc__list__targets" + cmd="prqlc__subcmd__list__subcmd__targets" ;; prqlc,lsp) - cmd="prqlc__lsp" + cmd="prqlc__subcmd__lsp" ;; prqlc,parse) - cmd="prqlc__parse" + cmd="prqlc__subcmd__parse" ;; prqlc,shell-completion) - cmd="prqlc__shell__completion" + cmd="prqlc__subcmd__shell__subcmd__completion" ;; prqlc,watch) - cmd="prqlc__watch" + cmd="prqlc__subcmd__watch" ;; - prqlc__debug,annotate) - cmd="prqlc__debug__annotate" + prqlc__subcmd__debug,annotate) + cmd="prqlc__subcmd__debug__subcmd__annotate" ;; - prqlc__debug,ast) - cmd="prqlc__debug__ast" + prqlc__subcmd__debug,ast) + cmd="prqlc__subcmd__debug__subcmd__ast" ;; - prqlc__debug,help) - cmd="prqlc__debug__help" + prqlc__subcmd__debug,help) + cmd="prqlc__subcmd__debug__subcmd__help" ;; - prqlc__debug,json-schema) - cmd="prqlc__debug__json__schema" + prqlc__subcmd__debug,json-schema) + cmd="prqlc__subcmd__debug__subcmd__json__subcmd__schema" ;; - prqlc__debug,lineage) - cmd="prqlc__debug__lineage" + prqlc__subcmd__debug,lineage) + cmd="prqlc__subcmd__debug__subcmd__lineage" ;; - prqlc__debug__help,annotate) - cmd="prqlc__debug__help__annotate" + prqlc__subcmd__debug__subcmd__help,annotate) + cmd="prqlc__subcmd__debug__subcmd__help__subcmd__annotate" ;; - prqlc__debug__help,ast) - cmd="prqlc__debug__help__ast" + prqlc__subcmd__debug__subcmd__help,ast) + cmd="prqlc__subcmd__debug__subcmd__help__subcmd__ast" ;; - prqlc__debug__help,help) - cmd="prqlc__debug__help__help" + prqlc__subcmd__debug__subcmd__help,help) + cmd="prqlc__subcmd__debug__subcmd__help__subcmd__help" ;; - prqlc__debug__help,json-schema) - cmd="prqlc__debug__help__json__schema" + prqlc__subcmd__debug__subcmd__help,json-schema) + cmd="prqlc__subcmd__debug__subcmd__help__subcmd__json__subcmd__schema" ;; - prqlc__debug__help,lineage) - cmd="prqlc__debug__help__lineage" + prqlc__subcmd__debug__subcmd__help,lineage) + cmd="prqlc__subcmd__debug__subcmd__help__subcmd__lineage" ;; - prqlc__experimental,doc) - cmd="prqlc__experimental__doc" + prqlc__subcmd__experimental,doc) + cmd="prqlc__subcmd__experimental__subcmd__doc" ;; - prqlc__experimental,help) - cmd="prqlc__experimental__help" + prqlc__subcmd__experimental,help) + cmd="prqlc__subcmd__experimental__subcmd__help" ;; - prqlc__experimental,highlight) - cmd="prqlc__experimental__highlight" + prqlc__subcmd__experimental,highlight) + cmd="prqlc__subcmd__experimental__subcmd__highlight" ;; - prqlc__experimental__help,doc) - cmd="prqlc__experimental__help__doc" + prqlc__subcmd__experimental__subcmd__help,doc) + cmd="prqlc__subcmd__experimental__subcmd__help__subcmd__doc" ;; - prqlc__experimental__help,help) - cmd="prqlc__experimental__help__help" + prqlc__subcmd__experimental__subcmd__help,help) + cmd="prqlc__subcmd__experimental__subcmd__help__subcmd__help" ;; - prqlc__experimental__help,highlight) - cmd="prqlc__experimental__help__highlight" + prqlc__subcmd__experimental__subcmd__help,highlight) + cmd="prqlc__subcmd__experimental__subcmd__help__subcmd__highlight" ;; - prqlc__help,collect) - cmd="prqlc__help__collect" + prqlc__subcmd__help,collect) + cmd="prqlc__subcmd__help__subcmd__collect" ;; - prqlc__help,compile) - cmd="prqlc__help__compile" + prqlc__subcmd__help,compile) + cmd="prqlc__subcmd__help__subcmd__compile" ;; - prqlc__help,debug) - cmd="prqlc__help__debug" + prqlc__subcmd__help,debug) + cmd="prqlc__subcmd__help__subcmd__debug" ;; - prqlc__help,experimental) - cmd="prqlc__help__experimental" + prqlc__subcmd__help,experimental) + cmd="prqlc__subcmd__help__subcmd__experimental" ;; - prqlc__help,fmt) - cmd="prqlc__help__fmt" + prqlc__subcmd__help,fmt) + cmd="prqlc__subcmd__help__subcmd__fmt" ;; - prqlc__help,help) - cmd="prqlc__help__help" + prqlc__subcmd__help,help) + cmd="prqlc__subcmd__help__subcmd__help" ;; - prqlc__help,lex) - cmd="prqlc__help__lex" + prqlc__subcmd__help,lex) + cmd="prqlc__subcmd__help__subcmd__lex" ;; - prqlc__help,list-targets) - cmd="prqlc__help__list__targets" + prqlc__subcmd__help,list-targets) + cmd="prqlc__subcmd__help__subcmd__list__subcmd__targets" ;; - prqlc__help,lsp) - cmd="prqlc__help__lsp" + prqlc__subcmd__help,lsp) + cmd="prqlc__subcmd__help__subcmd__lsp" ;; - prqlc__help,parse) - cmd="prqlc__help__parse" + prqlc__subcmd__help,parse) + cmd="prqlc__subcmd__help__subcmd__parse" ;; - prqlc__help,shell-completion) - cmd="prqlc__help__shell__completion" + prqlc__subcmd__help,shell-completion) + cmd="prqlc__subcmd__help__subcmd__shell__subcmd__completion" ;; - prqlc__help,watch) - cmd="prqlc__help__watch" + prqlc__subcmd__help,watch) + cmd="prqlc__subcmd__help__subcmd__watch" ;; - prqlc__help__debug,annotate) - cmd="prqlc__help__debug__annotate" + prqlc__subcmd__help__subcmd__debug,annotate) + cmd="prqlc__subcmd__help__subcmd__debug__subcmd__annotate" ;; - prqlc__help__debug,ast) - cmd="prqlc__help__debug__ast" + prqlc__subcmd__help__subcmd__debug,ast) + cmd="prqlc__subcmd__help__subcmd__debug__subcmd__ast" ;; - prqlc__help__debug,json-schema) - cmd="prqlc__help__debug__json__schema" + prqlc__subcmd__help__subcmd__debug,json-schema) + cmd="prqlc__subcmd__help__subcmd__debug__subcmd__json__subcmd__schema" ;; - prqlc__help__debug,lineage) - cmd="prqlc__help__debug__lineage" + prqlc__subcmd__help__subcmd__debug,lineage) + cmd="prqlc__subcmd__help__subcmd__debug__subcmd__lineage" ;; - prqlc__help__experimental,doc) - cmd="prqlc__help__experimental__doc" + prqlc__subcmd__help__subcmd__experimental,doc) + cmd="prqlc__subcmd__help__subcmd__experimental__subcmd__doc" ;; - prqlc__help__experimental,highlight) - cmd="prqlc__help__experimental__highlight" + prqlc__subcmd__help__subcmd__experimental,highlight) + cmd="prqlc__subcmd__help__subcmd__experimental__subcmd__highlight" ;; *) ;; @@ -195,8 +192,8 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__collect) - opts="-h --color --help [INPUT] [OUTPUT] [MAIN_PATH]" + prqlc__subcmd__collect) + opts="-h --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -213,8 +210,8 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__compile) - opts="-t -h --hide-signature-comment --no-format --target --debug-log --color --help [INPUT] [OUTPUT] [MAIN_PATH]" + prqlc__subcmd__compile) + opts="-t -h --hide-signature-comment --no-format --target --debug-log --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -243,7 +240,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__debug) + prqlc__subcmd__debug) opts="-h --color --help annotate lineage ast json-schema help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -261,8 +258,8 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__debug__annotate) - opts="-h --color --help [INPUT] [OUTPUT] [MAIN_PATH]" + prqlc__subcmd__debug__subcmd__annotate) + opts="-h --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -279,7 +276,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__debug__ast) + prqlc__subcmd__debug__subcmd__ast) opts="-h --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -297,7 +294,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__debug__help) + prqlc__subcmd__debug__subcmd__help) opts="annotate lineage ast json-schema help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -311,7 +308,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__debug__help__annotate) + prqlc__subcmd__debug__subcmd__help__subcmd__annotate) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -325,7 +322,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__debug__help__ast) + prqlc__subcmd__debug__subcmd__help__subcmd__ast) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -339,7 +336,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__debug__help__help) + prqlc__subcmd__debug__subcmd__help__subcmd__help) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -353,7 +350,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__debug__help__json__schema) + prqlc__subcmd__debug__subcmd__help__subcmd__json__subcmd__schema) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -367,7 +364,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__debug__help__lineage) + prqlc__subcmd__debug__subcmd__help__subcmd__lineage) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -381,7 +378,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__debug__json__schema) + prqlc__subcmd__debug__subcmd__json__subcmd__schema) opts="-h --ir-type --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -403,8 +400,8 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__debug__lineage) - opts="-h --format --color --help [INPUT] [OUTPUT] [MAIN_PATH]" + prqlc__subcmd__debug__subcmd__lineage) + opts="-h --format --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -425,7 +422,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__experimental) + prqlc__subcmd__experimental) opts="-h --color --help doc highlight help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -443,8 +440,8 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__experimental__doc) - opts="-h --format --color --help [INPUT] [OUTPUT] [MAIN_PATH]" + prqlc__subcmd__experimental__subcmd__doc) + opts="-h --format --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -465,7 +462,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__experimental__help) + prqlc__subcmd__experimental__subcmd__help) opts="doc highlight help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -479,7 +476,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__experimental__help__doc) + prqlc__subcmd__experimental__subcmd__help__subcmd__doc) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -493,7 +490,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__experimental__help__help) + prqlc__subcmd__experimental__subcmd__help__subcmd__help) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -507,7 +504,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__experimental__help__highlight) + prqlc__subcmd__experimental__subcmd__help__subcmd__highlight) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -521,8 +518,8 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__experimental__highlight) - opts="-h --color --help [INPUT] [OUTPUT] [MAIN_PATH]" + prqlc__subcmd__experimental__subcmd__highlight) + opts="-h --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -539,8 +536,8 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__fmt) - opts="-h --color --help [INPUT]" + prqlc__subcmd__fmt) + opts="-h --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -557,7 +554,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help) + prqlc__subcmd__help) opts="parse lex fmt collect debug experimental compile watch list-targets lsp shell-completion help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -571,7 +568,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__collect) + prqlc__subcmd__help__subcmd__collect) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -585,7 +582,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__compile) + prqlc__subcmd__help__subcmd__compile) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -599,7 +596,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__debug) + prqlc__subcmd__help__subcmd__debug) opts="annotate lineage ast json-schema" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -613,7 +610,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__debug__annotate) + prqlc__subcmd__help__subcmd__debug__subcmd__annotate) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -627,7 +624,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__debug__ast) + prqlc__subcmd__help__subcmd__debug__subcmd__ast) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -641,7 +638,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__debug__json__schema) + prqlc__subcmd__help__subcmd__debug__subcmd__json__subcmd__schema) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -655,7 +652,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__debug__lineage) + prqlc__subcmd__help__subcmd__debug__subcmd__lineage) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -669,7 +666,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__experimental) + prqlc__subcmd__help__subcmd__experimental) opts="doc highlight" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -683,7 +680,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__experimental__doc) + prqlc__subcmd__help__subcmd__experimental__subcmd__doc) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -697,7 +694,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__experimental__highlight) + prqlc__subcmd__help__subcmd__experimental__subcmd__highlight) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -711,7 +708,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__fmt) + prqlc__subcmd__help__subcmd__fmt) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -725,7 +722,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__help) + prqlc__subcmd__help__subcmd__help) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -739,7 +736,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__lex) + prqlc__subcmd__help__subcmd__lex) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -753,7 +750,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__list__targets) + prqlc__subcmd__help__subcmd__list__subcmd__targets) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -767,7 +764,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__lsp) + prqlc__subcmd__help__subcmd__lsp) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -781,7 +778,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__parse) + prqlc__subcmd__help__subcmd__parse) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -795,7 +792,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__shell__completion) + prqlc__subcmd__help__subcmd__shell__subcmd__completion) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -809,7 +806,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__help__watch) + prqlc__subcmd__help__subcmd__watch) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -823,8 +820,8 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__lex) - opts="-h --format --color --help [INPUT] [OUTPUT] [MAIN_PATH]" + prqlc__subcmd__lex) + opts="-h --format --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -845,7 +842,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__list__targets) + prqlc__subcmd__list__subcmd__targets) opts="-h --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -863,7 +860,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__lsp) + prqlc__subcmd__lsp) opts="-h --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -881,8 +878,8 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__parse) - opts="-h --format --color --help [INPUT] [OUTPUT] [MAIN_PATH]" + prqlc__subcmd__parse) + opts="-h --format --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -903,7 +900,7 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__shell__completion) + prqlc__subcmd__shell__subcmd__completion) opts="-h --color --help bash elvish fig fish nushell powershell zsh" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -921,8 +918,8 @@ _prqlc() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - prqlc__watch) - opts="-h --no-format --no-signature --color --help " + prqlc__subcmd__watch) + opts="-h --no-format --no-signature --color --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/web/book/Cargo.toml b/web/book/Cargo.toml index 6c3c514494d3..1e87643c4996 100644 --- a/web/book/Cargo.toml +++ b/web/book/Cargo.toml @@ -35,7 +35,7 @@ anstream = { version = "1.0.0" } globset = "0.4.18" insta = { workspace = true } log = { workspace = true } -regex = "1.12.3" +regex = "1.12.4" serde_yaml = { workspace = true } similar-asserts = { workspace = true } walkdir = "2.5.0" From 3753aaae44a79657a4e9db7144382572dc6e0ee4 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Fri, 28 Aug 2026 17:59:55 -0700 Subject: [PATCH 3/5] chore: satisfy Rust 1.97 clippy --- prqlc/prqlc-parser/src/parser/stmt.rs | 1 - prqlc/prqlc/src/cli/mod.rs | 2 +- prqlc/prqlc/src/sql/pq/postprocess.rs | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/prqlc/prqlc-parser/src/parser/stmt.rs b/prqlc/prqlc-parser/src/parser/stmt.rs index ee8d56895f7b..e8582e5cb90f 100644 --- a/prqlc/prqlc-parser/src/parser/stmt.rs +++ b/prqlc/prqlc-parser/src/parser/stmt.rs @@ -270,7 +270,6 @@ where #[cfg(test)] mod tests { - use chumsky::prelude::*; use insta::{assert_debug_snapshot, assert_yaml_snapshot}; use super::*; diff --git a/prqlc/prqlc/src/cli/mod.rs b/prqlc/prqlc/src/cli/mod.rs index af0488aeea22..44a0d288cdc4 100644 --- a/prqlc/prqlc/src/cli/mod.rs +++ b/prqlc/prqlc/src/cli/mod.rs @@ -600,7 +600,7 @@ pub fn write_log(path: &std::path::Path) -> Result<()> { } fn drop_module_def(stmts: &mut Vec, name: &str) { - stmts.retain(|x| x.kind.as_module_def().map_or(true, |m| m.name != name)); + stmts.retain(|x| x.kind.as_module_def().is_none_or(|m| m.name != name)); } fn read_files(input: &mut clio::ClioPath) -> Result { diff --git a/prqlc/prqlc/src/sql/pq/postprocess.rs b/prqlc/prqlc/src/sql/pq/postprocess.rs index 4607930908b0..02d5f998d3e2 100644 --- a/prqlc/prqlc/src/sql/pq/postprocess.rs +++ b/prqlc/prqlc/src/sql/pq/postprocess.rs @@ -251,7 +251,7 @@ impl PqFold for SortingInference<'_> { } // store sorting to be used later in From references - let sorting = self.last_sorting.drain(..).collect(); + let sorting = std::mem::take(&mut self.last_sorting); log::debug!("--- sorting {sorting:?}"); let sorting = CteSorting { sorting, @@ -268,7 +268,7 @@ impl PqFold for SortingInference<'_> { self.main_relation = true; let mut main_relation = self.fold_sql_relation(query.main_relation)?; log::debug!("--== last_sorting {0:?}", self.last_sorting); - let last_sorting = self.last_sorting.drain(..).collect::>(); + let last_sorting = std::mem::take(&mut self.last_sorting); // push a sort at the back of the main pipeline if let SqlRelation::AtomicPipeline(pipeline) = &mut main_relation { @@ -347,7 +347,7 @@ impl PqMapper for SortingInference<'_> { let rel = self.fold_sql_relation(rel)?; // infer sorting from sub-query - sorting = self.last_sorting.drain(..).collect(); + sorting = std::mem::take(&mut self.last_sorting); sorting_from_distinct_on = self.last_sorting_from_distinct_on; expr.kind = RelationExprKind::SubQuery(rel); @@ -515,7 +515,7 @@ impl PqMapper for RelVarNameAssigner<'_> { // make sure it is not already present in current query while name .as_ref() - .map_or(true, |n| self.relation_instance_names.contains(n)) + .is_none_or(|n| self.relation_instance_names.contains(n)) { *name = Some(self.ctx.anchor.table_name.gen()); } From 04e857c6ee73836df41c84ca907505697cbb966e Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Fri, 28 Aug 2026 18:11:20 -0700 Subject: [PATCH 4/5] chore: preserve Windows dependency resolution --- Cargo.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b80594cfd08a..d77419e030ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1225,7 +1225,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -1973,7 +1973,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -2510,7 +2510,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3114,7 +3114,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -3470,7 +3470,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4116,7 +4116,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4968,7 +4968,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] From 65b86bbd5980f06599b6740be31df7d28d1e731b Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Fri, 28 Aug 2026 18:29:47 -0700 Subject: [PATCH 5/5] test: cover module removal helper --- prqlc/prqlc/src/cli/mod.rs | 39 +++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/prqlc/prqlc/src/cli/mod.rs b/prqlc/prqlc/src/cli/mod.rs index 44a0d288cdc4..7532b62173e1 100644 --- a/prqlc/prqlc/src/cli/mod.rs +++ b/prqlc/prqlc/src/cli/mod.rs @@ -673,10 +673,47 @@ fn combine_prql_and_frames(source: &str, frames: Vec<(Option, pl::Line /// are in `prqlc/prqlc/src/cli/test.rs`. #[cfg(test)] mod tests { - use insta::assert_snapshot; + use insta::{assert_debug_snapshot, assert_snapshot}; use super::*; + #[test] + fn drop_named_module_def() { + let module = |name: &str| { + pr::Stmt::new(pr::StmtKind::ModuleDef(pr::ModuleDef { + name: name.to_string(), + stmts: Vec::new(), + })) + }; + let mut stmts = vec![ + module("std"), + module("user"), + pr::Stmt::new(pr::StmtKind::VarDef(pr::VarDef { + kind: pr::VarDefKind::Let, + name: "value".to_string(), + value: None, + ty: None, + })), + ]; + + drop_module_def(&mut stmts, "std"); + + let remaining = stmts + .iter() + .map(|stmt| { + stmt.kind + .as_module_def() + .map_or("", |module| module.name.as_str()) + }) + .collect::>(); + assert_debug_snapshot!(remaining, @r#" + [ + "user", + "", + ] + "#); + } + #[test] fn layouts() { let output = Command::execute(