Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: supabase-community/postgres-language-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: refs/heads/fix/statement-trim
Choose a base ref
...
head repository: supabase-community/postgres-language-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Apr 6, 2025

  1. Copy the full SHA
    7278f90 View commit details
  2. Copy the full SHA
    451579d View commit details

Commits on Apr 11, 2025

  1. refactor: parser (#322)

    psteinroe authored Apr 11, 2025
    Copy the full SHA
    4867189 View commit details

Commits on Apr 12, 2025

  1. Copy the full SHA
    a1fdb5b View commit details
  2. Copy the full SHA
    1cfa5b8 View commit details
  3. refactor: simplify parser ? (#330)

    * simplify
    
    * simplify 2
    
    * simplify 3
    
    * ok
    
    * ffs
    
    * comment
    
    * ok............
    
    * tidying up
    
    * comment…
    
    * ok
    
    * comment
    
    * more
    
    * ok
    
    * ok
    
    * end test
    juleswritescode authored Apr 12, 2025
    Copy the full SHA
    70f0c93 View commit details
  4. feat: annotations (#331)

    psteinroe authored Apr 12, 2025
    Copy the full SHA
    a358cee View commit details

Commits on Apr 13, 2025

  1. feat: request autocompletion without typing a letter (#310)

    * so far…
    
    * hmmm
    
    * awesome!
    
    * refactor, terminate by semicolons
    
    * got the tests…
    
    * hell yeah
    
    * give it a spin
    
    * yeah
    
    * leave the logs to the beavers
    
    * add benchmarks
    
    * cant fail
    juleswritescode authored Apr 13, 2025
    Copy the full SHA
    d439c36 View commit details

Commits on Apr 15, 2025

  1. fix: comments only (#337)

    psteinroe authored Apr 15, 2025
    Copy the full SHA
    777c80b View commit details
  2. Copy the full SHA
    8519fc6 View commit details
  3. Copy the full SHA
    9bc27b7 View commit details
  4. fix: plpglsql cmds (#336)

    psteinroe authored Apr 15, 2025
    Copy the full SHA
    37137bc View commit details
  5. Copy the full SHA
    c6001fe View commit details
  6. Copy the full SHA
    8ae75b3 View commit details

Commits on Apr 19, 2025

  1. Copy the full SHA
    4792d06 View commit details
  2. fix: report db connection errors (#348)

    * fix: report db connection errors
    
    * Update lib.rs
    psteinroe authored Apr 19, 2025
    Copy the full SHA
    1adfd23 View commit details
  3. chore: ensure auto fixes are applied (#349)

    * fix: lint
    
    * chore: check optional changes are applied in ci
    
    * debug
    
    * debug
    
    * fix: check for uncommitted changes only
    
    * fix: make gha linter happy
    
    * Update pull_request.yml
    
    * ...
    psteinroe authored Apr 19, 2025
    Copy the full SHA
    13b661e View commit details
  4. Copy the full SHA
    6b3447c View commit details
  5. Copy the full SHA
    d33bc4f View commit details
  6. Copy the full SHA
    745bd33 View commit details
  7. fix: release

    psteinroe committed Apr 19, 2025
    Copy the full SHA
    1e35f2a View commit details
  8. fix: ensure tag matches

    psteinroe committed Apr 19, 2025
    Copy the full SHA
    a5ba9cb View commit details

Commits on Apr 21, 2025

  1. Copy the full SHA
    ebb0ca5 View commit details
  2. Copy the full SHA
    1dd4791 View commit details
  3. fix(completions): cursor on dot, other issues (#359)

    * fix(completions): cursor on dot, other issues
    
    * ?
    
    * test belongs here
    
    * refs
    juleswritescode committed Apr 21, 2025
    Copy the full SHA
    f837c1a View commit details
  4. Copy the full SHA
    b2f8f0c View commit details
  5. Copy the full SHA
    4618af1 View commit details

Commits on Apr 22, 2025

  1. Copy the full SHA
    a6972a6 View commit details
Showing with 3,495 additions and 973 deletions.
  1. +0 −1 .github/workflows/publish.reusable.yml
  2. +20 −9 .github/workflows/pull_request.yml
  3. +14 −10 .github/workflows/release.yml
  4. +167 −3 Cargo.lock
  5. +0 −7 Cargo.toml
  6. +3 −3 cliff.toml
  7. +6 −0 crates/pgt_completions/Cargo.toml
  8. +249 −0 crates/pgt_completions/benches/sanitization.rs
  9. +70 −27 crates/pgt_completions/src/builder.rs
  10. +12 −4 crates/pgt_completions/src/complete.rs
  11. +79 −53 crates/pgt_completions/src/context.rs
  12. +18 −1 crates/pgt_completions/src/item.rs
  13. +2 −0 crates/pgt_completions/src/lib.rs
  14. +184 −11 crates/pgt_completions/src/providers/columns.rs
  15. +10 −6 crates/pgt_completions/src/providers/functions.rs
  16. +2 −0 crates/pgt_completions/src/providers/mod.rs
  17. +71 −0 crates/pgt_completions/src/providers/schemas.rs
  18. +12 −10 crates/pgt_completions/src/providers/tables.rs
  19. +4 −180 crates/pgt_completions/src/relevance.rs
  20. +105 −0 crates/pgt_completions/src/relevance/filtering.rs
  21. +182 −0 crates/pgt_completions/src/relevance/scoring.rs
  22. +320 −0 crates/pgt_completions/src/sanitization.rs
  23. +68 −3 crates/pgt_completions/src/test_helper.rs
  24. +3 −2 crates/pgt_lexer/src/lib.rs
  25. +1 −1 crates/pgt_lsp/src/capabilities.rs
  26. +5 −6 crates/pgt_lsp/src/handlers/code_actions.rs
  27. +3 −1 crates/pgt_lsp/src/handlers/completions.rs
  28. +1 −0 crates/pgt_schema_cache/src/lib.rs
  29. +3 −3 crates/pgt_schema_cache/src/schemas.rs
  30. +34 −3 crates/pgt_statement_splitter/src/lib.rs
  31. +131 −113 crates/pgt_statement_splitter/src/parser.rs
  32. +70 −6 crates/pgt_statement_splitter/src/parser/common.rs
  33. +3 −1 crates/pgt_statement_splitter/src/parser/dml.rs
  34. +7 −0 crates/pgt_statement_splitter/tests/data/simple_union__4.sql
  35. +18 −0 crates/pgt_text_size/src/range.rs
  36. +9 −11 crates/pgt_typecheck/src/diagnostics.rs
  37. +10 −12 crates/pgt_typecheck/src/lib.rs
  38. +3 −3 crates/pgt_typecheck/tests/diagnostics.rs
  39. +1 −0 crates/pgt_workspace/Cargo.toml
  40. +7 −6 crates/pgt_workspace/src/configuration.rs
  41. +157 −1 crates/pgt_workspace/src/features/completions.rs
  42. +2 −1 crates/pgt_workspace/src/workspace.rs
  43. +154 −218 crates/pgt_workspace/src/workspace/server.rs
  44. +87 −0 crates/pgt_workspace/src/workspace/server/annotation.rs
  45. +454 −117 crates/pgt_workspace/src/workspace/server/change.rs
  46. +33 −89 crates/pgt_workspace/src/workspace/server/document.rs
  47. +431 −0 crates/pgt_workspace/src/workspace/server/parsed_document.rs
  48. +18 −32 crates/pgt_workspace/src/workspace/server/pg_query.rs
  49. +122 −0 crates/pgt_workspace/src/workspace/server/sql_function.rs
  50. +99 −0 crates/pgt_workspace/src/workspace/server/statement_identifier.rs
  51. +31 −19 crates/pgt_workspace/src/workspace/server/tree_sitter.rs
1 change: 0 additions & 1 deletion .github/workflows/publish.reusable.yml
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
# ? what's this?! required for executing the node script?
id-token: write
steps:
- uses: actions/checkout@v4
29 changes: 20 additions & 9 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -100,22 +100,31 @@ jobs:
uses: biomejs/setup-biome@v2
with:
version: latest

- name: Run Lints
run: |
cargo clippy
cargo run -p rules_check
biome lint
cargo sqlx prepare --check --workspace
cargo clippy --fix
cargo run -p rules_check
biome lint --write
- name: Check for changes
run: |
if [[ $(git status --porcelain) ]]; then
git status
git diff
exit 1
fi
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# reactive once we upgrade to the latest version of pg_query that is windows-compatible
- os: windows-latest
- os: ubuntu-latest
# use the same images we use for compiling
- os: windows-2022
- os: ubuntu-22.04
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
@@ -138,8 +147,10 @@ jobs:
run: cargo test --workspace

test-js-bindings:
name: Test JS Bindings
runs-on: ubuntu-latest
name:
Test JS Bindings
# use the same image we use for compiling
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:latest
@@ -173,7 +184,7 @@ jobs:

codegen:
name: Check Codegen
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:latest
24 changes: 14 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -37,12 +37,12 @@ jobs:
strategy:
matrix:
config:
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
- { os: ubuntu-latest, target: aarch64-unknown-linux-gnu }
- { os: macos-latest, target: x86_64-apple-darwin }
- { os: macos-latest, target: aarch64-apple-darwin }
- { os: windows-latest, target: x86_64-pc-windows-msvc }
- { os: windows-latest, target: aarch64-pc-windows-msvc }
- { os: ubuntu-22.04, target: x86_64-unknown-linux-gnu }
- { os: ubuntu-22.04, target: aarch64-unknown-linux-gnu }
- { os: macos-14, target: x86_64-apple-darwin }
- { os: macos-14, target: aarch64-apple-darwin }
- { os: windows-2022, target: x86_64-pc-windows-msvc }
- { os: windows-2022, target: aarch64-pc-windows-msvc }

runs-on: ${{ matrix.config.os }}

@@ -87,12 +87,12 @@ jobs:

# windows is a special snowflake too, it saves binaries as .exe
- name: 👦 Name the Binary
if: matrix.config.os == 'windows-latest'
if: matrix.config.os == 'windows-2022'
run: |
mkdir dist
cp target/${{ matrix.config.target }}/release/postgrestools.exe ./dist/postgrestools_${{ matrix.config.target }}
- name: 👦 Name the Binary
if: matrix.config.os != 'windows-latest'
if: matrix.config.os != 'windows-2022'
run: |
mkdir dist
cp target/${{ matrix.config.target }}/release/postgrestools ./dist/postgrestools_${{ matrix.config.target }}
@@ -113,7 +113,7 @@ jobs:

create_changelog_and_release:
runs-on: ubuntu-latest
needs: build_and_test # make sure that tests & build work correctly
needs: [extract_version, build_and_test] # make sure that tests & build work correctly
steps:
- name: Checkout Repo
uses: actions/checkout@v4
@@ -126,10 +126,14 @@ jobs:
id: create_changelog
with:
config: cliff.toml
args: --bump
args: --bump --unreleased
env:
GITHUB_REPO: ${{ github.repository }}

- name: Ensure tag matches
if: steps.create_changelog.outputs.version != needs.extract_version.outputs.version
run: exit 1

- name: 👇 Download Artifacts
uses: actions/download-artifact@v4
id: download
Loading