Skip to content

Commit cab693e

Browse files
committed
Merge branch 'topic/generics' into 'master'
Update tests after changes in GNATdoc See merge request eng/ide/ada_language_server!1237
2 parents 960c5b3 + 4aad380 commit cab693e

File tree

10 files changed

+38
-15
lines changed

10 files changed

+38
-15
lines changed

.gitlab-ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ variables:
44

55
stages:
66
- build_and_test
7+
- run_downstream_ci
78

89
.detect-branches:
910
# Version 2.
@@ -156,3 +157,23 @@ build_and_test:
156157
reports:
157158
junit: xunit_output.xml
158159
lsif: dump.lsif
160+
161+
.run_ci_common: &run_ci_common
162+
stage: run_downstream_ci
163+
rules:
164+
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
165+
when: manual
166+
trigger:
167+
strategy: depend
168+
inherit:
169+
variables: false
170+
variables:
171+
ACI_UPSTREAM_PROJECT_PATH: $CI_PROJECT_PATH
172+
ACI_UPSTREAM_REF_NAME: $CI_COMMIT_REF_NAME
173+
ACI_UPSTREAM_SOURCE_BRANCH: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
174+
ACI_UPSTREAM_TARGET_BRANCH: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
175+
176+
run_gs_ci:
177+
<<: *run_ci_common
178+
trigger:
179+
project: eng/ide/gnatstudio

source/ada/lsp-lal_utils.adb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -806,13 +806,14 @@ package body LSP.Lal_Utils is
806806
is
807807
pragma Unreferenced (Trace);
808808

809-
Options : constant
809+
Options : constant
810810
GNATdoc.Comments.Options.Extractor_Options :=
811811
(Style => Style,
812812
Pattern => <>,
813813
Fallback => True);
814-
Decl_Lines : VSS.String_Vectors.Virtual_String_Vector;
815-
Doc_Lines : VSS.String_Vectors.Virtual_String_Vector;
814+
Decl_Lines : VSS.String_Vectors.Virtual_String_Vector;
815+
Doc_Lines : VSS.String_Vectors.Virtual_String_Vector;
816+
816817
begin
817818
-- Extract documentation with GNATdoc when supported.
818819

@@ -827,7 +828,8 @@ package body LSP.Lal_Utils is
827828

828829
-- If GNATdoc failed to compute the declaration text, use the old engine
829830
if Decl_Text.Is_Empty
830-
or else not BD.P_Subp_Spec_Or_Null.Is_Null
831+
or else (BD.Kind not in Ada_Enum_Literal_Decl
832+
and not BD.P_Subp_Spec_Or_Null.Is_Null)
831833
then
832834
-- For subprograms additional information is added, use old code to
833835
-- obtain it yet.

testsuite/ada_lsp/T713-012.completion.generic_package/test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
"result": {
276276
"label": "Params of G",
277277
"kind": 15,
278-
"detail": "generic\n type Elt_Type(<>) is limited private;\n type Elt_Ptr is access all Elt_Type;\npackage G is\n type T(Length: Natural) is private;\n type T_Ptr is access all T;\nprivate\n type Elt_Array is array(Positive range <>) of Elt_Ptr;\n type T(Length: Natural) is\n\trecord\n\t Elts: Elt_Array(1..Length);\n\tend record;\nend G;",
278+
"detail": "generic\n type Elt_Type(<>) is limited private;\n type Elt_Ptr is access all Elt_Type;\npackage G",
279279
"documentation": "at g.ads (3:1)\n\nSource:\n\n@formal Elt_Type\n@formal Elt_Ptr",
280280
"sortText": "+0",
281281
"insertText": "${1:Elt_Type : type Elt_Type(<>) is limited private;}, ${2:Elt_Ptr : type Elt_Ptr is access all Elt_Type;})$0",
@@ -516,7 +516,7 @@
516516
"result": {
517517
"label": "Params of G",
518518
"kind": 15,
519-
"detail": "generic\n type Elt_Type(<>) is limited private;\n type Elt_Ptr is access all Elt_Type;\npackage G is\n type T(Length: Natural) is private;\n type T_Ptr is access all T;\nprivate\n type Elt_Array is array(Positive range <>) of Elt_Ptr;\n type T(Length: Natural) is\n\trecord\n\t Elts: Elt_Array(1..Length);\n\tend record;\nend G;",
519+
"detail": "generic\n type Elt_Type(<>) is limited private;\n type Elt_Ptr is access all Elt_Type;\npackage G",
520520
"documentation": "at g.ads (3:1)\n\nSource:\n\n@formal Elt_Type\n@formal Elt_Ptr",
521521
"sortText": "+0",
522522
"insertText": " Elt_Ptr => ${2:type Elt_Ptr is access all Elt_Type;})$0",

testsuite/ada_lsp/UA28-007.Did_Rename_Files_0/test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@
13181318
"contents": [
13191319
{
13201320
"language": "ada",
1321-
"value": "package Qux "
1321+
"value": "package Qux"
13221322
},
13231323
"at qux.ads (1:1)"
13241324
]
@@ -1468,7 +1468,7 @@
14681468
"contents": [
14691469
{
14701470
"language": "ada",
1471-
"value": "package Qux "
1471+
"value": "package Qux"
14721472
},
14731473
"at qux.ads (1:1)"
14741474
]

testsuite/ada_lsp/completion.invisible.runtime/test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
{
212212
"label": "Decimal (invisible)",
213213
"kind": 9,
214-
"detail": "package Ada.Decimal ",
214+
"detail": "package Ada.Decimal",
215215
"documentation": "at a-decima.ads (38:1)\n\nThe compiler makes a number of assumptions based on the following five\nconstants (e.g. there is an assumption that decimal values can always\nbe represented in 128-bit signed binary form), so code modifications are\nrequired to increase these constants.",
216216
"sortText": "~100&08Decimal",
217217
"filterText": "Decimal",

testsuite/ada_lsp/completion.invisible3/test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
{
156156
"label": "ABC14 (invisible)",
157157
"kind": 9,
158-
"detail": "generic\n ABC13 : Integer;\npackage ABC14 ",
158+
"detail": "generic\n ABC13 : Integer;\npackage ABC14",
159159
"documentation": "at pkg.ads (19:4)",
160160
"sortText": "~100&1ABC14",
161161
"insertText": "ABC14",

testsuite/ada_lsp/completion.invisible4/test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@
146146
{
147147
"label": "Child",
148148
"kind": 9,
149-
"detail": "package Pkg_1.Child ",
149+
"detail": "package Pkg_1.Child",
150150
"documentation": "at pkg_1-child.ads (3:1)",
151151
"sortText": "100&1Child",
152152
"additionalTextEdits": []
153153
},
154154
{
155155
"label": "Child2 (invisible)",
156156
"kind": 9,
157-
"detail": "package Pkg_1.Child2 ",
157+
"detail": "package Pkg_1.Child2",
158158
"documentation": "at pkg_1-child2.ads (1:1)",
159159
"sortText": "~100&2Child2",
160160
"insertText": "Child2",

testsuite/ada_lsp/completion.invisible5/test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
{
147147
"label": "Ada",
148148
"kind": 9,
149-
"detail": "package Ada ",
149+
"detail": "package Ada",
150150
"documentation": "<ANY>",
151151
"sortText": "100&1Ada",
152152
"additionalTextEdits": []

testsuite/ada_lsp/completion.snippet.formatting3/test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
"result": {
279279
"label": "Params of Foo_Bar",
280280
"kind": 15,
281-
"detail": "generic\n A : Integer;\n BBBBBB : Float;\n CCCC : String;\n with procedure Bar (X : Integer);\n package Foo_Bar is\n procedure Do_Nothing;\n\n procedure Do_Nothing is\n begin\n null;\n end Do_Nothing;\n end Foo_Bar;",
281+
"detail": "generic\n A : Integer;\n BBBBBB : Float;\n CCCC : String;\n with procedure Bar (X : Integer);\npackage Foo_Bar",
282282
"documentation": "at foo.adb (3:4)",
283283
"sortText": "+0",
284284
"insertText": "A => ${1:A : Integer;}, BBBBBB => ${2:BBBBBB : Float;}, CCCC => ${3:CCCC : String;}, Bar => ${4:with procedure Bar (X : Integer);})$0",

testsuite/ada_lsp/completion.subp_parameters/test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@
402402
{
403403
"label": "ASCII",
404404
"kind": 9,
405-
"detail": "package ASCII ",
405+
"detail": "package ASCII",
406406
"documentation": "<ANY>",
407407
"additionalTextEdits": []
408408
},

0 commit comments

Comments
 (0)