Skip to content

Improve part of the output of --toolchain_resolution_debug #26037

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented May 9, 2025

This improves the debug output of ToolchainResolutionFunction (but not SingleToolchainResolutionFunction) in several ways:

  • messages are no longer duplicated due to Skyframe restarts
  • labels are prettified
  • start and end of resolution are clearly marked and now reference the configuration

A preexisting problem that hasn't been fixed is that messages about rejected or removed execution platforms is interleaved with other output and thus can't easily be linked to the start/finish messages. How to resolve this in the context of Skyframe restarts and messages printed by the "child" SkyFunction SingleToolchainResolutionFunction remains an open problem.

Work towards #11984

@fmeum fmeum force-pushed the improve-toolchain-resolution-output branch from 52f3180 to 61d1bac Compare May 9, 2025 10:49
@fmeum fmeum requested a review from katre May 9, 2025 10:54
@fmeum fmeum marked this pull request as ready for review May 9, 2025 10:54
@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label May 9, 2025
@fmeum
Copy link
Collaborator Author

fmeum commented May 9, 2025

@katre @gregestren Please let me know what you think of the new output format. If you like it, I will update the tests.

@fmeum fmeum changed the title Improve output of --toolchain_resolution_debug Improve part of the output of --toolchain_resolution_debug May 9, 2025
Copy link
Contributor

@katre katre left a comment

Choose a reason for hiding this comment

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

Can you add an example output with these changes?

/** Report on which toolchains were selected. */
void reportSelectedToolchains(
void startDebugging(
EventHandler eventHandler,
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the eventHandler ultimately comes from the SkyFunction.Environment, why not save it during the create call? Why pass it to every method? Are the instances changing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, there is a check in Skyframe that specifically guards against this.

Copy link
Contributor

@katre katre left a comment

Choose a reason for hiding this comment

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

LGTM, let me know when the tests are fixed, and please add an example of the new output to the description.

@iancha1992 iancha1992 added the team-Configurability platforms, toolchains, cquery, select(), config transitions label May 12, 2025
@satyanandak satyanandak added awaiting-user-response Awaiting a response from the author and removed awaiting-review PR is awaiting review from an assigned reviewer labels May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-user-response Awaiting a response from the author team-Configurability platforms, toolchains, cquery, select(), config transitions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants