Skip to content

Commit f6f58ea

Browse files
Merge branch 'topic/bump' into 'master'
Bump edge to master Closes #1607 and #1624 See merge request eng/ide/ada_language_server!2001
2 parents 9b1d82f + eb2fef7 commit f6f58ea

File tree

22 files changed

+588
-243
lines changed

22 files changed

+588
-243
lines changed

Diff for: .gitlab-ci.plan

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
def build_(qualifier={}):
22
with defaults(qualifier=qualifier):
33
anod_build("als")
4-
anod_build("vscode-extension", qualifier={"mono-plat": True})
4+
anod_build("vscode-extension", qualifier={"mono-plat": True} | qualifier)
55

66

77
def test_als_(qualifier={}):

Diff for: .gitlab-ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ include:
7070
disk: 80
7171
windows: true
7272
rules:
73-
# Does not work on edge
74-
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_TARGET_BRANCH_NAME != 'edge'
75-
allow_failure: true
73+
# integration-testsuite cannot work with edge builds
74+
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_TARGET_BRANCH_NAME == 'edge'
75+
when: never
7676

7777
# Optional testing of GNAT Studio
7878
- component: $CI_SERVER_FQDN/eng/gitlab-templates/test@~latest

Diff for: integration/vscode/ada/test/general/codelens.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ suite('CodeLens', function () {
2323
const codelenses = await getCodeLenses('src', 'main1.adb');
2424
assert.deepEqual(simplifyCodelenses(codelenses), [
2525
{
26-
range: '9:0 -> 15:9',
26+
range: '9:0 -> 15:10',
2727
command: {
2828
title: '$(run) Run',
2929
command: 'ada.buildAndRunMain',
3030
arguments: ['src/main1.adb'],
3131
},
3232
},
3333
{
34-
range: '9:0 -> 15:9',
34+
range: '9:0 -> 15:10',
3535
command: {
3636
title: '$(debug-alt-small) Debug',
3737
command: 'ada.buildAndDebugMain',

Diff for: integration/vscode/ada/test/general/ws/src/highlighting/lsp-ada_handlers/lsp-ada_handlers.ads.sem.tokens

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ line 211: column 7 - 19: enumMember [declaration, static] : Add_P
104104
line 211: column 22 - 43: enumMember [declaration, static] : Change_Parameters_Type
105105
line 211: column 46 - 76: enumMember [declaration, static] : Change_Parameters_Default_Value
106106
line 212: column 7 - 18: enumMember [declaration, static] : Replace_Type
107-
line 215: column 9 - 42: type [declaration, static] : Advanced_Refactorings_Capabilities
107+
line 215: column 9 - 42: type [declaration] : Advanced_Refactorings_Capabilities
108108
line 216: column 13 - 33: enum [static] : Advanced_Refactorings
109109
line 216: column 39 - 45: enum [static, defaultLibrary] : Boolean
110110
line 219: column 9 - 40: struct [declaration] : Experimental_Client_Capabilities
111111
line 220: column 7 - 27: property [declaration] : Advanced_Refactorings
112-
line 220: column 31 - 64: type [static] : Advanced_Refactorings_Capabilities
112+
line 220: column 31 - 64: type : Advanced_Refactorings_Capabilities
113113
line 225: column 13 - 17: function [declaration] : Parse
114114
line 226: column 7 - 11: parameter [declaration, readonly] : Value
115115
line 227: column 14 - 45: struct : Experimental_Client_Capabilities

Diff for: integration/vscode/ada/test/general/ws/src/highlighting/types/types.ads.sem.tokens

+7-7
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,25 @@ line 30: column 10 - 17: type [declaration, static] : Page_
4343
line 31: column 10 - 18: type [declaration] : Line_Size
4444
line 34: column 13 - 21: type [declaration, static] : Small_Int
4545
line 34: column 28 - 34: type [static, defaultLibrary] : Integer
46-
line 35: column 13 - 22: type [declaration, static] : Column_Ptr
46+
line 35: column 13 - 22: type [declaration] : Column_Ptr
4747
line 35: column 28 - 36: type : Line_Size
4848
line 36: column 13 - 23: type [declaration] : Buffer_Size
4949
line 36: column 28 - 34: type [static, defaultLibrary] : Integer
5050
line 38: column 10 - 13: type [declaration, static] : Byte
5151
line 39: column 10 - 19: type [declaration, static] : Hash_Index
52-
line 42: column 10 - 15: type [declaration, static] : Vector
52+
line 42: column 10 - 15: type [declaration] : Vector
5353
line 42: column 30 - 36: type [static, defaultLibrary] : Integer
54-
line 43: column 10 - 15: type [declaration, static] : Matrix
54+
line 43: column 10 - 15: type [declaration] : Matrix
5555
line 44: column 15 - 21: type [static, defaultLibrary] : Integer
5656
line 44: column 34 - 40: type [static, defaultLibrary] : Integer
57-
line 45: column 10 - 19: type [declaration, static] : Bit_Vector
57+
line 45: column 10 - 19: type [declaration] : Bit_Vector
5858
line 47: column 13 - 19: type [static, defaultLibrary] : Integer
5959
line 48: column 14 - 20: enum [static, defaultLibrary] : Boolean
60-
line 49: column 10 - 14: type [declaration, static] : Roman
60+
line 49: column 10 - 14: type [declaration] : Roman
6161
line 49: column 30 - 37: type [static, defaultLibrary] : Positive
62-
line 50: column 10 - 14: type [declaration, static] : Table
62+
line 50: column 10 - 14: type [declaration] : Table
6363
line 50: column 40 - 46: type [static, defaultLibrary] : Integer
64-
line 51: column 10 - 17: type [declaration, static] : Schedule
64+
line 51: column 10 - 17: type [declaration] : Schedule
6565
line 51: column 28 - 30: enum [static] : Day
6666
line 51: column 36 - 42: enum [static, defaultLibrary] : Boolean
6767
line 52: column 10 - 13: type [declaration] : Line

Diff for: integration/vscode/ada/test/general/ws/src/main1.adb

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ with Foo;
77
-- Main --
88
----------
99

10-
procedure Main is
10+
procedure Main1 is
1111

1212
begin
1313

1414
null;
1515

16-
end Main;
16+
end Main1;

Diff for: scripts/build_als.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function build_langkit_raw() {
172172

173173
# Export the environment needed to use langkit into a file for later
174174
# usage
175-
python manage.py setenv >"$LANGKIT_SETENV"
175+
python manage.py printenv >"$LANGKIT_SETENV"
176176

177177
if [[ $NODE_ARCH_PLATFORM == "x64/win32" ]]; then
178178
# Fix setenv.sh to be bash script for MSYS2 by replacing

Diff for: source/ada/lsp-ada_completions.adb

+11-4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ with VSS.Strings.Conversions;
2525
with VSS.Strings.Cursors.Iterators.Characters;
2626
with VSS.Strings.Cursors.Markers;
2727
with VSS.Strings.Hash;
28+
with VSS.Transformers.Casing;
2829

2930
with LSP.Ada_Configurations;
3031
with LSP.Ada_Contexts;
@@ -198,7 +199,7 @@ package body LSP.Ada_Completions is
198199

199200
Encoding : Encoding_Maps.Map;
200201
-- Map of Snippet fake name to snippet:
201-
-- {"Foo_1" : "$1", "Foo_2" : "${2: Integer}"}
202+
-- {"foobar_1" : "$1", "foobar_2" : "${2: Integer}"}
202203
-- $0 will not be replaced
203204

204205
procedure Set_PP_Switches
@@ -212,7 +213,7 @@ package body LSP.Ada_Completions is
212213
-- Recreate the snippet via the pseudo code
213214

214215
function Snippet_Placeholder (S : Virtual_String) return Virtual_String
215-
is ("FooBar_" & S);
216+
is ("foobar_" & S);
216217
-- Generate a fake entity for a snippet (S is the index of the snippet)
217218
-- The length of the placeholder will affect where the strings is cut
218219
-- to avoid exceeding line length => 8/9 characters seems to be
@@ -369,7 +370,11 @@ package body LSP.Ada_Completions is
369370
Dummy := Pos.Backward;
370371
Append (Res, U.Slice (Iterator, Pos));
371372
end;
372-
Append (Res, Encoding (Match.Captured));
373+
Append
374+
(Res,
375+
Encoding
376+
(VSS.Transformers.Casing.To_Lowercase.Transform
377+
(Match.Captured)));
373378
Iterator.Set_At (Match.Last_Marker);
374379
Dummy := Iterator.Forward;
375380
end;
@@ -393,7 +398,9 @@ package body LSP.Ada_Completions is
393398
is
394399
Placeholder_Regexp : constant VSS.Regular_Expressions.
395400
Regular_Expression := VSS.Regular_Expressions.To_Regular_Expression
396-
("FooBar_[0-9]+");
401+
("FooBar_[0-9]+",
402+
Options => [VSS.Regular_Expressions.Case_Insensitive => True,
403+
others => False]);
397404
begin
398405
return Placeholder_Regexp.Match (S, Start);
399406
end Find_Next_Placeholder;

Diff for: testsuite/ada_lsp/Did_Rename_Files.context_corruption/test.json

+20-54
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
{
33
"comment": [
44
"Test the context after a DidRenameFiles notification. ",
5-
"The references requests should work before and after."
5+
"The references requests should work before and after.",
6+
"If the unit name does not match teh source name (which is ",
7+
"usually the case after renaming sources outside of the ALS), ",
8+
"references are expected to be unaccurate: these units are now ",
9+
"ignored by GPR2. The user should make sure unit and source names ",
10+
"always match, and reload the project once it's the case."
611
]
712
},
813
{
914
"start": {
10-
"cmd": [
11-
"${ALS}"
12-
]
15+
"cmd": ["${ALS}"]
1316
}
1417
},
1518
{
@@ -26,9 +29,7 @@
2629
"applyEdit": true,
2730
"workspaceEdit": {
2831
"documentChanges": true,
29-
"resourceOperations": [
30-
"rename"
31-
]
32+
"resourceOperations": ["rename"]
3233
},
3334
"fileOperations": {
3435
"didRename": true
@@ -40,15 +41,9 @@
4041
"dynamicRegistration": true,
4142
"completionItem": {
4243
"snippetSupport": false,
43-
"documentationFormat": [
44-
"plaintext",
45-
"markdown"
46-
],
44+
"documentationFormat": ["plaintext", "markdown"],
4745
"resolveSupport": {
48-
"properties": [
49-
"detail",
50-
"documentation"
51-
]
46+
"properties": ["detail", "documentation"]
5247
}
5348
}
5449
},
@@ -75,9 +70,7 @@
7570
}
7671
},
7772
"experimental": {
78-
"advanced_refactorings": [
79-
"add_parameter"
80-
]
73+
"advanced_refactorings": ["add_parameter"]
8174
}
8275
}
8376
}
@@ -89,12 +82,7 @@
8982
"capabilities": {
9083
"textDocumentSync": 2,
9184
"completionProvider": {
92-
"triggerCharacters": [
93-
".",
94-
",",
95-
"'",
96-
"("
97-
],
85+
"triggerCharacters": [".", ",", "'", "("],
9886
"resolveProvider": true
9987
},
10088
"renameProvider": {
@@ -207,9 +195,7 @@
207195
"character": 14
208196
}
209197
},
210-
"alsKind": [
211-
"reference"
212-
]
198+
"alsKind": ["reference"]
213199
},
214200
{
215201
"uri": "$URI{main.adb}",
@@ -223,9 +209,7 @@
223209
"character": 13
224210
}
225211
},
226-
"alsKind": [
227-
"call"
228-
]
212+
"alsKind": ["call"]
229213
}
230214
]
231215
}
@@ -641,11 +625,11 @@
641625
}
642626
},
643627
{
644-
"shell": [
645-
"mv",
646-
"${DIR}${DIR_SEP}foo-bar1.ads",
647-
"${DIR}${DIR_SEP}foo-bar2.ads"
648-
]
628+
"shell": [
629+
"mv",
630+
"${DIR}${DIR_SEP}foo-bar1.ads",
631+
"${DIR}${DIR_SEP}foo-bar2.ads"
632+
]
649633
},
650634
{
651635
"send": {
@@ -699,25 +683,7 @@
699683
"character": 14
700684
}
701685
},
702-
"alsKind": [
703-
"reference"
704-
]
705-
},
706-
{
707-
"uri": "$URI{main.adb}",
708-
"range": {
709-
"start": {
710-
"line": 4,
711-
"character": 12
712-
},
713-
"end": {
714-
"line": 4,
715-
"character": 13
716-
}
717-
},
718-
"alsKind": [
719-
"call"
720-
]
686+
"alsKind": ["reference"]
721687
}
722688
]
723689
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
project Default is
2+
package Pretty_Printer is
3+
for Switches ("Ada") use ("--name-lower-case");
4+
end Pretty_Printer;
5+
end Default;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
procedure Foo is
2+
3+
procedure Bar (A, B, C, D, E, F, G, H, I, J : Integer);
4+
5+
procedure Bar (AAAAAAAA, BB, CCCCCCCC, DDDDDDDDDDDD, E : Integer);
6+
7+
procedure Bar (A, B : Integer);
8+
9+
procedure Bar (A, B, C, D, E, F, G, H, I, J : Integer) is
10+
begin
11+
null;
12+
end Bar;
13+
14+
procedure Bar (AAAAAAAA, BB, CCCCCCCC, DDDDDDDDDDDD, E : Integer) is
15+
begin
16+
null;
17+
end Bar;
18+
19+
procedure Bar (A, B : Integer) is
20+
begin
21+
null;
22+
end Bar;
23+
begin
24+
Bar (
25+
end Foo;

0 commit comments

Comments
 (0)