File tree Expand file tree Collapse file tree 5 files changed +135
-1
lines changed
ada_lsp/scenario_variables Expand file tree Collapse file tree 5 files changed +135
-1
lines changed Original file line number Diff line number Diff line change 1+ package Pkg is
2+ pragma Pure;
3+ end Pkg ;
Original file line number Diff line number Diff line change 1+ project Prj is
2+ Var := external("VAR");
3+ end Prj;
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "comment" : [
4+ " This test uses ada.scenarioVariables and checks that the project is loaded without diagnostics."
5+ ]
6+ },
7+ {
8+ "start" : {
9+ "cmd" : [" ${ALS}" ]
10+ }
11+ },
12+ {
13+ "send" : {
14+ "request" : {
15+ "jsonrpc" : " 2.0" ,
16+ "id" : 0 ,
17+ "method" : " initialize" ,
18+ "params" : {
19+ "rootUri" : " $URI{.}"
20+ }
21+ },
22+ "wait" : []
23+ }
24+ },
25+ {
26+ "send" : {
27+ "request" : {
28+ "jsonrpc" : " 2.0" ,
29+ "method" : " initialized" ,
30+ "params" : {}
31+ },
32+ "wait" : []
33+ }
34+ },
35+ {
36+ "send" : {
37+ "request" : {
38+ "jsonrpc" : " 2.0" ,
39+ "method" : " textDocument/didOpen" ,
40+ "params" : {
41+ "textDocument" : {
42+ "uri" : " $URI{pkg.ads}" ,
43+ "languageId" : " ada" ,
44+ "version" : 1 ,
45+ "text" : " package Pkg is\n pragma Pure;\n end Pkg;"
46+ }
47+ }
48+ },
49+ "wait" : [
50+ {
51+ "method" : " textDocument/publishDiagnostics" ,
52+ "params" : {
53+ "uri" : " $URI{pkg.ads}" ,
54+ "diagnostics" : [
55+ {
56+ "range" : {
57+ "start" : {
58+ "line" : 0 ,
59+ "character" : 0
60+ },
61+ "end" : {
62+ "line" : 0 ,
63+ "character" : 0
64+ }
65+ },
66+ "severity" : 1 ,
67+ "source" : " ada.project" ,
68+ "message" : " The project file has errors and could not be loaded." ,
69+ "relatedInformation" : [
70+ {
71+ "location" : {
72+ "uri" : " $URI{prj.gpr}" ,
73+ "range" : {
74+ "start" : {
75+ "line" : 1 ,
76+ "character" : 20
77+ },
78+ "end" : {
79+ "line" : 1 ,
80+ "character" : 20
81+ }
82+ }
83+ },
84+ "message" : " undefined external reference \" VAR\" "
85+ }
86+ ]
87+ }
88+ ]
89+ }
90+ }
91+ ]
92+ }
93+ },
94+ {
95+ "send" : {
96+ "request" : {
97+ "jsonrpc" : " 2.0" ,
98+ "method" : " workspace/didChangeConfiguration" ,
99+ "params" : {
100+ "settings" : {
101+ "ada" : {
102+ "scenarioVariables" : {
103+ "Var" : " value"
104+ }
105+ }
106+ }
107+ }
108+ },
109+ "wait" : [
110+ {
111+ "method" : " textDocument/publishDiagnostics" ,
112+ "params" : {
113+ "uri" : " $URI{pkg.ads}" ,
114+ "diagnostics" : []
115+ }
116+ }
117+ ]
118+ }
119+ },
120+ {
121+ "stop" : {
122+ "exit_code" : 0
123+ }
124+ }
125+ ]
Original file line number Diff line number Diff line change 1+ title : ' scenario_variables'
2+ control :
3+ - [XFAIL, "True", "bug in loading projects with scenario variables eng/ide/ada_language_server#1479"]
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ def __init__(
120120
121121 # Kill the server when we reach this time
122122 self .kill_me_at = time .time () + int (
123- RLIMIT_SECONDS * os .environ .get ("ALS_WAIT_FACTOR" , 1.0 )
123+ RLIMIT_SECONDS * float ( os .environ .get ("ALS_WAIT_FACTOR" , " 1.0" ) )
124124 )
125125
126126 # This contains either None or a timestamp. If a timestamp,
You can’t perform that action at this time.
0 commit comments