Skip to content
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

port quelea to v2 rules #7083

Closed
6 tasks
cosmicexplorer opened this issue Jan 14, 2019 · 1 comment
Closed
6 tasks

port quelea to v2 rules #7083

cosmicexplorer opened this issue Jan 14, 2019 · 1 comment

Comments

@cosmicexplorer
Copy link
Contributor

cosmicexplorer commented Jan 14, 2019

rsc_compile.py should be able to be converted to a set of v2 @rules. These should all be made into their own issues/PRs.

  • Wrap the hermetic local ExecuteProcessRequests/etc in something like ScalaCompileRequest/ScalaCompileResponse. Do this for rsc, zinc, metacp, metai, etc (these can be landed separately).
  • Convert each Job in the zinc compile to use these ExecuteProcessRequest/etc wrappers by synchronously invoking the engine.
  • Make the rules recursive (as we do with e.g. TransitiveHydratedTargets) so that we can convert all of quelea/zinc compile to just be a single engine invocation per target root.
  • Figure out logging -- see extending workunits for declarative messaging in noninteractive v2 @rules #7071 for an idea on how to do that.
  • Figure out the interaction with v1 caching and products. ClasspathEntrys already have digests -- we can consider something like the BuildInvalidator to materialize digests on demand to consume by v1 tasks (so v1 tasks would be able to lazily materialize classpath entries -- but we would never need to materialize compile output that the downstream v1 task doesn't ask for)!
  • Allow compiling some targets with rsc and compiling other targets (containing rsc-incompatible scala) with pure zinc, then running metacp on them in order to generate input for downstream rsc-compatible scala targets. This means we can blacklist incompatible targets and break them down alongside rsc improvements instead of whitelisting rsc-compatible code.

Note that currently we eagerly materialize the compile output into the workdir on each compile invocation -- we can remove this first, or later. Then we can implement the recursive rules by maintaining a mapping of target -> classpath and passing it down through recursive rule invocations, and flattening it when we need to generate a classpath for a following compile (there's an example of how to do the flattening somewhere in v1 zinc land). Then we can consider adapting something like the BuildInvalidator to allow v1 tasks to consume digests so we never have to materialize anything we don't need.

image from ios

@Eric-Arellano
Copy link
Contributor

If I understand correctly, Queluea was an internal Twitter project and it is no longer in scope for this to be converted to V2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants