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

Tasks Should Be Aware of WarningsAsMessages #6306

Closed
benvillalobos opened this issue Mar 26, 2021 · 0 comments · Fixed by #6308
Closed

Tasks Should Be Aware of WarningsAsMessages #6306

benvillalobos opened this issue Mar 26, 2021 · 0 comments · Fixed by #6308
Assignees
Labels
bug needs-triage Have yet to determine what bucket this goes in.

Comments

@benvillalobos
Copy link
Member

Issue Description

#6174 made progress on the issue with tasks understanding WarningsAsErrors, but there's still work to do.

Steps to Reproduce

Create a task that returns !Log.HasLoggedErrors
Set up your build such that:

  1. All warnings will be treated as errors.
  2. Add a different warning to be treated as a message.

Expected Behavior

Task returns true.

Actual Behavior

Task will return false.

Analysis

See my comment in this PR: #6304.

Because of the implied rule that a non-null empty set of WarningsAsErrors means that all warnings are treated as errors, there's no way to have a single set that represents whether or not any given warning should be treated as an error.

@benvillalobos benvillalobos added bug needs-triage Have yet to determine what bucket this goes in. labels Mar 26, 2021
@benvillalobos benvillalobos self-assigned this Mar 26, 2021
Forgind pushed a commit that referenced this issue Mar 31, 2021
…dErrors` (#6308)

Fixes #6306

Context
#6174 didn't properly account for warningsaserrors and warningsasmessages together. This PR makes each taskhost aware of both WarningsAsMessages and WarningsAsErrors when telling tasks whether or not an error should be treated as a warning.

Changes Made
LoggingService and TaskLoggingContext expose a GetWarningsAsMessages to each taskhost for them to store.
No changes to IBE8 API
Taskhosts first check if a warning would be treated as a message when telling tasks whether or not a warning should be treated as a warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs-triage Have yet to determine what bucket this goes in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant