Skip to content
Snippets Groups Projects

Adding check for duplicate non-case-sensitive part names that could cause...

2 unresolved threads
1 file
+ 5
5
Compare changes
  • Side-by-side
  • Inline
@@ -728,12 +728,12 @@ for($ii=0;$ii<$nonSubCnt;$ii++)
}
#// - Remove all parts which will not require further processing in the code for the part
#// total, also do a part check for blocks with diffrent capitalization that are going to
#// total, also do a part check for blocks with different capitalization that are going to
#// emit c code that will be lowercased (causing collisions)
$ftotal = $partCnt;
my %seen; #Hashmap that keeps track of the names we have seen before
my %noCode = map {$_ => 1} qw(INPUT OUTPUT BUSC BUSS FROM GOTO); #List of non-generating parts
my %seen; #Hash that keeps track of the names we have seen before
my %noCode = map {$_ => 1} qw(INPUT OUTPUT BUSC BUSS FROM GOTO); #Hash of non-generating parts
my @duplicates = ();
for($kk=0;$kk<$partCnt;$kk++)
@@ -763,10 +763,10 @@ for($kk=0;$kk<$partCnt;$kk++)
}
}
if ( 0+@duplicates > 0) #If we found 1 or more issues
if ( scalar(@duplicates) > 0) #If we found 1 or more issues
{
my $whole_error = "ERROR - Some part(s) failed the duplicate name check. " .
"Two parts, that generate code, with the same name (but diffrent capitalization) were found.\n" .
"Two parts, that generate code, with the same name (but different capitalization) were found.\n" .
"This can cause an issue with code generation, please rename one of the parts, from each pair.\n";
$whole_error = $whole_error . join('', @duplicates);
die $whole_error . "\n";
Loading