You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Summary: Format on Save with GNATformat enabled deletes the contents of .ads and .adb files which are not part of the project. These require being saved with the "File: Save without Formatting" action in VS Code.
Steps to reproduce: This doesn't happen 100%. Create a new Ada File outside of the current project and write some code. "Format on Save" needs to be on, as does the GNATformat being enabled. Save the file and the contents of the file will be deleted. In some cases, the contents will be reverted to an old version (not sure why this other behavior)
Expected behavior: Either - file does not format and remains in place as-is, OR file gets appropriately formatted.
Configuration and Logs
no workspace-specific configuration files
Log from show extension output, I only get this log when I'm able to properly save an Ada file outside the project, but **NOT** when the formatter deletes the file contents. Code: -32603 [Error - 2:10:09 PM] Request textDocument/signatureHelp failed. Message: Exception: raised LANGKIT_SUPPORT.ERRORS.PRECONDITION_FAILURE : null node argumentLoad address: 0x56223dd98000[/home/paul/.vscode/extensions/adacore.ada-26.0.202411173-linux-x64/x64/linux/ada_language_server]0x5622407993a3 Libadalang.Analysis.Kind at libadalang-analysis.adb:125460x56223ff52b6f Lsp.Ada_Completions.Parameters.Get_Call_Expr at lsp-ada_completions-parameters.adb:9180x56223ff58370 Lsp.Ada_Completions.Parameters.Propose_Signatures at lsp-ada_completions-parameters.adb:8380x56223fff0282 Lsp.Ada_Handlers.On_Signaturehelp_Request.Compute_Response.2 at lsp-ada_handlers.adb:32890x56223fff0447 Lsp.Ada_Handlers.On_Signaturehelp_Request at lsp-ada_handlers.adb:32990x56223ffde30e Lsp.Ada_Handlers.On_Server_Request at lsp-ada_handlers.adb:31290x56223f22ac64 Lsp.Default_Message_Handlers.Execute at lsp-default_message_handlers.adb:850x56223f2356df Lsp.Job_Schedulers.Process_Job at lsp-job_schedulers.adb:1910x56223ffb8bd2 Lsp.Servers.Processing_Task_TypeT at lsp-servers.adb:8480x56224221474c system__tasking__stages__task_wrapper at ???[/lib/x86_64-linux-gnu/libc.so.6]0x7f34ac7491c20x7f34ac7c985a0xfffffffffffffffe Code: -32603 [Error - 2:10:30 PM] Request textDocument/formatting failed. Message: Incorrect code can't be formatted
Code: -32603
[Error - 2:10:40 PM] Request textDocument/formatting failed.
Message: Incorrect code can't be formatted Code: -32603 [Error - 2:11:09 PM] Request textDocument/signatureHelp failed. Message: Exception: raised LANGKIT_SUPPORT.ERRORS.PRECONDITION_FAILURE : null node argumentLoad address: 0x56223dd98000[/home/paul/.vscode/extensions/adacore.ada-26.0.202411173-linux-x64/x64/linux/ada_language_server]0x5622407993a3 Libadalang.Analysis.Kind at libadalang-analysis.adb:125460x56223ff52b6f Lsp.Ada_Completions.Parameters.Get_Call_Expr at lsp-ada_completions-parameters.adb:9180x56223ff58370 Lsp.Ada_Completions.Parameters.Propose_Signatures at lsp-ada_completions-parameters.adb:8380x56223fff0282 Lsp.Ada_Handlers.On_Signaturehelp_Request.Compute_Response.2 at lsp-ada_handlers.adb:32890x56223fff0447 Lsp.Ada_Handlers.On_Signaturehelp_Request at lsp-ada_handlers.adb:32990x56223ffde30e Lsp.Ada_Handlers.On_Server_Request at lsp-ada_handlers.adb:31290x56223f22ac64 Lsp.Default_Message_Handlers.Execute at lsp-default_message_handlers.adb:850x56223f2356df Lsp.Job_Schedulers.Process_Job at lsp-job_schedulers.adb:1910x56223ffb8bd2 Lsp.Servers.Processing_Task_TypeT at lsp-servers.adb:8480x56224221474c system__tasking__stages__task_wrapper at ???[/lib/x86_64-linux-gnu/libc.so.6]0x7f34ac7491c20x7f34ac7c985a0xfffffffffffffffe Code: -32603
### Other VS Code Extensions
_No response_
### Additional context
_No response_
The text was updated successfully, but these errors were encountered:
It would be great if you could provide us a simple reproducer with the latest release, because normally it has been fixed in the latest release, and we have a test for that.
Environment
Bug Summary and Reproducer
Bug Summary: Format on Save with GNATformat enabled deletes the contents of
.ads
and.adb
files which are not part of the project. These require being saved with the "File: Save without Formatting" action in VS Code.Steps to reproduce: This doesn't happen 100%. Create a new Ada File outside of the current project and write some code. "Format on Save" needs to be on, as does the GNATformat being enabled. Save the file and the contents of the file will be deleted. In some cases, the contents will be reverted to an old version (not sure why this other behavior)
Expected behavior: Either - file does not format and remains in place as-is, OR file gets appropriately formatted.
Configuration and Logs
The text was updated successfully, but these errors were encountered: