Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Tasks
Log.HasLoggedError
now respectsMSBuildWarningsAsErrors
#6174Tasks
Log.HasLoggedError
now respectsMSBuildWarningsAsErrors
#6174Changes from 4 commits
8ca466d
ff95db2
16cd7f0
2b61f12
07fbbb7
8da9849
8f58790
cf90ca0
fda18f5
4a93c5a
cdb831e
6cd3074
53c5b0e
4af8ce6
b396ed5
764df59
fdd2419
5d7b16a
83f1b66
63be126
28f55cb
787982a
d2c230c
7aa9763
febb509
0ccb51c
7670dea
9a485da
924423b
a969d83
b65e272
9856364
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually need to make this a public API? Isn't it enough to just ensure that HasLoggedErrors works as expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I'll remove public on warningsaserrors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So do we need IBuildEngine8 then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may have been confused by the original question. WarningsAsErrors needs to be visible to the tasklogginghelper so it can determine if it actually logged an error when it tries to log a warning. Without IBE8 having this hashset I'm not aware of a to get that info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interface members are public by default so if you remove the public keyword nothing will change, it will still be a public member on a public interface.
So I guess to answer Mihai's question we do need an
IBuildEngine8
and it does need to have theWarningsAsErrors
member, right? Just to confirm.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand the value of the private part of the public/private split interfaces? I do like the final abstract class plan, but marcpopMSFT suggested we should wait for rainersigwald before making that kind of decision, so I shelved my planned implementation of that for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was assuming it somehow prevents fixing
TaskLoggingHelper.HasLoggedErrors
to return true when logging warnings-as-errors, but it turns out it's not needed. Why do tasks require a new API in addition to the existingTaskLoggingHelper.HasLoggedErrors
? In order to allow them to inhibit logging a warning if turns out to be an error? That does not sound like safe behaviour :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, and you're right. I got so focused on the solution that I forgot about the motivating problem. That sounds reasonable to me, though—@benvillalobos, could this interface be internal? Maybe have IBuildEngine7 extend WarningsAsErrorsBuildEngine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where I'm at with IBuildEngine. IMO we take one more "this is the way we've done it" IBE PR and stop at IBE9 when we implement the abstract class. Otherwise why would we extend private IBE interfaces after we add the abstract class?
It sounds like it would be even messier to have a single private IBE8, all previous IBE's are public, then we make the abstract class and have no use for private IBE's.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mkay, took another look at the code. So TaskLoggingHelper gets an
IBuildEngine
, and that's how it interacts with theTaskHost:IBuildEngine{N}
which knows about warnings-as-errors from its TaskLoggingContext. Beyond keeping it public, any solution I can think of is pretty messy. So public it is then :)