-
Notifications
You must be signed in to change notification settings - Fork 1.4k
AppDomain configuration is serialized without using BinFmt #9320
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
Merged
MichalPavlik
merged 25 commits into
main
from
dev/mipavlik/task-appdomainconfig-serialization
Oct 18, 2023
Merged
Changes from 19 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
2f93aea
AppDomain configuration is serialized without using BinFmt
MichalPavlik c4f8cf1
Added new unit tests. Fixed 'null' bug.
MichalPavlik 3ee6aef
Fix CG alerts caused by RoslynTools.MSBuild 17.7.2 (#9310)
GangWang01 87b844b
Fix policheck error (#9311)
JaynieBai 64dfc0c
Mention unification in RAR found-conflicts message (#9226)
rainersigwald 7098c57
Correct success for /preprocess /targets builds (#8908)
Forgind e4cb483
Enable Windows Disabled Drive Enumeration Tests (#9266)
JaynieBai f79b38f
Packages sourcing doc (#8475)
JanKrivanek 4aec098
Catch the illegal argument exception in Net Framework! (#8839)
JaynieBai d374923
Remove stale .vsconfig components (#8862)
rainersigwald 9de0dd8
Update dependencies from https://github.com/dotnet/roslyn build 20231…
dotnet-maestro[bot] 56cb905
Re-enable IdenticalSubmissionsShouldCompleteAndNotHangTheBuildOnMissi…
ladipro 48b97b2
Delete ExcludeFromStyleCop (#9247)
ladipro cb02c2c
Make repo buildable with VS 17.8.0 Preview 3.0 (#9319)
ladipro 98ac0d8
Add a job for experimental Framework MSBuild insertion to a pipeline …
AR-May f471b78
Localized file check-in by OneLocBuild Task: Build definition ID 9434…
dotnet-bot 8f7335f
Update dependencies from https://github.com/dotnet/roslyn build 20231…
dotnet-maestro[bot] 619dca4
Cleanup: Delete NGen of T (#9263)
ladipro 96dd579
Merge branch 'main' of https://github.com/dotnet/msbuild
MichalPavlik 0348063
Added change wave with checks
MichalPavlik 3e69ceb
Type member changed to local variable
MichalPavlik 30f830f
Update src/Build/BackEnd/Node/NodeConfiguration.cs
MichalPavlik 0df3f80
Update src/Shared/TaskHostConfiguration.cs
MichalPavlik 2f6635e
Renamed local variable
MichalPavlik 1d689c8
Added record to change waves docs
MichalPavlik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Text; | ||
| using System.Threading.Tasks; | ||
| using Microsoft.Build.BackEnd; | ||
| using Microsoft.Build.Execution; | ||
| using Microsoft.Build.Logging; | ||
| using Microsoft.Build.UnitTests.BackEnd; | ||
| using Shouldly; | ||
| using Xunit; | ||
|
|
||
| namespace Microsoft.Build.Engine.UnitTests.BackEnd | ||
| { | ||
| public class NodeConfiguration_Tests | ||
| { | ||
| #if FEATURE_APPDOMAIN | ||
| /// <summary> | ||
| /// Test serialization / deserialization of the AppDomainSetup instance. | ||
| /// </summary> | ||
| [Theory] | ||
| [InlineData(new byte[] { 1, 2, 3 })] | ||
| [InlineData(null)] | ||
| public void TestTranslationWithAppDomainSetup(byte[] configBytes) | ||
| { | ||
| AppDomainSetup setup = new AppDomainSetup(); | ||
|
|
||
| NodeConfiguration config = new NodeConfiguration( | ||
| nodeId: 1, | ||
| buildParameters: new BuildParameters(), | ||
| forwardingLoggers: Array.Empty<LoggerDescription>(), | ||
| appDomainSetup: setup, | ||
| loggingNodeConfiguration: new LoggingNodeConfiguration()); | ||
|
|
||
| setup.SetConfigurationBytes(configBytes); | ||
|
|
||
| ((ITranslatable)config).Translate(TranslationHelpers.GetWriteTranslator()); | ||
| INodePacket packet = NodeConfiguration.FactoryForDeserialization(TranslationHelpers.GetReadTranslator()); | ||
|
|
||
| packet.ShouldBeOfType<NodeConfiguration>(); | ||
| NodeConfiguration deserializedConfig = (NodeConfiguration)packet; | ||
|
|
||
| deserializedConfig.AppDomainSetup.ShouldNotBeNull(); | ||
|
|
||
| if (configBytes is null) | ||
| { | ||
| deserializedConfig.AppDomainSetup.GetConfigurationBytes().ShouldBeNull(); | ||
| } | ||
| else | ||
| { | ||
| deserializedConfig.AppDomainSetup.GetConfigurationBytes().SequenceEqual(configBytes).ShouldBeTrue(); | ||
| } | ||
| } | ||
| #endif | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.