-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/fix_missing' into 'edge'
Handle exceptions in `Project_Tree.Update_Sources` See merge request eng/ide/ada_language_server!1205
- Loading branch information
Showing
5 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
procedure Main is | ||
begin | ||
null; | ||
end Main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
project Prj1 is | ||
for Source_Files use ("missing.ads", "main.adb"); | ||
end Prj1; | ||
|
113 changes: 113 additions & 0 deletions
113
testsuite/ada_lsp/project_config.missing_file/test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
[ | ||
{ | ||
"comment":[ | ||
"This test check language server is able to report errors", | ||
"when loading a project with missing files." | ||
] | ||
}, { | ||
"start": { | ||
"cmd": ["${ALS}"] | ||
} | ||
}, { | ||
"send": { | ||
"request": {"jsonrpc":"2.0","id":0,"method":"initialize","params":{ | ||
"processId":1, | ||
"rootUri":"$URI{.}", | ||
"capabilities":{}} | ||
}, | ||
"wait":[{ | ||
"id": 0, | ||
"result":{ | ||
"capabilities":{ | ||
"textDocumentSync": 2, | ||
"definitionProvider":true | ||
} | ||
} | ||
}] | ||
} | ||
}, { | ||
"send": { | ||
"request": { | ||
"jsonrpc":"2.0", | ||
"method":"workspace/didChangeConfiguration", | ||
"params":{ | ||
"settings":{ | ||
"ada":{ | ||
"projectFile": "prj1.gpr" | ||
} | ||
} | ||
} | ||
}, | ||
"wait":[ | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "window/showMessage", | ||
"params": { | ||
"type": 1, | ||
"message": "<ANY>" | ||
} | ||
} | ||
] | ||
} | ||
}, { | ||
"send": { | ||
"request": { | ||
"jsonrpc":"2.0", | ||
"method":"textDocument/didOpen", | ||
"params":{ | ||
"textDocument": { | ||
"uri": "$URI{main.adb}", | ||
"languageId": "ada", | ||
"version": 1, | ||
"text": "procedure Main is\nbegin\n null;\nend Main;" | ||
} | ||
} | ||
}, | ||
"wait":[ | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "textDocument/publishDiagnostics", | ||
"params": { | ||
"uri":"$URI{main.adb}", | ||
"diagnostics":[ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 0, | ||
"character": 0 | ||
}, | ||
"end": { | ||
"line":0, | ||
"character":0 | ||
} | ||
}, | ||
"severity": 1, | ||
"source": "project", | ||
"message": "Project file has error and can't be loaded." | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, { | ||
"send": { | ||
"request": { | ||
"jsonrpc":"2.0", | ||
"id": "shutdown", | ||
"method":"shutdown", | ||
"params":null | ||
}, | ||
"wait":[{ "id": "shutdown", "result": null }] | ||
} | ||
}, { | ||
"send": { | ||
"request": {"jsonrpc":"2.0", "method":"exit", "params":{}}, | ||
"wait":[] | ||
} | ||
}, { | ||
"stop": { | ||
"exit_code": 0 | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title: 'project_config.missing_file' |