Skip to content
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

gnatpp: Projects with duplicate filenames cause Constraint_Error #6

Open
LordAro opened this issue Aug 16, 2019 · 0 comments
Open

gnatpp: Projects with duplicate filenames cause Constraint_Error #6

LordAro opened this issue Aug 16, 2019 · 0 comments

Comments

@LordAro
Copy link

LordAro commented Aug 16, 2019

With the following file structure:

foo/
    dir1/dummy.c
    dir2/dummy.c
    duplicatefile1.gpr
    duplicatefile2.gpr

With duplicatefile1.gpr & duplicatefile2.gpr looking like:

with "duplicatefile2";

project duplicatefile1 is
   for Library_Name use "test1";
   for Source_Dirs use ("dir1");
   for Languages use ("C");
end duplicatefile1;
project duplicatefile2 is
   for Library_Name use "test2";
   for Source_Dirs use ("dir2");
   for Languages use ("C");
end duplicatefile2;

gnatpp -Pduplicatefile1.gpr results in:

Unhandled Exception raised
raised CONSTRAINT_ERROR : Utils.String_Utilities.String_String_Maps.Insert: attempt to insert key already in map
[/home/cpigott/dev/libadalang-tools/bin/gnatpp]
Utils.String_Utilities.String_String_Maps.Insert at a-cohama.adb:680
Utils.Projects.Process_Project.Set_Individual_Source_Options at utils-projects.adb:1046
Utils.Projects.Process_Project at utils-projects.adb:1118
Utils.Projects.Process_Command_Line at utils-projects.adb:1399
Utils.Drivers.Driver at utils-drivers.adb:137
Pp.Main at pp-main.adb:20
Main at b__pp-main.adb:1706
[/lib/x86_64-linux-gnu/libc.so.6]
0x7f25bfa48b95
[/home/cpigott/dev/libadalang-tools/bin/gnatpp]
0x407d78 _start at ???
0xfffffffffffffffe

Some debugging (-dc) indicates that it's only adding the filename to the map, not any information about the specific package it's coming from

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

No branches or pull requests

1 participant