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: Desdaemon/odoo-lsp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: nightly-20230820
Choose a base ref
...
head repository: Desdaemon/odoo-lsp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Aug 21, 2023

  1. Copy the full SHA
    2f091dc View commit details
  2. Copy the full SHA
    58f86cf View commit details
  3. Copy the full SHA
    8ac427e View commit details
  4. feat: catch panics (todo)

    Desdaemon committed Aug 21, 2023
    Copy the full SHA
    8eb1d9a View commit details
  5. ci: attempt to fix check

    Desdaemon committed Aug 21, 2023
    Copy the full SHA
    64831a1 View commit details
  6. chore: update readme

    Desdaemon authored Aug 21, 2023
    Copy the full SHA
    e614162 View commit details
  7. Copy the full SHA
    1f48b36 View commit details
  8. Copy the full SHA
    1c1103a View commit details
  9. Copy the full SHA
    9f299b8 View commit details

Commits on Aug 22, 2023

  1. Copy the full SHA
    2735805 View commit details
  2. Copy the full SHA
    c4104ab View commit details
  3. Copy the full SHA
    2cdf5f6 View commit details
  4. Copy the full SHA
    266b291 View commit details
  5. ref: compare by str

    Desdaemon committed Aug 22, 2023
    Copy the full SHA
    f8f76d0 View commit details
  6. Copy the full SHA
    5e3511e View commit details
  7. Copy the full SHA
    9719d50 View commit details
  8. chore: update readme

    Desdaemon committed Aug 22, 2023
    Copy the full SHA
    7d81a5e View commit details
  9. chore: fix version

    Desdaemon committed Aug 22, 2023
    Copy the full SHA
    898c9b7 View commit details

Commits on Aug 23, 2023

  1. Copy the full SHA
    44f0479 View commit details
  2. Copy the full SHA
    a8c8744 View commit details
  3. ci: release extension files

    Desdaemon committed Aug 23, 2023
    Copy the full SHA
    6e382e0 View commit details
  4. Copy the full SHA
    eadb506 View commit details
  5. fix: broken badge on readme

    Desdaemon committed Aug 23, 2023
    Copy the full SHA
    b588818 View commit details
  6. fix(ci): empty SHA

    Desdaemon committed Aug 23, 2023
    Copy the full SHA
    b7eb228 View commit details
  7. Copy the full SHA
    284c551 View commit details
  8. doc: add env.ref demo

    Desdaemon committed Aug 23, 2023
    Copy the full SHA
    e42ab55 View commit details
  9. feat: catch panics

    Desdaemon committed Aug 23, 2023
    Copy the full SHA
    8ffc7ba View commit details
  10. stash: model autocomplete

    Desdaemon committed Aug 23, 2023
    Copy the full SHA
    cf05913 View commit details

Commits on Aug 24, 2023

  1. feat: index models

    Desdaemon committed Aug 24, 2023
    Copy the full SHA
    b12cd5e View commit details
  2. feat: complete model names

    Desdaemon committed Aug 24, 2023
    Copy the full SHA
    056d248 View commit details
  3. feat: model name references

    Desdaemon committed Aug 24, 2023
    Copy the full SHA
    fff627d View commit details
  4. fix: ignore nested records

    Desdaemon committed Aug 24, 2023
    Copy the full SHA
    5bd3553 View commit details
  5. Copy the full SHA
    68339e2 View commit details
  6. chore: update readme

    Desdaemon committed Aug 24, 2023
    Copy the full SHA
    867e2c1 View commit details
  7. chore: bump js deps

    Desdaemon committed Aug 24, 2023
    Copy the full SHA
    30055a3 View commit details
  8. Copy the full SHA
    441feb3 View commit details
  9. Copy the full SHA
    642b104 View commit details
  10. feat: relational fields

    Desdaemon committed Aug 24, 2023
    Copy the full SHA
    458f570 View commit details
  11. Copy the full SHA
    8082a53 View commit details

Commits on Aug 25, 2023

  1. doc: update readme

    Desdaemon committed Aug 25, 2023
    Copy the full SHA
    1241b18 View commit details
  2. feat: workspace symbols

    Desdaemon committed Aug 25, 2023
    Copy the full SHA
    76bfeab View commit details
  3. fix: no completions when deleting text

    When diffing text, sometimes this situation may occur:
    OLD:
        fields.Many2one('fubuzilla')<EOF>
                            cursor^
    NEW:
        fields.Many2one('')<EOF>
                   cursor^
    DELTA:
        fields.Many2one('fubuzilla')<EOF>
                   start^      end^
    
    In this situation, because the rope was updated first, the delta that
    the client sends will have its range-end fall out of bounds of the
    updated rope. This commit passes in the old rope when diffing text
    so that the range-end can always be parsed correctly.
    Desdaemon committed Aug 25, 2023
    Copy the full SHA
    3ca6266 View commit details
  4. Copy the full SHA
    ce50fdf View commit details
  5. Copy the full SHA
    807c2a1 View commit details
  6. Copy the full SHA
    428f17d View commit details
  7. Copy the full SHA
    5fbe6c6 View commit details

Commits on Aug 26, 2023

  1. fix: wrong cwd for odoo-lsp

    Desdaemon committed Aug 26, 2023
    Copy the full SHA
    97dd932 View commit details
  2. Copy the full SHA
    137aa4b View commit details
  3. feat: xml-id references

    Desdaemon committed Aug 26, 2023
    Copy the full SHA
    2722a4d View commit details
  4. Copy the full SHA
    fa16afc View commit details
Showing with 21,573 additions and 3,831 deletions.
  1. +7 −0 .clippy.toml
  2. +5 −1 .editorconfig
  3. +215 −0 .github/workflows/nightly.yml
  4. +0 −108 .github/workflows/rust.yml
  5. +127 −0 .github/workflows/test.yml
  6. +8 −3 .gitignore
  7. +2 −0 .helix/languages.toml
  8. +42 −8 .vscode/launch.json
  9. +2 −1 .vscode/settings.json
  10. +11 −1 .vscodeignore
  11. +373 −0 CHANGELOG.md
  12. +2,609 −684 Cargo.lock
  13. +74 −12 Cargo.toml
  14. +0 −1 LICENSE
  15. +144 −10 README.md
  16. +17 −0 biome.json
  17. +4 −4 client/package.json
  18. +199 −150 client/pnpm-lock.yaml
  19. +419 −146 client/src/extension.ts
  20. +105 −0 client/src/utils.ts
  21. +233 −0 client/src/xml.ts
  22. +6 −1 client/tsconfig.json
  23. +74 −0 cliff.toml
  24. +21 −0 crates/ts-indent/.vscode/launch.json
  25. +10 −0 crates/ts-indent/Cargo.toml
  26. +1 −0 crates/ts-indent/LICENSE
  27. +20 −0 crates/ts-indent/README.md
  28. +104 −0 crates/ts-indent/src/main.rs
  29. +19 −0 crates/ts-macros/Cargo.toml
  30. +1 −0 crates/ts-macros/LICENSE
  31. +250 −0 crates/ts-macros/src/lib.rs
  32. 0 dist/.gitkeep
  33. +6 −1 examples/.helix/languages.toml
  34. +79 −0 examples/init.lua
  35. +9 −6 examples/one/views/records.xml
  36. +6 −0 examples/one/views/templates.xml
  37. +36 −0 examples/two/test.py
  38. +17 −3 examples/two/views/records.xml
  39. +5 −0 examples/two/views/templates.xml
  40. +11 −0 justfile
  41. +1,765 −0 odoo.rng
  42. +146 −33 package.json
  43. +4,095 −2,037 pnpm-lock.yaml
  44. +3 −0 pyrightconfig.json
  45. +21 −0 scripts/build-grammar
  46. +22 −0 scripts/delete_assets.mjs
  47. +5 −0 scripts/ndiff
  48. +2 −0 scripts/nightly-changelog
  49. +6 −0 scripts/prepublish
  50. +667 −0 src/analyze.rs
  51. +976 −0 src/backend.rs
  52. +113 −0 src/catch_panic.rs
  53. +357 −0 src/cli.rs
  54. +67 −0 src/cli/tsconfig.rs
  55. +63 −0 src/component.rs
  56. +29 −0 src/config.rs
  57. +686 −98 src/index.rs
  58. +23 −0 src/index/common_names.txt
  59. +312 −0 src/index/component.rs
  60. +215 −0 src/index/record.rs
  61. +71 −0 src/index/registry.rs
  62. +146 −0 src/index/symbol.rs
  63. +48 −0 src/index/template.rs
  64. +116 −0 src/js.rs
  65. +12 −1 src/lib.rs
  66. +783 −425 src/main.rs
  67. +572 −0 src/model.rs
  68. +35 −0 src/partial.rs
  69. +1,469 −0 src/python.rs
  70. +254 −73 src/record.rs
  71. +255 −0 src/str.rs
  72. +225 −0 src/template.rs
  73. +452 −24 src/utils.rs
  74. +418 −0 src/utils/usage.rs
  75. +48 −0 src/utils/visitor.rs
  76. +1,113 −0 src/xml.rs
  77. BIN static/fields.gif
  78. BIN static/inherit_id.gif
  79. BIN static/model.gif
  80. BIN static/symbols.gif
  81. +63 −0 syntaxes/gen/odoo-owl.yml
  82. +20 −0 syntaxes/gen/odoo-python.yml
  83. +148 −0 syntaxes/gen/odoo-xml.yml
  84. +18 −0 testing/README.md
  85. 0 testing/__init__.py
  86. +137 −0 testing/common.py
  87. +67 −0 testing/conftest.py
  88. +16 −0 testing/fixtures/basic/.odoo_lsp
  89. +1 −0 testing/fixtures/basic/bar/__manifest__.py
  90. +10 −0 testing/fixtures/basic/bar/models.py
  91. +7 −0 testing/fixtures/basic/conftest.py
  92. +1 −0 testing/fixtures/basic/foo/__manifest__.py
  93. +68 −0 testing/fixtures/basic/foo/models.py
  94. +6 −0 testing/fixtures/basic/foo/records.xml
  95. +42 −0 testing/fixtures/basic/test_basic.py
  96. +1 −0 testing/fixtures/field_domain/.odoo_lsp
  97. +7 −0 testing/fixtures/field_domain/conftest.py
  98. +1 −0 testing/fixtures/field_domain/foo/__manifest__.py
  99. +11 −0 testing/fixtures/field_domain/foo/models.py
  100. +11 −0 testing/fixtures/field_domain/test_field_domain.py
  101. +7 −0 testing/pyproject.toml
  102. +8 −0 testing/requirements.in
  103. +34 −0 testing/scaffold.py
  104. +10 −0 testing/template.py
  105. +7 −0 testing/template_conftest.py
  106. +11 −0 testing/template_test_main.py
7 changes: 7 additions & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[await-holding-invalid-types]]
path = "dashmap::mapref::one::RefMut"
reason = "Would deadlock if another task wants to acquire a reference"

[[await-holding-invalid-types]]
path = "dashmap::mapref::one::Ref"
reason = "Would deadlock if another task wants to acquire a reference"
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -6,7 +6,11 @@ max_line_length = 120
[*.rs]
indent_size = 4

[*.md]
[*.py]
indent_size = 4
indent_style = space

[*.{md,yml,yaml}]
indent_style = space
indent_size = 2
max_line_length = 80
215 changes: 215 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
name: nightly

on:
workflow_dispatch:
inputs:
release_name:
type: string
description: Release name, defaults to `nightly`
tag_name:
type: string
description: Tag name, defaults to `nightly-YYYYMMDD`, or release name if specified
prerelease:
type: boolean
default: true
description: "Is this a prerelease?"
schedule:
- cron: "0 4 * * *"

env:
CARGO_TERM_COLOR: always

concurrency:
group: ci-nightly
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check_changes.outputs.skip }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check for changes
id: check_changes
run: |
if [ "$(git log $(git describe --tags --abbrev=0)..HEAD --oneline)" = "" ]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
fi
tag:
needs: check
if: needs.check.outputs.skip != 'true'
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
tag: ${{ steps.output_tag.outputs.tag }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Compute tag
run: echo "TAG=${{ inputs.tag_name || inputs.release_name || 'nightly-$(date +"%Y%m%d")' }}" >> "$GITHUB_ENV"
- name: Create tag
id: create_tag
run: git tag -f ${{ env.TAG }} && git push --tags
- name: Output tag
id: output_tag
run: echo "tag=${{ env.TAG }}" >> "$GITHUB_OUTPUT"

build:
needs: [check, tag]
runs-on: ${{ matrix.runs-on }}

if: needs.check.outputs.skip != 'true'

strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-latest
target: x86_64-unknown-linux-gnu
- runs-on: ubuntu-latest
target: i686-unknown-linux-gnu
- runs-on: ubuntu-latest
target: x86_64-unknown-linux-musl
- runs-on: macos-latest
target: x86_64-apple-darwin
- runs-on: macos-latest
target: aarch64-apple-darwin
- runs-on: windows-latest
target: x86_64-pc-windows-msvc
- runs-on: windows-latest
target: i686-pc-windows-msvc

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.target }}

- name: Additional setup for musl
if: contains(matrix.target, 'musl')
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
- name: Additional setup for Linux x86
if: matrix.target == 'i686-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-multilib
- name: Build
run: cargo build --release --target ${{ matrix.target }}

- name: Zip files
shell: bash
run: |
if [ "${{ matrix.runs-on }}" = "windows-latest" ]; then
mv ./target/${{ matrix.target }}/release/odoo-lsp.exe .
7z a -tzip odoo-lsp-${{ matrix.target }}.zip ./odoo-lsp.exe
else
mv ./target/${{ matrix.target }}/release/odoo-lsp .
tar -czvf odoo-lsp-${{ matrix.target }}.tgz odoo-lsp
fi
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
path: ./odoo-lsp-${{ matrix.target }}.${{ matrix.runs-on == 'windows-latest' && 'zip' || 'tgz' }}
name: odoo-lsp-${{ matrix.target }}.${{ matrix.runs-on == 'windows-latest' && 'zip' || 'tgz' }}

build-extension:
needs: [check, tag]
runs-on: ubuntu-latest
if: needs.check.outputs.skip != 'true'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- run: pnpm install
- name: Inject custom release name
if: "${{ inputs.release_name != '' }}"
run: |
cat package.json | jq '. +{"_release":"${{ inputs.release_name }}"}' > __temp__
mv __temp__ package.json
- run: pnpm package
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
path: ./odoo-lsp-*.vsix
name: odoo-lsp-extension.vsix

untag:
needs: [build, build-extension, tag]
if: always() && (needs.build.result != 'success' || needs.build-extension.result != 'success') && needs.check.outputs.skip != 'true'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Remove tag
run: git tag -d ${{ needs.tag.outputs.tag }} && git push origin :${{ needs.tag.outputs.tag }}

release:
name: Create Release
runs-on: ubuntu-latest
needs: [build, build-extension, tag]
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 5
fetch-tags: true
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Generate checksums
run: |
for file in odoo-lsp-*/odoo-lsp-*; do
openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256";
done
- name: Setup git-cliff
uses: taiki-e/install-action@v2
with:
tool: git-cliff
- name: Generate release notes
run: |
if [[ '${{ needs.tag.outputs.tag }}' == 'nightly-'* ]]; then
./scripts/nightly-changelog > ${{ github.workspace }}-CHANGELOG.txt
else
git cliff -l > ${{ github.workspace }}-CHANGELOG.txt
fi
- name: Release
uses: softprops/action-gh-release@v1
with:
files: odoo-lsp-*/odoo-lsp-*
name: ${{ inputs.release_name || 'nightly' }}
tag_name: ${{ needs.tag.outputs.tag }}
body_path: ${{ github.workspace }}-CHANGELOG.txt
prerelease: ${{ github.event_name != 'workflow_dispatch' || inputs.prerelease }}
108 changes: 0 additions & 108 deletions .github/workflows/rust.yml

This file was deleted.

Loading