Skip to content

Commit eefa10b

Browse files
committed
Merge branch 'master' into assists_extract_enum
2 parents a9d5675 + 794f6da commit eefa10b

File tree

172 files changed

+6904
-3679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+6904
-3679
lines changed

.github/actions/github-release/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async function runOnce() {
1616
const slug = process.env.GITHUB_REPOSITORY;
1717
const owner = slug.split('/')[0];
1818
const repo = slug.split('/')[1];
19-
const sha = process.env.GITHUB_SHA;
19+
const sha = process.env.HEAD_SHA;
2020

2121
core.info(`files: ${files}`);
2222
core.info(`name: ${name}`);

.github/workflows/ci.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,13 @@ jobs:
9797

9898
typescript:
9999
name: TypeScript
100-
runs-on: ubuntu-latest
100+
strategy:
101+
fail-fast: false
102+
matrix:
103+
os: [ubuntu-latest, windows-latest, macos-latest]
104+
105+
runs-on: ${{ matrix.os }}
106+
101107
steps:
102108
- name: Checkout repository
103109
uses: actions/checkout@v2
@@ -111,10 +117,19 @@ jobs:
111117
working-directory: ./editors/code
112118

113119
- run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; }
120+
if: runner.os == 'Linux'
114121
working-directory: ./editors/code
115122

116123
- run: npm run lint
117124
working-directory: ./editors/code
118125

126+
- name: Run vscode tests
127+
uses: GabrielBB/xvfb-action@v1.2
128+
env:
129+
VSCODE_CLI: 1
130+
with:
131+
run: npm --prefix ./editors/code test
132+
# working-directory: ./editors/code # does not work: https://github.com/GabrielBB/xvfb-action/issues/8
133+
119134
- run: npm run package --scripts-prepend-node-path
120135
working-directory: ./editors/code

.github/workflows/release.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
push:
77
branches:
88
- release
9-
- nightly
9+
- trigger-nightly
1010

1111
env:
1212
CARGO_INCREMENTAL: 0
@@ -88,6 +88,9 @@ jobs:
8888
- name: Checkout repository
8989
uses: actions/checkout@v2
9090

91+
- run: echo "::set-env name=HEAD_SHA::$(git rev-parse HEAD)"
92+
- run: 'echo "HEAD_SHA: $HEAD_SHA"'
93+
9194
- uses: actions/download-artifact@v1
9295
with:
9396
name: dist-macos-latest

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ crates/*/target
77
*.log
88
*.iml
99
.vscode/settings.json
10-
cargo-timing*.html
10+
*.html
11+
generated_assists.adoc
12+
generated_features.adoc

.vscode/launch.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,28 @@
7070
"__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/release/rust-analyzer"
7171
}
7272
},
73+
{
74+
// Used for testing the extension with a local build of the LSP server (in `target/release`)
75+
// with all other extendions loaded.
76+
"name": "Run With Extensions",
77+
"type": "extensionHost",
78+
"request": "launch",
79+
"runtimeExecutable": "${execPath}",
80+
"args": [
81+
"--disable-extension", "matklad.rust-analyzer",
82+
"--extensionDevelopmentPath=${workspaceFolder}/editors/code"
83+
],
84+
"outFiles": [
85+
"${workspaceFolder}/editors/code/out/**/*.js"
86+
],
87+
"preLaunchTask": "Build Server (Release) and Extension",
88+
"skipFiles": [
89+
"<node_internals>/**/*.js"
90+
],
91+
"env": {
92+
"__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/release/rust-analyzer"
93+
}
94+
},
7395
{
7496
// Used to attach LLDB to a running LSP server.
7597
// NOTE: Might require root permissions. For this run:
@@ -87,5 +109,17 @@
87109
"rust"
88110
]
89111
},
112+
{
113+
"name": "Run Unit Tests",
114+
"type": "extensionHost",
115+
"request": "launch",
116+
"runtimeExecutable": "${execPath}",
117+
"args": [
118+
"--extensionDevelopmentPath=${workspaceFolder}/editors/code",
119+
"--extensionTestsPath=${workspaceFolder}/editors/code/out/tests/unit" ],
120+
"sourceMaps": true,
121+
"outFiles": [ "${workspaceFolder}/editors/code/out/tests/unit/**/*.js" ],
122+
"preLaunchTask": "Pretest"
123+
}
90124
]
91125
}

.vscode/tasks.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@
4040
"command": "cargo build --release --package rust-analyzer",
4141
"problemMatcher": "$rustc"
4242
},
43+
{
44+
"label": "Pretest",
45+
"group": "build",
46+
"isBackground": false,
47+
"type": "npm",
48+
"script": "pretest",
49+
"path": "editors/code/",
50+
"problemMatcher": {
51+
"base": "$tsc",
52+
"fileLocation": ["relative", "${workspaceFolder}/editors/code/"]
53+
}
54+
},
4355

4456
{
4557
"label": "Build Server and Extension",

0 commit comments

Comments
 (0)