Skip to content

Commit a6efb46

Browse files
committed
Merge branch 'topic/lsp_os' into 'master'
Avoid `OS` environment, because `libgpr2` introduced Closes #1628 See merge request eng/ide/ada_language_server!1979
2 parents 16592e6 + 23d10cd commit a6efb46

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ PROCESSORS ?= 0
1414
ifeq ($(OS),Windows_NT)
1515
PYTHON=python.exe
1616
EXE=.exe
17+
LSP_OS=$(OS)
1718
else
1819
UNAME_S := $(shell uname -s)
1920
ifeq ($(UNAME_S),Linux)
20-
OS=unix
21+
LSP_OS=unix
2122
else ifeq ($(UNAME_S),Darwin)
22-
OS=osx
23+
LSP_OS=osx
2324
endif
2425
PYTHON=python3
2526
EXE=
@@ -77,7 +78,7 @@ endif
7778
VSCE=npx vsce
7879

7980
LIBRARY_FLAGS=-XBUILD_MODE=$(BUILD_MODE) \
80-
-XOS=$(OS) \
81+
-XLSP_OS=$(LSP_OS) \
8182
-XLIBRARY_TYPE=$(LIBRARY_TYPE) \
8283
-XXMLADA_BUILD=$(LIBRARY_TYPE) \
8384
-XGPR_BUILD=$(LIBRARY_TYPE)

gnat/lsp_server.gpr

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ project LSP_Server is
2626
Library_Type : Library_Kind := external("ALS_LIBRARY_TYPE",
2727
external("LIBRARY_TYPE", "relocatable"));
2828

29-
type OS_KIND is ("Windows_NT", "unix", "osx");
30-
OS : OS_KIND := external("OS", "unix");
29+
OS : LSP_Common.OS_API_KIND := LSP_Common.OS_API;
3130

3231
for Source_Dirs use
3332
("../source/server",

subprojects/als.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ tags = ["lsp", "vscode"]
1313
ADA_PROJECT_PATH.set= "${CRATE_ROOT}/subprojects/stubs"
1414

1515
[gpr-set-externals."case(os)".linux]
16-
OS = "unix"
16+
LSP_OS = "unix"
1717
[gpr-set-externals."case(os)".macos]
18-
OS = "osx"
18+
LSP_OS = "osx"
1919
[gpr-set-externals."case(os)".windows]
20-
OS = "Windows_NT"
20+
LSP_OS = "Windows_NT"
2121

2222
[[depends-on]]
2323
gnatcoll = "^24.0.0"

subprojects/spawn.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ tags = ["process", "launch", "pipe"]
1414
disabled = true
1515

1616
[gpr-externals]
17-
OS = ["unix", "osx", "Windows_NT"]
17+
SPAWN_OS = ["unix", "osx", "Windows_NT"]
1818

1919
[gpr-set-externals.'case(os)']
20-
linux = { OS = "unix" } # Compact table syntax is convenient in this case
21-
windows = { OS = "Windows_NT" } # to see all enumeration values, one per row.
22-
macos = { OS = "osx" }
20+
linux = { SPAWN_OS = "unix" } # Compact table syntax is convenient in this case
21+
windows = { SPAWN_OS = "Windows_NT" } # to see all enumeration values, one per row.
22+
macos = { SPAWN_OS = "osx" }

0 commit comments

Comments
 (0)