alire-project / alire

Command-line tool from the Alire project and supporting library
GNU General Public License v3.0
288 stars 49 forks source link

Suggestion: consider adding `-gnateE` in the default switches of the development build mode #1337

Closed mgrojo closed 1 year ago

mgrojo commented 1 year ago

From https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gnat_ugn_unw/Switches-for-gcc.html#Switches-for-gcc

-gnateE Generate extra information in exception messages, in particular display extra column information and the value and range associated with index and range check failures, and extra column information for access checks.

I find this particularly useful for fixing exceptions without touching a debugger. I don't know of any drawback, but I propose to enable it only in development mode just in case it has any impact.

mosteo commented 1 year ago

The only possible drawback is in which version this switch was added, as people using older gnats may get bitten. At present we don't consider the gnat version in the environment during config generation (maybe we should, but it isn't trivial to add).

Fabien-Chouteau commented 1 year ago

@mgrojo We already enabled and then disabled this switch because it is not compatible with embedded/restricted run-times: https://github.com/alire-project/alire/pull/1120

And we do not have way at the moment to know whether or not a crate will be compiled for embedded or not.

Until something changes at compiler level we cannot enable this switch.