Skip to content

Commit d5ee2f1

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents 2359a87 + b2ebac8 commit d5ee2f1

25 files changed

+92
-579
lines changed

.github/workflows/build-binaries.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,22 @@
55
set -x -e
66
DEBUG=$1 # Value is '' or 'debug'
77
RUNNER_OS=$2 # ${{ runner.os }} is Linux, Windiws, maxOS
8-
TAG=$3 # For master it's 23.0.999, while for tag it's the tag itself
8+
TAG=$3 # For master it's 24.0.999, while for tag it's the tag itself
99
NO_REBASE=$4 # Specify this to skip the rebase over the edge branch. Used for local debugging.
1010

1111
prefix=/tmp/ADALIB_DIR
1212

13+
export CPATH=/usr/local/include
14+
export LIBRARY_PATH=/usr/local/lib
15+
export DYLD_LIBRARY_PATH=/usr/local/lib
16+
export PATH=`ls -d $PWD/cached_gnat/*/bin |tr '\n' ':'`$PATH
17+
export ADAFLAGS=-g1
18+
1319
if [ $RUNNER_OS = Windows ]; then
1420
prefix=/opt/ADALIB_DIR
15-
mount `cygpath -w $RUNNER_TEMP|cut -d: -f1`:/opt /opt
21+
export CPATH=`cygpath -w /c/msys64/mingw64/include`
22+
export LIBRARY_PATH=`cygpath -w /c/msys64/mingw64/lib`
23+
mount D:/opt /opt
1624
fi
1725

1826
export GPR_PROJECT_PATH=$prefix/share/gpr:\
@@ -22,11 +30,6 @@ $PWD/subprojects/lal-refactor/gnat:\
2230
$PWD/subprojects/libadalang-tools/src:\
2331
$PWD/subprojects/spawn/gnat:\
2432
$PWD/subprojects/stubs
25-
export CPATH=/usr/local/include:/mingw64/include
26-
export LIBRARY_PATH=/usr/local/lib:/mingw64/lib
27-
export DYLD_LIBRARY_PATH=/usr/local/lib
28-
export PATH=`ls -d $PWD/cached_gnat/*/bin |tr '\n' ':'`$PATH
29-
export ADAFLAGS=-g1
3033
echo PATH=$PATH
3134

3235
BRANCH=master
@@ -57,6 +60,7 @@ FILE=libadalang-$RUNNER_OS-$BRANCH${DEBUG:+-dbg}-static.tar.gz
5760
# and we don't delete it after use.
5861
if [ ! -f "$FILE" ]; then
5962
aws s3 cp s3://adacore-gha-tray-eu-west-1/libadalang/$FILE . --sse=AES256
63+
umask 0 # To avoid permission errors on MSYS2
6064
tar xzf $FILE -C $prefix
6165
rm -f -v $FILE
6266
else

.github/workflows/build-binaries.yml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 2*.*.*
77
name: Build binaries
88
env:
9-
DEFAULT_TAG: 23.0.999
9+
DEFAULT_TAG: 24.0.999
1010
AWS_DEFAULT_REGION: eu-west-1
1111
jobs:
1212
build:
@@ -18,10 +18,10 @@ jobs:
1818
os: [macos-11, ubuntu-20.04, windows-latest]
1919
runs-on: ${{ matrix.os }}
2020
steps:
21-
- name: Setup Python 3.8
21+
- name: Setup Python
2222
uses: actions/setup-python@v4
2323
with:
24-
python-version: '3.8'
24+
python-version: '3.10'
2525
- name: Initialize TAG and git autocrlf
2626
shell: bash
2727
run: |
@@ -31,15 +31,19 @@ jobs:
3131
else
3232
echo "TAG=$DEFAULT_TAG" >> $GITHUB_ENV
3333
fi
34+
- name: Force Alire use preinstalled MSYS2
35+
shell: bash
36+
if: ${{ runner.os == 'Windows' }}
37+
run: |
38+
mkdir -p ~/.config/alire
39+
echo '[msys2]' >> ~/.config/alire/config.toml
40+
echo 'install_dir = "C:\\msys64"' >> ~/.config/alire/config.toml
3441
- name: Install iconv and gmp (Windows only)
42+
run: pacman --noconfirm -S mingw64/mingw-w64-x86_64-libiconv mingw64/mingw-w64-x86_64-gmp
3543
if: ${{ runner.os == 'Windows' }}
36-
uses: msys2/setup-msys2@v2
37-
with:
38-
path-type: inherit
39-
update: true
40-
install: >-
41-
mingw64/mingw-w64-x86_64-libiconv
42-
mingw64/mingw-w64-x86_64-gmp
44+
shell: c:\msys64\usr\bin\bash.exe -l -e -o pipefail {0}
45+
env:
46+
MSYSTEM: MINGW64
4347
- name: Get als
4448
uses: actions/checkout@v3
4549
with:
@@ -79,29 +83,22 @@ jobs:
7983
- uses: actions/cache@v3
8084
with:
8185
path: ./cached_gnat
82-
key: ${{ runner.os }}-alire-2022
83-
restore-keys: ${{ runner.os }}-alire-2022
86+
key: ${{ runner.os }}-alire-2023
87+
restore-keys: ${{ runner.os }}-alire-2023
8488
- name: Get GNAT toolchain with alire
8589
uses: alire-project/setup-alire@v2
8690
with:
87-
toolchain: gnat_native^12 gprbuild^22
91+
toolchain: gnat_native^13 gprbuild^22
8892
toolchain_dir: ./cached_gnat
89-
- name: Build (Windows)
90-
if: ${{ runner.os == 'Windows' }}
91-
shell: msys2 {0}
93+
- name: Build
94+
shell: bash
9295
env:
9396
AWS_ACCESS_KEY_ID: ${{secrets.GHA_CACHE_ACCESS_KEY_ID}}
9497
AWS_SECRET_ACCESS_KEY: ${{secrets.GHA_CACHE_SECRET}}
9598
run: |
9699
# This is to avoid locking .sh on win that prevents its updating
97100
cp .github/workflows/build-binaries.sh .github/workflows/build-binaries.sh_
98101
.github/workflows/build-binaries.sh_ "${{ matrix.debug }}" ${{ runner.os }} ${{ env.TAG }}
99-
- name: Build (non-Windows)
100-
env:
101-
AWS_ACCESS_KEY_ID: ${{secrets.GHA_CACHE_ACCESS_KEY_ID}}
102-
AWS_SECRET_ACCESS_KEY: ${{secrets.GHA_CACHE_SECRET}}
103-
if: ${{ runner.os != 'Windows' }}
104-
run: .github/workflows/build-binaries.sh "${{ matrix.debug }}" ${{ runner.os }} ${{ env.TAG }}
105102
- name: Archive ALS binary
106103
if: ${{ github.event_name == 'push' }}
107104
uses: actions/upload-artifact@v3

.github/workflows/pack-binaries.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -x -e
33
DEBUG=$1 # Value is '' or 'debug'
44
VSCE_TOKEN=$2
55
OVSX_TOKEN=$3
6-
TAG=$4 # For master it's 23.0.999, while for tag it's the tag itself
6+
TAG=$4 # For master it's 24.0.999, while for tag it's the tag itself
77

88
function make_change_log()
99
{

.gitlab-ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
stages:
22
- build_and_test
3+
- check
34
- run_downstream_ci
45

6+
issue-check:
7+
services:
8+
- image:e3
9+
stage: check
10+
needs: [] # Do not wait for the other stages to execute
11+
interruptible: true # Cancel job if the branch is pushed
12+
variables: # do not checkout the git repository, not needed
13+
GIT_STRATEGY: none
14+
rules: # Launch only on merge requests
15+
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
16+
script:
17+
- require_issue # launch the verification
18+
519
.basic-setup:
620
# Use generic_anod_ci here.
721
- generic_anod_ci

Makefile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export ALS=$(ROOTDIR)/.obj/server/ada_language_server$(EXE)
3030

3131
# Tester files
3232
TESTER=$(ROOTDIR)/.obj/tester/tester-run$(EXE)
33-
CODEC_TEST=.obj/codec_test/codec_test$(EXE)
3433

3534
# Env variable to set for update VS Code test references
3635
MOCHA_ALS_UPDATE=
@@ -92,12 +91,12 @@ else
9291
endif
9392

9493
all: coverage-instrument
94+
$(GPRBUILD) -P gnat/lsp_3_17.gpr -p $(COVERAGE_BUILD_FLAGS) -c lsp-inputs.adb
9595
$(GPRBUILD) -P gnat/lsp_3_17.gpr -p $(COVERAGE_BUILD_FLAGS)
9696
$(GPRBUILD) -P gnat/tester.gpr -p $(BUILD_FLAGS)
9797
$(GPRBUILD) -d -ws -c -u -P gnat/lsp_server.gpr -p $(BUILD_FLAGS) s-memory.adb
9898
$(GPRBUILD) -P gnat/lsp_server.gpr -p $(COVERAGE_BUILD_FLAGS) \
9999
-XVERSION=$(VERSION) -XBUILD_DATE=$(BUILD_DATE)
100-
$(GPRBUILD) -P gnat/codec_test.gpr -p $(COVERAGE_BUILD_FLAGS)
101100
$(GPRBUILD) -P gnat/lsp_client.gpr -p $(COVERAGE_BUILD_FLAGS)
102101
ifdef NODE
103102
mkdir -p integration/vscode/ada/$(NODE_ARCH)/$(NODE_PLATFORM)
@@ -117,15 +116,12 @@ ifneq ($(COVERAGE),)
117116
rm -rf .obj/*/gnatcov-instr
118117
$(COVERAGE_INSTR) -XVERSION=$(VERSION) -XBUILD_DATE=$(BUILD_DATE) \
119118
-Pgnat/lsp_server.gpr --projects lsp_server --projects lsp_3_17
120-
$(COVERAGE_INSTR) -Pgnat/tester.gpr --projects lsp
121-
$(COVERAGE_INSTR) -Pgnat/codec_test.gpr --projects lsp
122119
endif
123120

124121
install:
125122
gprinstall -f -P gnat/lsp_server.gpr -p -r --mode=usage \
126123
--prefix=$(DESTDIR) $(LIBRARY_FLAGS)
127124
gprinstall -f -P gnat/tester.gpr -p --prefix=$(DESTDIR) $(LIBRARY_FLAGS)
128-
gprinstall -f -P gnat/codec_test.gpr -p --prefix=$(DESTDIR) $(LIBRARY_FLAGS)
129125
gprinstall -f -P gnat/lsp_client.gpr -p -r \
130126
--mode=dev \
131127
--prefix=$(DESTDIR) \
@@ -140,7 +136,6 @@ clean:
140136
-$(GPRCLEAN) -P gnat/lsp_3_17.gpr $(LIBRARY_FLAGS)
141137
-$(GPRCLEAN) -P gnat/lsp_server.gpr $(LIBRARY_FLAGS)
142138
-$(GPRCLEAN) -P gnat/tester.gpr $(LIBRARY_FLAGS)
143-
-$(GPRCLEAN) -P gnat/codec_test.gpr $(LIBRARY_FLAGS)
144139
-rm -rf integration/vscode/ada/$(NODE_ARCH)/$(NODE_PLATFORM)
145140

146141
vscode:
@@ -173,7 +168,6 @@ check: all
173168
(cd `dirname $$a ` ; $(TESTER) `basename $$a`) ;\
174169
done; \
175170
fi
176-
${CODEC_TEST} < testsuite/codecs/index.txt
177171

178172
deploy: check
179173
integration/$(USER)/deploy.sh $(NODE_PLATFORM)

gnat/codec_test.gpr

Lines changed: 0 additions & 32 deletions
This file was deleted.

gnat/lsp_3_17.gpr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ project LSP_3_17 is
106106

107107
package Compiler is
108108
for Default_Switches ("Ada") use Common_Ada_Switches & Ada_Switches;
109+
for Switches ("lsp-inputs.adb") use
110+
Common_Ada_Switches & Ada_Switches & ("-O0");
109111
for Local_Configuration_Pragmas use "gnat.adc";
110112
end Compiler;
111113

integration/vscode/ada/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration/vscode/ada/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ada",
33
"displayName": "Language Support for Ada",
44
"description": "A Language Server providing Ada and SPARK support in Visual Studio Code",
5-
"version": "23.0.999",
5+
"version": "24.0.999",
66
"publisher": "AdaCore",
77
"license": "GPL-3.0",
88
"engines": {

integration/vscode/ada/src/clients.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import * as vscode from 'vscode';
21
import { existsSync } from 'fs';
2+
import * as vscode from 'vscode';
33
import {
44
Disposable,
55
ExecuteCommandRequest,
66
LanguageClient,
77
LanguageClientOptions,
88
ServerOptions,
99
} from 'vscode-languageclient/node';
10+
import { mainLogChannel } from './extension';
1011
import GnatTaskProvider from './gnatTaskProvider';
1112
import GprTaskProvider from './gprTaskProvider';
12-
import { getEvaluatedCustomEnv, logErrorAndThrow } from './helpers';
13-
import { mainLogChannel } from './extension';
13+
import { logErrorAndThrow } from './helpers';
1414

1515
export class ContextClients {
1616
public readonly gprClient: LanguageClient;
@@ -147,18 +147,6 @@ function createClient(
147147
// If the extension is launched in debug mode then the debug server options are used
148148
// Otherwise the run options are used
149149

150-
// Retrieve the user's custom environment variables if specified in their
151-
// settings/workspace: we'll then launch any child process with this custom
152-
// environment
153-
const custom_env = getEvaluatedCustomEnv();
154-
155-
if (custom_env) {
156-
for (const var_name in custom_env) {
157-
const var_value: string = custom_env[var_name];
158-
process.env[var_name] = var_value;
159-
}
160-
}
161-
162150
// Options to control the server
163151
const serverOptions: ServerOptions = {
164152
run: { command: serverExecPath, args: extra },

0 commit comments

Comments
 (0)