-
Notifications
You must be signed in to change notification settings - Fork 331
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
Migration to netstandard 1.4 #406
Migration to netstandard 1.4 #406
Conversation
mayankbansal018
commented
Jan 30, 2017
- Migrating CoreUtilites to netstandard1.4
- Adding a platform abstraction layer, to implement platform specific requirements
1. Migrating CoreUtilites to netstandard1.4 2. Adding a platform abstraction layer, to implement platform specific requirements
Hi @mayankbansal018, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
scripts/build.ps1
Outdated
@@ -252,6 +252,22 @@ function Publish-Package | |||
Write-Log "Publish-Package: Complete. {$(Get-ElapsedTime($timer))}" | |||
} | |||
|
|||
function Patch-Publish-Package |
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.
Publish-PlatfromAbstractions, call from within Publish-Package.
scripts/build.ps1
Outdated
$fullCLRPackageDir = Get-FullCLRPackageDirectory | ||
$coreCLRPackageDir = Get-CoreCLRPackageDirectory | ||
|
||
$platformAbstraction = Join-Path $env:TP_ROOT_DIR "src\Microsoft.TestPlatform.PlatformAbstractions\bin\$TPB_Configuration" |
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.
nit:indent
@@ -30,6 +30,9 @@ | |||
<PackageReference Include="System.Diagnostics.Process"> | |||
<Version>4.3.0</Version> | |||
</PackageReference> | |||
<PackageReference Include="System.Threading.Thread"> |
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.
Was this dependency getting implicitly pulled in earlier?
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.
yes It was coming from CoreUtilities.csproj
|
||
namespace Microsoft.VisualStudio.TestPlatform.ObjectModel | ||
{ | ||
// |
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.
nit: ///
for summaries.
// Summary: | ||
// Specifies what messages to output for the System.Diagnostics.Debug, System.Diagnostics.Trace | ||
// and System.Diagnostics.TraceSwitch classes. | ||
public enum CustomTraceLevel |
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.
Should we call this TestPlatformTraceLevel
?
Remove |
@@ -37,7 +34,7 @@ public class RollingFileTraceListener : TextWriterTraceListener | |||
{ | |||
if (string.IsNullOrWhiteSpace(fileName)) | |||
{ | |||
throw new ArgumentException(Resources.CannotBeNullOrEmpty, nameof(fileName)); | |||
throw new ArgumentException(nameof(fileName)); |
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.
Is the string Resources.CannotBeNullOrEmpty
redundant?
using System.IO; | ||
using System.Threading; | ||
|
||
/// <summary> |
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.
We can move documentation for public members to IPlatformEqtTrace
and use /// <inheritdoc/>
to reduce duplication.
@@ -49,12 +49,14 @@ | |||
<file src="net46\$Runtime$\Microsoft.TestPlatform.VsTestConsole.TranslationLayer.dll" target="lib\net46\" /> | |||
<file src="net46\$Runtime$\Microsoft.TestPlatform.CommunicationUtilities.dll" target="lib\net46\" /> | |||
<file src="net46\$Runtime$\Microsoft.TestPlatform.CoreUtilities.dll" target="lib\net46\" /> | |||
<file src="net46\$Runtime$\Microsoft.TestPlatform.PlatformAbstractions.dll" target="lib\net46\" /> |
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.
nit: indent. Same for below.
src/TestPlatform.ObjectModel.nuspec
Outdated
@@ -49,9 +49,11 @@ | |||
<files> | |||
<file src="net46\$Runtime$\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll" target="lib\net46\" /> | |||
<file src="net46\$Runtime$\Microsoft.TestPlatform.CoreUtilities.dll" target="lib\net46\" /> | |||
<file src="net46\$Runtime$\Microsoft.TestPlatform.PlatformAbstractions.dll" target="lib\net46\" /> |
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.
nit: indent. Same for below.
/// We pass through exceptions thrown due to incorrect arguments to <c>EqtTrace</c> methods. | ||
/// Usage: <c>EqtTrace.Info("Here's how to trace info");</c> | ||
/// </summary> | ||
public class PlatformEqtTrace : IPlatformEqtTrace |
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.
What is the test strategy for this class?
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.
Looks good with few comments.
|
||
void SetTraceLevel(CustomTraceLevel value); | ||
|
||
#if NET46 |
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.
:( Isn't this smell in an interface?
/// </summary> | ||
public class PlatformEqtTrace : IPlatformEqtTrace | ||
{ | ||
public void WriteLine(CustomTraceLevel level, string message) |
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.
We are planning to fill this in later? Looks like there might be common code with desktop for this.
|
||
public static CustomTraceLevel TraceLevel |
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.
Isn't this a breaking change?
@@ -37,7 +34,7 @@ public class RollingFileTraceListener : TextWriterTraceListener | |||
{ | |||
if (string.IsNullOrWhiteSpace(fileName)) |
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.
Suggestion : Can use ValidateArg.NotNullOrEmpty here.
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.
Can't use, it will create circular dependency
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.
With few suggestions
@mayankbansal018 please ensure |