AdaCore / AdaCore/ada_language_server

Sort dependencies problems

Open
#1,183 0 comments 0 reactions 1 assignee View on GitHub

@AnthonyLeonardoGracio is already working on this.

Since Apr 11, 2024.

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

Description

with dependencies like:

with Chapter_1;
with Chapter_3;
with Chapter_2;

Using the sort dependencies action (clicking on the lamp bulb icon) will sort them but also insert an extra empty line inbetween:

with Chapter_1;

with Chapter_2;

with Chapter_3;

With dependencies like:

with Ada.Integer_Text_IO, Ada.Text_IO, Ada.Float_Text_IO;
with Ada.Command_Line;
with Ada.Calendar;
with Ada.Numerics.Elementary_Functions;
with Random_Booleans;

Using the sort dependencies action will sort them, but insert copies of each line that mentions more than one package:

with Ada.Calendar;
with Ada.Command_Line;
with Ada.Integer_Text_IO, Ada.Text_IO, Ada.Float_Text_IO;
with Ada.Integer_Text_IO, Ada.Text_IO, Ada.Float_Text_IO;
with Ada.Numerics.Elementary_Functions;
with Ada.Integer_Text_IO, Ada.Text_IO, Ada.Float_Text_IO;

with Random_Booleans;

This is in VSCodium with Ada & Spark extension v24.0.4 on Tuxedo Linux.
GNAT 10.5.0
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Kind regards
Bent Bracke

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.