207 Commits

Author SHA1 Message Date
Anthony Leonardo Gracio
a3801e60b0 Merge branch 'topic/als.1493.null_entity_subprogram' into 'edge'
Fix tests failures related to subprogram called on a null entity

See merge request eng/ide/ada_language_server!1779

(cherry picked from commit 8a93a39839)

34b956f2 Fix tests failures related to subprogram called on a null entity

Co-authored-by: Adrien Boulanger <boulanger@adacore.com>
2024-12-18 10:32:09 +00:00
Vadim Godunko
3b498ac535 Merge branch 'topic/vadim/vss' into 'master'
Rewrite LAL/LSP position/range conversion

See merge request eng/ide/ada_language_server!1805

(cherry picked from commit 72f70c21d5)

9cf1dde8 Rewrite `To_LSP_Column` to compute LSP column index at the end
e7715b2f Minor reformatting

Co-authored-by: Vadim Godunko <godunko@adacore.com>
2024-11-20 15:55:11 +00:00
Max Reznik
0fb7f8d367 Merge branch 'topic/ch' into 'master'
Don't dump `callHierarchy/incomingCalls` response

Closes #1468

See merge request eng/ide/ada_language_server!1768

(cherry picked from commit 14af323d79)

76c8ebb7 Don't dump `callHierarchy/incomingCalls` response

Co-authored-by: Max Reznik <reznik@adacore.com>
2024-10-30 12:05:17 +00:00
Vadim Godunko
ebc8db7b9c Reuse Hash function. 2024-07-26 15:34:51 +00:00
Anthony Leonardo Gracio
41c8b2c04e Log exception backtraces
Closes eng/ide/ada_language_server#1390
2024-07-18 14:59:31 +00:00
Maxim Reznik
ed0cdad473 Use Low priority as the default priority.
Use `Fence` priority for

* `didOpen`
* `didClose`
* `didChangeWorkspaceFolders`
* `exit`
* `initialize`

Before this patch the default priority was `Fence`.

Refs #1141
2024-07-03 07:35:39 +00:00
Maxim Reznik
1adf4cf352 Rename Sequential_Message_Handler to Default_Message_Handler
Refs #1141
2024-07-03 07:35:39 +00:00
Maxim Reznik
90cf413b34 Add Lowest job priority
for the indexing job. Change job scheduler to keep indexing jobs
while jobs with Fence priority are executing.

Fixes #1362
2024-06-17 17:24:31 +03:00
Maxim Reznik
66e84169f3 Catch exception in job execution. 2024-06-17 13:13:06 +03:00
Anthony Leonardo Gracio
a95742dacd Add with-clause for invisible completion items
We now append the right 'als-auto-import' command to
invisible completion items, when the 'insertWithClauses' setting
is enabled.

This allows client that support executing completionItem commands
to execute the attached command in order to add the missing with-clause,
appending the qualifier if not already specified.

Automatic tests for both cases (i.e: with and without an already specified
qualifier) have been added.

For eng/ide/ada_language_server#1159
2024-05-28 12:42:01 +00:00
Maxim Reznik
8946f7adb7 Restore lost exception handlers
in out-of-order message handler jobs.

Refs #1141
2024-04-30 17:06:18 +03:00
Maxim Reznik
9f8ababdce Change job scheduler to complete fence job
before creating a next job. It is to fix this scenario:
* didChage document has been executed and waits its completion
* the next request creates a job, job remebers AnalysisUnit
* this job for request triggers completion of didChange and
  reparse AnalysisUnit
* then the job is executed with raising Stale_Reference exception

After this patch, the request triggers completion before next
job is actually created, so it can't get previous version of AU.

Refs #1141
2024-04-25 13:42:47 +03:00
Maxim Reznik
7528dcc507 Add a base type for server request jobs
to keep request cancelation logic. Use it in hover and
references requests.

Refs #1141
2024-03-26 14:58:59 +00:00
Maxim Reznik
e39d917496 Replace Is_Done function with Status parameter
This approach requires explicit calculation of the execution status,
which reduces the likelihood of forgetting to set the status.

Refs #1141
2024-03-12 17:51:12 +02:00
Philippe Gil
3c10bc5b89 textDocument/definition request implementation
Part of eng/ide/ada_language_server#1223
2024-02-22 17:25:59 +01:00
Maxim Reznik
082435b33f On_DidChange_Notification and Server.Look_Ahead_Message
Refs #1141
2024-02-14 15:24:23 +02:00
Maxim Reznik
c883006a6a Replace On_DidChange_Notification
with a job.

Refs #1141
2024-02-14 13:33:47 +02:00
Maxim Reznik
a3ce8d6e2b Keep Message in Fence job until Complete is done
Refs #1141
2024-02-14 13:33:47 +02:00
Maxim Reznik
6b50e0e46a Drop Has_Pending_Work from Server's API
Refs #1141
2024-02-14 13:33:47 +02:00
Maxim Reznik
ff4ce7be72 Rewrite Ada_Indexing as a new server job
Refs #1141
2024-02-14 13:33:47 +02:00
Maxim Reznik
3705224e7f Add job lists for High and Low priorities.
Call `Complete` on `Fence` jobs.

Refs #1141
2024-02-14 13:33:46 +02:00
Maxim Reznik
47dc44d4cc Add Job_Scheduler to LSP server.
Refs #1141
2024-02-14 13:33:46 +02:00
Anthony Leonardo Gracio
c448a5bc66 Override the logger for CodeAction responses
To avoid very large strings when doing queries to 'Wide_Wide_Image.

We now just print the response's length instead.

For https://gitlab.adacore-it.com/eng/ide/ada_language_server/-/issues/1289
2024-02-14 10:07:43 +00:00
Maxim Reznik
2412e76039 Use window/logMessage to send ALS log file path.
Refs #1183
2023-10-10 09:25:11 +00:00
Maxim Reznik
17f8bb1d9f Drop unused old code 2023-10-09 19:19:30 +03:00