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

add extra rsc args and print its output upon success #7863

Conversation

Projects
None yet
2 participants
@cosmicexplorer
Copy link
Contributor

commented Jun 5, 2019

Problem

While we can currently pass zinc extra arguments with --args and passthrough args, there's no equivalent for arguments to rsc. Additionally, rsc's output is hidden unless it fails.

Solution

  • Add --extra-rsc-args option (named to avoid clashing with any other options).
  • Convert the rsc invocation to use WorkUnitLabel.COMPILER in order to view its output upon success (allowing rsc to e.g. print timings).

Result

Rsc args can be added by setting an option, without pants changes!

@cosmicexplorer cosmicexplorer marked this pull request as ready for review Jun 7, 2019

@cosmicexplorer cosmicexplorer force-pushed the cosmicexplorer:rsc-compile-timings-output-stderr branch from c257dd1 to b8a78cc Jun 7, 2019

@cosmicexplorer cosmicexplorer requested review from stuhood and illicitonion Jun 7, 2019

@stuhood

stuhood approved these changes Jun 7, 2019

@@ -169,6 +169,9 @@ def register_options(cls, register):
default=cls.JvmCompileWorkflowType.rsc_and_zinc, metavar='<workflow>',
help='The workflow to use to compile JVM targets.')

register('--extra-rsc-args', type=list, default=[],

This comment has been minimized.

Copy link
@stuhood

stuhood Jun 7, 2019

Member

I think that zinc just calls these args.

@cosmicexplorer cosmicexplorer merged commit 94ed8bf into pantsbuild:master Jun 7, 2019

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

cosmicexplorer added a commit to cosmicexplorer/pants that referenced this pull request Jun 7, 2019

add extra rsc args (pantsbuild#7863)
### Problem

While we can currently pass zinc extra arguments with `--args` and passthrough args, there's no equivalent for arguments to rsc. Additionally, rsc's output is hidden unless it fails.

### Solution

- Add `--extra-rsc-args` option (named to avoid clashing with any other options).
- Convert the rsc invocation to use `WorkUnitLabel.COMPILER` in order to view its output upon success (allowing rsc to e.g. print timings).

### Result

Rsc args can be added by setting an option, without pants changes!

cattibrie added a commit to cattibrie/pants that referenced this pull request Jun 19, 2019

add extra rsc args (pantsbuild#7863)
### Problem

While we can currently pass zinc extra arguments with `--args` and passthrough args, there's no equivalent for arguments to rsc. Additionally, rsc's output is hidden unless it fails.

### Solution

- Add `--extra-rsc-args` option (named to avoid clashing with any other options).
- Convert the rsc invocation to use `WorkUnitLabel.COMPILER` in order to view its output upon success (allowing rsc to e.g. print timings).

### Result

Rsc args can be added by setting an option, without pants changes!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.