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

Do not print-out version info in terminal logger #9831

Merged
merged 6 commits into from
Mar 13, 2024

Conversation

JanKrivanek
Copy link
Member

@JanKrivanek JanKrivanek commented Mar 6, 2024

Based on another @rainersigwald feedback to the msbuild talk

Context

The versioning info feels unnecessary in terminal logger mode (TL logs are not meant for post-hoc investigation).

Changes made

Frontloaded the TL check, so that we can add the TL enablement status to the decision about version message need

image

Shortcomings

In case of TL enabled by env or params, but disabled by response file, we'll still NOT disable the version message - as the message flushing happens before processing response files. This was chosen as it greatly simplifies the change (and it can be minimal risk change), as console logs are not anyways the main source of investigation data

@JanKrivanek JanKrivanek marked this pull request as ready for review March 6, 2024 18:00
Copy link
Contributor

@f-alizada f-alizada left a comment

Choose a reason for hiding this comment

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

Looks good ! :)

@ladipro
Copy link
Member

ladipro commented Mar 12, 2024

The version is still printed when -tl is added via msbuild.rsp. Repro:

  1. echo "-tl" > msbuild.rsp
  2. msbuild

Also, do you think this could be covered with a test? The command line processing logic is quite complex so it would be nice to have something in place to prevent regressions.

@JanKrivanek
Copy link
Member Author

The version is still printed when -tl is added via msbuild.rsp. Repro:

  1. echo "-tl" > msbuild.rsp
  2. msbuild

Also, do you think this could be covered with a test? The command line processing logic is quite complex so it would be nice to have something in place to prevent regressions.

Disregarding the responce file was choosen to simplify the change (so that message flushing can be kept at place before processing the response file). I put this into PR description - but that might not have been enough - let me add an explicit info into the comment in the code.
I wouldn't complicate the logic now without feedback. Unfortunately we do not have concrete data - but I'd expect interactive CLI interactions to prefere dotnet build, while msbuild.exe rather being used in noninteractive scenarios.

Or would you prefer the response file scenario to be fully respected as well?

@ladipro
Copy link
Member

ladipro commented Mar 12, 2024

Sorry, I should have read the description 🤦‍♂️ I agree it's ok to not support it.

@JanKrivanek
Copy link
Member Author

NP - comment in code is very much needed.

And let me add the test as well (@f-alizada will be happy as I was resisting his request when he raised it previously here and I must admit it was and is a very reasonable ask)

@JanKrivanek
Copy link
Member Author

Comment and test cases added

@JanKrivanek JanKrivanek enabled auto-merge (squash) March 13, 2024 06:48
@JanKrivanek JanKrivanek merged commit 6bffa95 into dotnet:main Mar 13, 2024
9 checks passed
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

Successfully merging this pull request may close these issues.

4 participants