mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 18:07:12 +01:00
protoc: protoc (ver 2 and 3) strips underscores when generating .java file names. consider this in node name generation otherwise the generated java file will not be found
This commit is contained in:
parent
9e2da12800
commit
adbee3f23a
@ -191,9 +191,9 @@ def process_protoc(self, node):
|
||||
nodename += javacn + '.java'
|
||||
else:
|
||||
if self.env.PROTOC_MAJOR > '2' and node.abspath()[node.abspath().rfind(os.sep)+1:node.abspath().rfind('.')].title() in messages:
|
||||
nodename += node.abspath()[node.abspath().rfind(os.sep)+1:node.abspath().rfind('.')].title() + 'OuterClass.java'
|
||||
nodename += node.abspath()[node.abspath().rfind(os.sep)+1:node.abspath().rfind('.')].title().replace('_','') + 'OuterClass.java'
|
||||
else:
|
||||
nodename += node.abspath()[node.abspath().rfind(os.sep)+1:node.abspath().rfind('.')].title() + '.java'
|
||||
nodename += node.abspath()[node.abspath().rfind(os.sep)+1:node.abspath().rfind('.')].title().replace('_','') + '.java'
|
||||
|
||||
java_node = node.parent.find_or_declare(nodename)
|
||||
out_nodes.append(java_node)
|
||||
|
Loading…
Reference in New Issue
Block a user