Closure Library and current j2cl-m-p setup #70
Replies: 3 comments
-
Presently, our maven distribution of j2cl includes some parts of closure-library and is heavily biased to just gathering the parts required for j2cl to work - wiring for The second jszip that we provide is just the parts of closure-library missing from that other jszip so that tests can be run at all - again, a very minimal set. Both of these are configurable - if you were to publish a new artifact you could specify it as The first idea that comes to mind is to replace this with just a single configuration arg, something like So, two questions to answer about handling this:
|
Beta Was this translation helpful? Give feedback.
-
@niloc132 thanks for your detailed explanation. From my point of view, we could just have jszip with minimal+tests for tests and build/watch modes. If anyone wants to have additional parts of closure library they can add missing files by themselves. |
Beta Was this translation helpful? Give feedback.
-
Picking this up again, since it came up in gitter a few weeks ago, and i'm prepping for a 0.19 release to maven central. Closure-library removed the py script that I previously used to start from "entrypoints" and collect the files that were needed to make a closure-library build. As far as I can tell there is no simple way without making an extra build file to request this info. Roughly you need to make a custom bazel rule to start from an entrypoint and collect the .js files that are required. Additionally, there isn't a nice way to say "get all of the non-test files, so that we can just lazily pick up the ones we need". There are two reasons for this:
Either we have to find a better way to select just the files we want, or give up on SORT_ONLY (see #69 for the discussion on why we really want SORT_ONLY). Selecting only the files we want seems like it should be easier than it is - the simplest answer right now is to make a bazel rule that specifies the modules you're interested in, and have it collect required dependencies. Producing the closure-test artifact partly follows this, with a healthy dose of trial and error to see what was missed. |
Beta Was this translation helpful? Give feedback.
-
Closure Library contains many nice goodies and widgets, so it ll be nice to have them. I have started jsinteropting closure-library files, but i have faced that right now it's not possible to run it with current j2cl-m-p setup.
The reason of it is
[JSC_DUPLICATE_NAMESPACE] Duplicate namespace
Exception, because this set of closure-library files is different if i run tests and watch mode.I think, it can be solved by moving these files from closure-test to bootstrap, maybe except of goog/testing.
WDYT ?
Beta Was this translation helpful? Give feedback.
All reactions