-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bazel rules? #143
Comments
I've thought about it. Medium has Bazel rules around Plovr but they are kind of janky and not easily generalizable. They parallelize well, but they also do a lot of do-si-do dancing with plovr JSON templates that's hard to debug. They also don't use persistent workers. It's not entirely clear to me that you'd want to use A more compelling use case I thought about was to have a Bazel rule that takes the closure Bazel rules as input, and outputs plovr json. So you would use Bazel for static builds, but Plovr for serving and dynamic rebuilds. |
That makes sense. But, we have ~200 plovr configs. It seemed daunting to migrate those to rules_closure compared to having a drop-in plovr target that references them. We do have a custom rule for that that simply runs plovr build, and parallelization does work fine, but it seems like persistent workers would be a significant speedup. We compile in the Plovr servlet for dynamic reloads and only use bazel for production builds -- I would love to use the bazel-built artifact if no changes have been made rather than waiting up to 10s for the plovr compile on the first request, but that seemed tricky. |
The problem we ran into when doing the Medium Bazel migration is that Plovr has strong opinions about what the dependency tree looks like, and Bazel also has strong opinions about what the dependency tree looks like. There wasn't a way to have an easy drop-in replacement rule. The solution we ended up with was:
Your mileage may vary though depending on how your JS is structured. Maybe the answer is that there should be a "plovr bazel" that produces bazel rules based on Plovr JSON |
Oh, that's a good point. I solved that by using local = 1 so it has unfettered access to the source tree. 👎 We use auto-inclusion based on goog.require so this would be some work.. |
After watching
https://www.youtube.com/watch?v=0pgERydGyqo&index=6&list=PLxNYxgaZ8RseY0KmkXQSt0StE71E7yizG
I was wondering if there's any thought / action on implementing bazel rules for plovr? It seems like there would be a big speedup from parallelization and using persistent workers.
The text was updated successfully, but these errors were encountered: