native
native copied to clipboard
[jnigen] What to name the file that exports the whole package
This is analogous to importing foo.bar.* in Java.
The file is currently named _package.dart and there are currently a few problems with it.
- A Java class named
_packagecould technically exist. - It is only one level deep, so we have
import 'foo/bar/_package.dart'but notimport 'foo/_package.dart', we should generate this at each level. - It's not immediately obvious to the user that
_package.dart, especially starting with an underscore is the file to look for.
Some thoughts:
-
*.dartis not supported in Windows so that's not possible - In Dart usually the file that exports everything in
foo/baris calledbar.dart, but a classbarorBarcould exist which clashes with this name. - We could do
-.dartor anything that has a dash in it since it won't clash with a class name - Same with
+.dartor anything with a plus – Maybe this looks the most like import everything?
cc @dcharkes @liamappelbe
Yeah, I pondered this question when we first started this project. And, I still don't know a good solution. 🙃
Is this a configurable option? Making it a config option is an easy work around. Then it doesn't matter so much what the default is.
Sure. We could make it configurable as well.