Skip to content

Clean up compiler logging#46012

Merged
jaredpar merged 2 commits intodotnet:masterfrom
jaredpar:log
Jul 15, 2020
Merged

Clean up compiler logging#46012
jaredpar merged 2 commits intodotnet:masterfrom
jaredpar:log

Conversation

@jaredpar
Copy link
Member

The compiler logging support primarily helped with identifying issues
with the underlying protocol. That was an area of problem in the initial
compiler server development and a sensible logging scenario.

Now though the underlying protocol isn't really an issue for the server.
The bigger issue is tracking the underlying state transitions of the
server and the reasons for making such transitions. This PR moves our
logging to match this new reality.

The compiler logging support primarily helped with identifying issues
with the underlying protocol. That was an area of problem in the initial
compiler server development and a sensible logging scenario.

Now though the underlying protocol isn't really an issue for the server.
The bigger issue is tracking the underlying state transitions of the
server and the reasons for making such transitions. This PR moves our
logging to match this new reality.
@jaredpar jaredpar requested a review from a team as a code owner July 15, 2020 16:54
@jaredpar
Copy link
Member Author

@dotnet/roslyn-compiler PTAL


public override ResponseType Type => ResponseType.Rejected;

public RejectedBuildResponse(string reason)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the most impactful part of the change because it forces us to declare a reason every time we reject a build. Note that rejecting a build is different than a build failing. A build failing is a completed build (it just failed). A rejected build is one the server said "i can't handle this, fall back to csc / vbc".

for (int i = 0; i < args.Count; ++i)
{
var arg = args[i];
Log($"argument[{i}] = {arg}");
Copy link
Member

Choose a reason for hiding this comment

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

Why stop logging this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Logging these arguments ends up taking up 95% of the log file. It basically makes the file unreadable without massive filtering. The arguments are all present in the binlog so it doesn't really add anything here.

Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

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

LGTM (commit 2)

@jaredpar
Copy link
Member Author

Integration test are a known issue. Merging.

@jaredpar jaredpar merged commit 88bd81b into dotnet:master Jul 15, 2020
@ghost ghost added this to the Next milestone Jul 15, 2020
@jaredpar jaredpar deleted the log branch July 15, 2020 23:42
@JoeRobich JoeRobich modified the milestones: Next, 16.8.P1 Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants