You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arg_Length (Cmd, Ignore) returns the number of files passed via --ignore arguments, not the number of files listed in those files, which might have been the intention. The exception is triggered if more --ignore arguments are passed than files are eventually ignored (can be reproduced by e.g. passing an empty ignore file or one that lists files that don't exist, or by passing the same file that lists a single existing file twice). What's more, if the code were to actually reduce the number of files by the number of those listed in all ignore files, it could still trigger the same error as it assumes all the ignored files actually exist and can be skipped in the loop.
I didn't realize this before, but apparently gnattest always only compared the file name of ignored files, never the path. However, in previous versions, the base name/directory of all paths listed in files passed via --ignore was stripped, so the list/set of ignored files only contained the file names. Therefore, even if a relative path was listed, this worked correctly. The problem is that this version of gnattest doesn't remove the base name anymore, so if a relative path is listed, there won't be a match (which in my case triggered the above error as only a single file was ignored via its relative path).
The text was updated successfully, but these errors were encountered:
I noticed two issues with the
--ignore
argument:libadalang-tools/src/utils-drivers.adb
Lines 98 to 100 in dd86765
Which can trigger a CONSTRAINT_ERROR here:
libadalang-tools/src/utils-drivers.adb
Line 118 in dd86765
Arg_Length (Cmd, Ignore)
returns the number of files passed via--ignore
arguments, not the number of files listed in those files, which might have been the intention. The exception is triggered if more--ignore
arguments are passed than files are eventually ignored (can be reproduced by e.g. passing an empty ignore file or one that lists files that don't exist, or by passing the same file that lists a single existing file twice). What's more, if the code were to actually reduce the number of files by the number of those listed in all ignore files, it could still trigger the same error as it assumes all the ignored files actually exist and can be skipped in the loop.gnattest
always only compared the file name of ignored files, never the path. However, in previous versions, the base name/directory of all paths listed in files passed via--ignore
was stripped, so the list/set of ignored files only contained the file names. Therefore, even if a relative path was listed, this worked correctly. The problem is that this version ofgnattest
doesn't remove the base name anymore, so if a relative path is listed, there won't be a match (which in my case triggered the above error as only a single file was ignored via its relative path).The text was updated successfully, but these errors were encountered: