AdaCore / AdaCore/ada_language_server

[Bug]: Root Child package name of library is required in parameter signature for ALS param suggestion functionality

Open
#1,239 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Ada
Stars
304
Forks
70
PR merge metrics
No merged PRs in 30d

Description

Environment
  • OS and Version: Devuan Linux (Debian 12)
  • IDE Version: Gnat Studio 25.0w
Bug Summary and Reproducer

Bug Summary:

If you have a library procedure

STM32.SPI.Run.Configure (SPI  : in STM32.Devices.SPI.SPI_T);

Then ALS will handily fill out the params for you when you type the following from a main application so long as STM32.Devices.SPI is withed.

STM32.SPI.Run.Configure ( Ctrl=>Space

Then you can backspace the end (.SPI_T) and retype the . to get a list of possible values.


Steps to reproduce:

However if the procedure is the following ommiting the libraries root package name.

STM32.SPI.Run.Configure (SPI  : in Devices.SPI.SPI_T);

Then that functionality no longer works.


Expected behavior:

Is the advice to always include the root child package name in the library sources procedure signatures or is this a bug?

Configuration and Logs
I expect that this is the current behaviour for any configuration but can provide logs if required. The current behaviour may even be the best that can be expected?
Other VS Code Extensions

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two procedure-signature examples in GNAT Studio 25.0w on Devuan Linux with the parameter suggestion and completion steps described in the issue. Compare behavior when the parameter type includes STM32.SPI and when it uses Devices.SPI, then confirm that the expected suggestions work without requiring the root child package name.

Written by the indexing model from the issue text.

Assessment

Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.