-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Properties and items logged at evaluation with legacy loggers for single-process builds #7219
Comments
Looked at this a bit this morning. Loggers work with an event-based approach, where one "SourceSink" of events can feed multiple loggers. For a build with the default console logger, the binlog, and a random unenlightened logger, I see only one msbuild/src/Build/BackEnd/Components/Logging/LoggingService.cs Lines 528 to 530 in b827bf5
I can also see the msbuild/src/Build/Definition/ProjectCollection.cs Line 2054 in b827bf5
getting toggled while registering the The second logger gets registered through this path: msbuild/src/Build/BackEnd/Components/Logging/LoggingService.cs Lines 926 to 931 in b827bf5
So it sees only the In the multiproc case, we actually pass only the non-console loggers to the ProjectCollection, because the console logger is a Lines 3202 to 3220 in b827bf5
Lines 1027 to 1030 in b827bf5
and passed to the Line 1168 in b827bf5
So I think the current filtering mechanism just doesn't work, and we've been squeaking by with luck :( |
Thanks for looking. When I added support for IncludePropertiesAndItems I copy pasted existing support for other settings, which probably have the same issue :| |
I just noticed that I think It needs to be enlightened to support IEventSource4: msbuild/src/Utilities/MuxLogger.cs Line 339 in 2cbc8b6
Here I think: msbuild/src/Utilities/MuxLogger.cs Line 1336 in 2cbc8b6
|
Hmm, that's probably fine. I'm not even sure what SubmissionRecord is used for or whether that is relevant in any way. |
We have an unexpected behavior for single-process builds (/bl), where if there are legacy loggers that haven't opted in via
IEventSource4.IncludeEvaluationPropertiesAndItems()
, and the environment variableMSBUILDLOGPROPERTIESANDITEMSAFTEREVALUATION
is not set, we still enable the new behavior if there is at least one "enlightened" logger.See test results here:
#7217 (comment)
See related:
The text was updated successfully, but these errors were encountered: