AdaCore / gprbuild

GPRbuild is an advanced build system designed to help automate the construction of multi-language systems.
Other
65 stars 21 forks source link

GPRbuild assertion failure processing a mildly borked GPR file #94

Open esthermations opened 3 years ago

esthermations commented 3 years ago

Hiya, in the process of editing the GPR file for my project I managed to produce a GPR file that hits an assert failure in GNAT 2020's macOS version of GPRbuild, with no informative error messages or such.

The file as it was is here: https://raw.githubusercontent.com/esthermations/cargame-ada/da8660bb897379b902b247373a8f44ef5f452e63/cargame.gpr

Just chucking that file anywhere and running gprbuild -P cargame.gpr should cause the crash -- it does for me. There are a number of things wrong with it but nothing that I'd imagine should crash gprbuild.

Screen Shot 2021-01-19 at 6 22 49 pm

Just thought I'd chuck that your way. Thanks!

esthermations commented 3 years ago

I'm running into this a bit more, I believe it's connected to having a trailing comma, or possibly one followed by a comment. In that file it's right near the end:

       "-gnata",    --  Enable assertions and contract checks
       );

I just ran into this issue again and fixed the assertion failure by removing the trailing comma.

anisimkov commented 3 years ago

I just tried "-gnata", -- Enable assertions and contract checks ); in GNAT Community 2020 on 64 bit Linux and error was different "cannot be part of an expression" not really clean, but line number was right.