Open Yannic opened 5 years ago
Internally we infer the java namespace from the file path and that comes from our bzl rule. Is there a reason to infer from soy namespace?
I think we have long term plans (hopes and dreams) to no longer require soy namespaces and allow users to import using file import ie
import {foo} from '../templates/bar.soy'
There is similar functionality to infer the Java package from the file path in rules_closure, but it's very opinionated about the project layout, and I've found myself manually specifying the Java package most of the time.
If there is a better implementation to infer the package inside Google, that might work as well.
It would be great if
SoyParseInfoGenerator
had an option to infer the Java package from the soy namespace of the file.See https://github.com/closure-tools/closure-templates/commit/7acea66c65ee0d7b4ceab2d18247cf8d8f15a437 for a prototype.
/cc @robfig @sgammon