Skip to content

Commit f759c2e

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/lsp-formatting
2 parents ce46294 + e9b2109 commit f759c2e

File tree

164 files changed

+13154
-5621
lines changed

Some content is hidden

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

164 files changed

+13154
-5621
lines changed

.github/ISSUE_TEMPLATE/stable-release-manual-testing-template.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@ assignees: ''
1717

1818
First a "pre-release" of the supporting compiler/typechecker tools must be done, so we know we are releasing a consistently compiled standard library.
1919

20-
- [ ] typepal and rascal-core compile in the continuous integration environment and no tests fail
21-
- [ ] release typepal
22-
- [ ] release rascal-core
23-
- [ ] bump typepal and rascal-core versions in rascal-maven-plugin to latest releases
24-
- [ ] release rascal-maven-plugin
25-
- [ ] bump rascal-maven-plugin dependency in rascal and rascal-lsp projects
26-
- [ ] bump typepal and rascal-core versions in rascal-lsp project
20+
- [ ] rascal compiles in the continuous integration environment and no tests fail
21+
- [ ] release rascal
22+
- [ ] bump rascal version in rascal-lsp project
2723
- [ ] fix new errors and warnings in rascal and rascal-lsp project
2824

2925
# Manual version checks

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ updates:
2525
dependency-type: "development"
2626
exclude-patterns:
2727
- "@types/vscode"
28+
- package-ecosystem: "github-actions"
29+
directory: "/"
30+
schedule:
31+
interval: "monthly"
32+
groups:
33+
version-updates:
34+
patterns:
35+
- "*"

.github/workflows/build.yaml

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ permissions:
1616

1717
jobs:
1818
normal-tests:
19-
runs-on: buildjet-2vcpu-ubuntu-2204
19+
runs-on: ubicloud-standard-2
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v6
2222
- name: Assure different pom cache hit
2323
run: echo " " >> rascal-lsp/pom.xml
24-
- uses: actions/setup-java@v4
24+
- uses: actions/setup-java@v5
2525
with:
2626
java-version: 11
2727
distribution: 'temurin'
2828
cache: 'maven'
2929

3030
- name: setup node
31-
uses: actions/setup-node@v4
31+
uses: actions/setup-node@v6
3232
with:
3333
node-version: 20.x
3434
cache: 'npm'
@@ -37,7 +37,7 @@ jobs:
3737

3838
- name: Run java tests
3939
working-directory: ./rascal-lsp
40-
run: mvn -B '-Drascal.compile.skip' '-Drascal.tutor.skip' test -DargLine="-Xmx4G"
40+
run: mvn -B '-Drascal.compile.skip' '-Drascal.tutor.skip' test -DargLine="-Xmx8G"
4141

4242
- name: VS Code tests
4343
working-directory: ./rascal-vscode-extension
@@ -49,23 +49,23 @@ jobs:
4949
ui-test:
5050
strategy:
5151
matrix:
52-
os: [buildjet-4vcpu-ubuntu-2204, windows-latest, macos-latest]
52+
os: [ubicloud-standard-4, windows-latest, macos-latest]
5353
fail-fast: true
5454
env:
5555
CODE_VERSION: "1.90.2"
5656
runs-on: ${{ matrix.os }}
5757
steps:
58-
- uses: actions/checkout@v4
58+
- uses: actions/checkout@v6
5959
- name: Assure different pom cache hit
6060
run: echo " " >> rascal-lsp/pom.xml
61-
- uses: actions/setup-java@v4
61+
- uses: actions/setup-java@v5
6262
with:
6363
java-version: 11
6464
distribution: 'temurin'
6565
cache: 'maven'
6666

6767
- name: setup node
68-
uses: actions/setup-node@v4
68+
uses: actions/setup-node@v6
6969
with:
7070
node-version: 20.x
7171
cache: 'npm'
@@ -84,39 +84,44 @@ jobs:
8484
8585
- name: Cache vscode downloads
8686
id: cache-vscode
87-
uses: actions/cache@v4
87+
uses: actions/cache@v5
8888
with:
8989
path: ./rascal-vscode-extension/uitests
9090
key: "vscode-${{matrix.os}}"
9191

9292
- name: "UI test (windows)"
93-
if: matrix.os == 'windows-latest'
93+
if: contains(matrix.os, 'windows')
9494
working-directory: ./rascal-vscode-extension
9595
env:
9696
DELAY_FACTOR: 10
97+
RASCAL_LSP_DEV_DEPLOY: true
9798
_JAVA_OPTIONS: '-Xmx5G'
9899
run: npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests
99100

100101
- name: "UI test (mac)"
101102
shell: bash
102-
if: matrix.os == 'macos-latest'
103+
if: contains(matrix.os, 'macos')
103104
working-directory: ./rascal-vscode-extension
104105
env:
105106
DELAY_FACTOR: 15
107+
RASCAL_LSP_DEV_DEPLOY: true
106108
_JAVA_OPTIONS: '-Xmx5G'
107109
run: npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests
108110

109111
- name: "UI test (ubuntu)"
110112
shell: bash
111-
if: matrix.os == 'buildjet-4vcpu-ubuntu-2204'
113+
if: contains(matrix.os, 'ubuntu') || startsWith(matrix.os, 'ubicloud-standard')
112114
working-directory: ./rascal-vscode-extension
113115
env:
114116
DELAY_FACTOR: 8
117+
RASCAL_LSP_DEV_DEPLOY: true
115118
_JAVA_OPTIONS: '-Xmx5G' # we have 16gb of memory, make sure LSP, REPL & DSL-LSP can start
116-
run: xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests
119+
run: |
120+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 # workaround for issue with Ubuntu 24.04 https://github.com/redhat-developer/vscode-extension-tester/blob/main/KNOWN_ISSUES.md#openresources-not-working-with-apparmor-2404
121+
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests
117122
118123
- name: Upload Screenshots
119-
uses: actions/upload-artifact@v4
124+
uses: actions/upload-artifact@v7
120125
if: failure()
121126
with:
122127
name: screenshots-${{ matrix.os }}
@@ -132,17 +137,22 @@ jobs:
132137

133138
build:
134139
needs: [ui-test, normal-tests]
135-
runs-on: buildjet-2vcpu-ubuntu-2204
140+
environment: ${{ startsWith(github.ref, 'refs/tags/v') && 'deployments' || '' }}
141+
permissions:
142+
id-token: write # only used for npm publishing
143+
actions: read # we need to copy this sadly
144+
contents: write
145+
runs-on: ${{ startsWith(github.ref, 'refs/tags/v') && 'ubuntu-latest' || 'ubicloud-standard-2' }}
136146
steps:
137-
- uses: actions/checkout@v4
138-
- uses: actions/setup-java@v4
147+
- uses: actions/checkout@v6
148+
- uses: actions/setup-java@v5
139149
with:
140150
java-version: 11
141151
distribution: 'temurin'
142152
cache: 'maven'
143153

144154
- name: setup node
145-
uses: actions/setup-node@v4
155+
uses: actions/setup-node@v6
146156
with:
147157
node-version: 20.x
148158
cache: 'npm'
@@ -178,14 +188,15 @@ jobs:
178188
npx vsce package
179189
180190
- name: upload final vsix
181-
uses: actions/upload-artifact@v4
191+
uses: actions/upload-artifact@v7
182192
with:
183193
path: rascal-vscode-extension/*.vsix
184194
retention-days: 20
195+
archive: false
185196

186197
- name: Publish release to Open VSX Registry
187198
if: startsWith(github.ref, 'refs/tags/v')
188-
uses: HaaLeo/publish-vscode-extension@v1
199+
uses: HaaLeo/publish-vscode-extension@v2
189200
continue-on-error: true
190201
id: publishToOpenVSX
191202
with:
@@ -195,15 +206,15 @@ jobs:
195206

196207
- name: Publish release to Visual Studio Marketplace
197208
if: startsWith(github.ref, 'refs/tags/v')
198-
uses: HaaLeo/publish-vscode-extension@v1
209+
uses: HaaLeo/publish-vscode-extension@v2
199210
with:
200211
packagePath: ./rascal-vscode-extension
201212
pat: ${{ secrets.AZURE_USETHESOURCE_PAT }}
202213
registryUrl: https://marketplace.visualstudio.com
203214
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }} # copy exact same vsix from the previous step
204215

205216
- name: Prepare Draft Release
206-
uses: softprops/action-gh-release@v1
217+
uses: softprops/action-gh-release@v2
207218
continue-on-error: true
208219
if: startsWith(github.ref, 'refs/tags/v')
209220
with:
@@ -229,6 +240,6 @@ jobs:
229240
- name: publish to NPM
230241
if: startsWith(github.ref, 'refs/tags/v')
231242
working-directory: rascal-vscode-extension
232-
env:
233-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
234-
run: npm publish --access=public
243+
run: |
244+
npm install -g npm@11.x # we need to use a newer version of npm due to oidc support
245+
npm publish --provenance --access=public

.github/workflows/lint.yaml

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313
branches:
1414
- '**'
1515

16+
env:
17+
MAVEN_OPTS: '-Xmx4G -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Drascal.compile.skip -Drascal.tutor.skip -Drascal.package.skip'
1618

1719
permissions:
1820
checks: write
@@ -25,35 +27,36 @@ jobs:
2527
name: SonarCloud
2628
runs-on: ubuntu-latest
2729
steps:
28-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v6
2931
with:
3032
fetch-depth: 0 # sonar needs full checkout for better blame information
31-
- uses: actions/setup-java@v4
33+
- uses: actions/setup-java@v5
3234
with:
3335
java-version: 17
3436
distribution: 'temurin'
3537
cache: 'maven'
3638
- name: Cache SonarCloud packages
37-
uses: actions/cache@v4
39+
uses: actions/cache@v5
3840
with:
3941
path: ~/.sonar/cache
4042
key: ${{ runner.os }}-sonar
4143
restore-keys: ${{ runner.os }}-sonar
42-
- name: Build and analyze java
44+
- name: Build, test and analyze java (also collect coverage data)
4345
env:
4446
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
4547
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
46-
run: mvn -f ./rascal-lsp/pom.xml -Pcoverage -B -Drascal.compile.skip -Drascal.tutor.skip verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=usethesource_rascal-language-servers
48+
working-directory: ./rascal-lsp
49+
run: mvn -B -Pcoverage verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=usethesource_rascal-language-servers
4750

4851
eslint:
4952
name: eslint
5053
runs-on: ubuntu-latest
5154
steps:
52-
- uses: actions/checkout@v4
55+
- uses: actions/checkout@v6
5356
- name: setup node
54-
uses: actions/setup-node@v4
57+
uses: actions/setup-node@v6
5558
with:
56-
node-version: 18
59+
node-version: 20
5760
cache: 'npm'
5861
cache-dependency-path: rascal-vscode-extension/package-lock.json
5962
registry-url: 'https://registry.npmjs.org'
@@ -69,22 +72,23 @@ jobs:
6972
eslint_dir: ./rascal-vscode-extension
7073
eslint_args: "src"
7174
eslint_extensions: ts
75+
continue_on_error: false
7276

7377
checkstyle:
7478
name: checkstyle
7579
runs-on: ubuntu-latest
7680
steps:
77-
- uses: actions/checkout@v4
81+
- uses: actions/checkout@v6
7882
with:
7983
ref: ${{ github.event.pull_request.head.sha }} # run it on the PR, not on the merged commit, for better line numbers
8084

81-
- uses: actions/setup-java@v4
85+
- uses: actions/setup-java@v5
8286
with:
8387
java-version: 17
8488
distribution: 'temurin'
8589
cache: 'maven'
8690
- name: Run checkstyle and print errors
87-
run: mvn -B checkstyle:checkstyle checkstyle:check
91+
run: mvn -B checkstyle:checkstyle checkstyle:check
8892
working-directory: ./rascal-lsp
8993
- name: Report build results
9094
uses: gmazzo/publish-report-annotations@v1 # target latest major
@@ -120,27 +124,46 @@ jobs:
120124

121125
steps:
122126
- name: Checkout repository
123-
uses: actions/checkout@v4
127+
uses: actions/checkout@v6
124128

125129
- if: ${{ matrix.language == 'java' }}
126-
uses: actions/setup-java@v4
130+
uses: actions/setup-java@v5
127131
with:
128132
java-version: 17
129133
distribution: 'temurin'
130134
cache: 'maven'
131135

132136
- name: Initialize CodeQL
133-
uses: github/codeql-action/init@v3
137+
uses: github/codeql-action/init@v4
134138
with:
135139
languages: ${{ matrix.language }}
136140
build-mode: ${{ matrix.build-mode }}
137141

138142
- if: ${{ matrix.language == 'java' }}
139143
name: Build java
140-
run: mvn -B compile -Drascal.compile.skip -Drascal.tutor.skip -DskipTests
144+
run: mvn -B compile
141145
working-directory: rascal-lsp/
142146

143147
- name: Perform CodeQL Analysis
144-
uses: github/codeql-action/analyze@v3
148+
uses: github/codeql-action/analyze@v4
149+
with:
150+
category: "/language:${{matrix.language}}"
151+
152+
153+
checker-framework:
154+
name: checker-framework
155+
runs-on: ubuntu-latest
156+
steps:
157+
- uses: actions/checkout@v6
158+
159+
- name: Assure different pom cache hit
160+
run: echo " " >> rascal-lsp/pom.xml
161+
162+
- uses: actions/setup-java@v5
145163
with:
146-
category: "/language:${{matrix.language}}"
164+
java-version: 11
165+
distribution: 'temurin'
166+
cache: 'maven'
167+
- name: Run checkstyle and print errors
168+
run: mvn -Pchecker-framework clean compile
169+
working-directory: ./rascal-lsp

.github/workflows/rascal-lsp-release.yaml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ on:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11+
environment: deployments
1112
defaults:
1213
run:
1314
working-directory: ./rascal-lsp
1415

1516
steps:
16-
- uses: actions/checkout@v4
17-
- uses: actions/setup-java@v4
17+
- uses: actions/checkout@v6
18+
- uses: actions/setup-java@v5
1819
with:
1920
java-version: 11
2021
distribution: 'temurin'
@@ -34,12 +35,3 @@ jobs:
3435
ssh-username: ${{ secrets.RELEASE_SSH_USERNAME }}
3536
ssh-private-key: ${{ secrets.RELEASE_SSH_PRIVATE_KEY }}
3637
working-directory: ./rascal-lsp
37-
38-
- name: Report Failure
39-
if: failure()
40-
uses: act10ns/slack@v2
41-
with:
42-
status: ${{ job.status }}
43-
steps: ${{ toJson(steps) }}
44-
env:
45-
SLACK_WEBHOOK_URL: ${{ secrets.RASCAL_SLACK_WEBHOOK }}

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.DS_Store
22
rascal-vscode-extension/dist/rascal-lsp-*.jar
3-
rascal-vscode-extension/rascalmpl-0.0.1.vsix
3+
rascal-vscode-extension/*.vsix
44
rascal-vscode-extension/.vscode-test/
5-
rascal-lsp/bin
5+
rascal-lsp/bin
6+
*.log

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"files.exclude": {
3+
"rascal-lsp": true,
4+
"rascal-vscode-extension": true
5+
}
6+
}

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.github/ @DavyLandman

0 commit comments

Comments
 (0)