Closed solomatov closed 5 years ago
We need some change for allowing that. I've already make jsinterop-generator (used for generating the java classes) ready for bazel and j2cl: https://github.com/google/jsinterop-generator/commit/26d5af76f211323fbe81bcc68213ad3254581f9f
I need now to make some change in this repo for using that change
I'm also seeing this issue, but I'm able to fix it by changing jsinterop-generator locally to provide details on how to get args4j, and by changing this repo to load j2cl. As I'm on a mac, I also had to apply https://github.com/google/jsinterop-base/pull/8 (and then of course change the http_archive etc rules to local_archive.
Edit: Oh sorry @jDramaix you're looking into this now to finish making the changes now required from the jsinterop-generator changes. Thanks!
@niloc132 I want to note that I use two computers, one is a mac and the other is a linux one, and different issues and outputs are send from different computers.
If you can wait few days, I should have time to fix everything. The WORKSPACE file need some love since j2cl is opensource
@jDramaix Thank you!
@jDramaix @niloc132 Concerning nested workspaces, do I understand correctly that they aren't well supported by bazel? What's the right way to work with them? Just create a script and load all sub-workspaces from the root WORKSPACE file?
I wouldn't say they are not well supported, but they don't nest nicely (i.e. one WORKSPACE per git repo?), and if you modify your own WORKSPACE to point at a local copy of some project "foo" instead of a remote one, you need to iterate over your other dependencies and also download and modify any of them which also point to that same "foo". For this reason, it makes a lot more sense to just either have one big project, or maybe some kind of easy switch to toggle between local/development or remote/stable (I've seen lots of projects that move their deps into a bzl file instead of WORKSPACE, and generally assume that this is why that is done, so you can share those, like maven poms? https://docs.bazel.build/versions/master/external.html#transitive-dependencies and the rest of the file discuss this a bit, but I haven't found any "best practices" docs that really dig in to this topic).
Bazel calls the concept as recursive workspaces and they are working on proper support for it.
The design doc [1] discusses the current common practice under section called "The dependencies() pattern".
[1] they have https://github.com/bazelbuild/proposals/blob/master/designs/2018-11-07-design-recursive-workspaces.md
bazel build ... now works (except if we have a temporary sync issue with extern file)
I wanted to import it to my project. I saw there're errors, and decided to check whether it compiles. It obvious don't. Could you help with fixing it?