Skip to content

Commit

Permalink
[move-analyzer] Support document symbol PSL (move-language#218)
Browse files Browse the repository at this point in the history
* feat: add release workflow

* feat: update release script

* feat: update release

* feat: fmt release.sh

* feat: add lsp.test.ts for move-analyzer

* feat: fix copyfiles error

* feat: config test for lsp

* feat: ok for lsp test

* feat: get symbols from table

* feat: export symbols

* feat: test textDocument/documentSymbol

* feat: re impl symbols

* feat: parse symbols tree

* feat: ok for on_document_symbol_request

* feat: auto build move-analyzer and set default for serverPath

* feat: fix ci check fail

* feat: fix ci check error

* feat: fix lint error

* fix: fix lsp test fail

* feat: fmt move-analyzer code

* feat: fix lsp fisrt test error

* feat: update timeout for move-analyzer active

* feat: support events

* fix: fix error for LSP test

* feat: fix bug for merge from master

* feat: fmt code

* feat: update test and igonre package-lock.json for broken url test

* feat: change name for ready events

* feat: remove unrelate code

* feat: remove yarn.lock

* feat: ignore yarn.lock and recover configuration.ts

* feat: update the comment for OnReady

* feat: remove codes

* feat: lock file

* feat: add waiting code

* feat: try lock code

* feat: test new way

* feat: ok for symbols

* feat: fix ci-check issue

* feat: update ci-check issues

* feat: fix ci-check issues

* [Move analyzer] Added support for computing first symbol info synchronously

* feat: handle symbols on start

* feat: remove unuse code

* feat: format code

* feat: add test for mac and windows platform

* feat: fix bug for uri to path

* feat: fixbug for windows platform get_symbols stack overflow

* feat: fixbug for reporting lsp diagnostics

* feat: fixbug for windows test

* feat: fix lint error for language/move-analyzer/src/symbols.rs

* feat: remove config for windows stack

* feat: update pipeline for move-analyzer

* feat: change name for test-move-analyzer-vscode-extension

* feat: remove tsfmt for windows check fail

* feat: fixbug for stack overflow and lint error

* feat: fix lint error

* feat: add commit for linebreak-style

* feat: fix code review issue

* feat: remove linkarg config

* feat: update cargo/config fmt

* feat: config move-analyzer test vscode version to 1.69.2

* feat: add comments for plugin activate

* feat: upgrate ci-test mac system to mac-11

* feat: update style issue

* feat: fixbug for user data dir too long for 1.69.2

* feat: fixbug for userDataDir too long

* feat: fixbug for vsce package missing files

* feat: add feature in README.md

* feat: add comment for startClient func in context.ts

* feat: update package-lock.json

* feat: format context.ts

* feat: update package-lock.json for move-analyzer

* feat: format context.ts

* feat: add outline feature detail descripe

* feat: format README
  • Loading branch information
yubing744 authored and nkysg committed Sep 27, 2022
1 parent 131e7e0 commit 50d109a
Show file tree
Hide file tree
Showing 24 changed files with 7,993 additions and 7,127 deletions.
48 changes: 44 additions & 4 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,19 @@ jobs:
# path: |
# /tmp/benches

build-move-analyzer-vscode-extension:
name: Build VS Code extension for move-analyzer
runs-on: ubuntu-latest
test-move-analyzer-vscode-extension:
name: Test VS Code extension for move-analyzer
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-11, windows-2022]
runs-on: ${{ matrix.os }}
needs:
- prepare
steps:
- uses: actions/[email protected]
- name: install rust toolchain
uses: actions-rs/toolchain@v1
- name: Use Node.js 14
uses: actions/[email protected]
with:
Expand All @@ -232,6 +238,26 @@ jobs:
with:
working-directory: language/move-analyzer/editors/code
run: npm run test

release-move-analyzer-vscode-extension:
name: Release VS Code extension for move-analyzer
runs-on: ubuntu-20.04
needs:
- prepare
steps:
- uses: actions/[email protected]
- name: install rust toolchain
uses: actions-rs/toolchain@v1
- name: Use Node.js 14
uses: actions/[email protected]
with:
node-version: "14"
- name: Install NPM dependencies
working-directory: language/move-analyzer/editors/code
run: npm install
- name: Build the extension
working-directory: language/move-analyzer/editors/code
run: npm run pretest
- name: Package the extension
working-directory: language/move-analyzer/editors/code
run: npm run package
Expand All @@ -257,4 +283,18 @@ jobs:
gem install awesome_bot
# Don't look in git or target dirs. Don't check png, bib, tex, js, or shell files
# We allow links to be redirects, allow duplicates, and we also allow Too Many Requests (429) errors
find . -not \( -path "./.git*" -prune \) -not \( -path "./target" -prune \) -type f -not -name "*.png" -not -name "*.sh" -not -name "*.bib" -not -name "*.tex" -not -name "*.js" | while read arg; do awesome_bot --allow-redirect --allow-dupe --allow 429 --skip-save-results $arg; done
find . -not \( -path "./.git*" -prune \) -not \( -path "./target" -prune \) -type f -not -name "*.png" -not -name "*.sh" -not -name "*.bib" -not -name "*.tex" -not -name "*.js" -not -name "package-lock.json" | while read arg; do awesome_bot --allow-redirect --allow-dupe --allow 429 --skip-save-results $arg; done
build-move-cli-docker-image:
name: Build Docker image for the Move CLI
runs-on: ubuntu-latest
needs:
- prepare
steps:
- uses: actions/[email protected]
- name: Build Dockerfile
run: "docker build -t move/cli -f docker/move-cli/Dockerfile ."
- name: Build BasicCoin Move module
run: |
cd ./language/documentation/tutorial/step_1/BasicCoin
docker run -v `pwd`:/project move/cli build
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions language/move-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ im = "15.1.0"
lsp-server = "0.5.1"
lsp-types = "0.90.1"
petgraph = "0.5.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.64"
tempfile = "3.2.0"
url = "2.2.2"
Expand Down
15 changes: 10 additions & 5 deletions language/move-analyzer/editors/code/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"function-call-argument-newline": ["warn", "consistent"],
"function-paren-newline": ["warn", "consistent"],
"key-spacing": "warn",
"linebreak-style": "warn",
"linebreak-style": "off", // We use different linebreak styles. ref https://eslint.org/docs/latest/rules/linebreak-style
"max-len": [
"warn",
{
Expand Down Expand Up @@ -139,7 +139,6 @@
// * All @typescript-eslint rules: https://github.com/typescript-eslint/typescript-eslint/tree/v4.31.1/packages/eslint-plugin/docs/rules
// * The rules included in @typescript-eslint/recommended: https://github.com/typescript-eslint/typescript-eslint/blob/v4.31.1/packages/eslint-plugin/src/configs/recommended.ts
// * The rules included in @typescript-eslint/recommended-requiring-type-checking: https://github.com/typescript-eslint/typescript-eslint/blob/v4.31.1/packages/eslint-plugin/src/configs/recommended-requiring-type-checking.ts
"@typescript-eslint/array-type": ["warn", { "default": "generic" }],
"@typescript-eslint/ban-tslint-comment": "warn",
"@typescript-eslint/brace-style": "warn",
"@typescript-eslint/comma-dangle": [
Expand All @@ -158,7 +157,7 @@
"@typescript-eslint/keyword-spacing": "warn",
"@typescript-eslint/lines-between-class-members": "warn",
"@typescript-eslint/member-delimiter-style": "warn",
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-base-to-string": "warn",
"@typescript-eslint/no-confusing-non-null-assertion": "warn",
"@typescript-eslint/no-duplicate-imports": "warn",
Expand Down Expand Up @@ -206,10 +205,16 @@
],
"@typescript-eslint/strict-boolean-expressions": "warn",
"@typescript-eslint/switch-exhaustiveness-check": "warn",
"@typescript-eslint/type-annotation-spacing": "warn",
"@typescript-eslint/unified-signatures": "warn",

// The following are eslint-plugin-tsdoc rules:
"tsdoc/syntax": "warn"
"tsdoc/syntax": "warn",

"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/type-annotation-spacing": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/array-type": "off"
}
}
2 changes: 2 additions & 0 deletions language/move-analyzer/editors/code/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ out
.vscode-test
# VS Code extension package (VSIX) archive
*.vsix
# Yarn cache directory
yarn.lock
2 changes: 1 addition & 1 deletion language/move-analyzer/editors/code/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

**/*
!images/move.png
!out/src/*
!out/src/**/*
!node_modules/**/*
!language-configuration.json
!move.tmLanguage.json
Expand Down
1 change: 1 addition & 0 deletions language/move-analyzer/editors/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ Move source file (a file with a `.move` file extension) and:
- go to type definition
- go to references
- type on hover
- outline view showing symbol tree for Move source files
Loading

0 comments on commit 50d109a

Please sign in to comment.