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 goals to run_info #11374

Merged
merged 1 commit into from
Dec 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/python/pants/goal/run_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def start(self, all_options: Options, run_start_time: float) -> None:
self._main_root_workunit.start(run_start_time)
self.report.start_workunit(self._main_root_workunit)

self.run_info.add_info("goals", all_options.goals)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the line below, we call tuple. Do you know why and if we need it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all_options.goals returns a list, that tuple call just converts it into a tuple. I don't think there's any principled reason why the type of this value needs to be one or the other. It happens that the toolchain API that currently consumes self._v2_goal_rule_names converts it back into a list, but I don't think that's a meaningful choice either.

goal_names: Tuple[str, ...] = tuple(all_options.goals)
self._v2_goal_rule_names = goal_names

Expand Down