Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kevlar700 opened this issue Feb 18, 2025 · 6 comments
Labels

Comments

@kevlar700
Copy link

kevlar700 commented Feb 18, 2025

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

@kevlar700 kevlar700 added the bug label Feb 18, 2025
@AnthonyLeonardoGracio
Copy link
Collaborator

Hello @kevlar700,

We'll open an internal issue to investigate, but that's probably a bug I would say. Thanks for the report, we'll keep you posted.

Regards,

@ogorodnik
Copy link
Contributor

Hello @kevlar700
To make the completion work, you need to add use STM32 in the file you would like to have such completion. Without the use clause we cannot tell which declaration correspond to Devices. GNAT reports the same thing: "Devices is not visible". So such bvehavior is expected.

@kevlar700
Copy link
Author

kevlar700 commented Apr 25, 2025

To make the completion work, you need to add use STM32 in the file you would like to have such completion. Without the use clause we cannot tell which declaration correspond to Devices. GNAT reports the same thing: "Devices is not visible". So such bvehavior is expected.

I almost never use use. It compiles just fine. I don't get any warning from GNAT? You don't need to use a common parent package as it is automatically part of the name space. I guess I shall have to provide a package to demonstrate the issue. I'm not sure when though.

@kevlar700
Copy link
Author

Another issue that I have noticed is that if you edit a line with say ); at the end then completion does not work until ); is removed but perhaps that is by design.

@AnthonyLeonardoGracio
Copy link
Collaborator

To make the completion work, you need to add use STM32 in the file you would like to have such completion. Without the use clause we cannot tell which declaration correspond to Devices. GNAT reports the same thing: "Devices is not visible". So such bvehavior is expected.

I almost never use use. It compiles just fine. I don't get any warning from GNAT? You don't need to use a common parent package as it is automatically part of the name space. I guess I shall have to provide a package to demonstrate the issue. I'm not sure when though.

It would be great if you could provide a self-contained reproduced indeed, it will help us to see if we can improve our completion engine to handle that particular case.

Regards,

@AnthonyLeonardoGracio
Copy link
Collaborator

Another issue that I have noticed is that if you edit a line with say ); at the end then completion does not work until ); is removed but perhaps that is by design.

I think this one deserves a separate issue. Illustrating it with a GIF would also help us.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants