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

Migration to netstandard 1.4 #406

Merged
merged 13 commits into from Feb 7, 2017
Merged

Migration to netstandard 1.4 #406

merged 13 commits into from Feb 7, 2017

Conversation

mayankbansal018
Copy link
Contributor

  1. Migrating CoreUtilites to netstandard1.4
  2. 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
@msftclas
Copy link

Hi @mayankbansal018, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Mayank Bansal). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@@ -252,6 +252,22 @@ function Publish-Package
Write-Log "Publish-Package: Complete. {$(Get-ElapsedTime($timer))}"
}

function Patch-Publish-Package
Copy link
Contributor

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.

$fullCLRPackageDir = Get-FullCLRPackageDirectory
$coreCLRPackageDir = Get-CoreCLRPackageDirectory

$platformAbstraction = Join-Path $env:TP_ROOT_DIR "src\Microsoft.TestPlatform.PlatformAbstractions\bin\$TPB_Configuration"
Copy link
Contributor

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">
Copy link
Contributor

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?

Copy link
Contributor Author

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
{
//
Copy link
Contributor

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
Copy link
Contributor

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?

@codito
Copy link
Contributor

codito commented Jan 31, 2017

Remove ProjectGuid from PlatformAbstractions csproj.

@@ -37,7 +34,7 @@ public class RollingFileTraceListener : TextWriterTraceListener
{
if (string.IsNullOrWhiteSpace(fileName))
{
throw new ArgumentException(Resources.CannotBeNullOrEmpty, nameof(fileName));
throw new ArgumentException(nameof(fileName));
Copy link
Contributor

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>
Copy link
Contributor

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\" />
Copy link
Contributor

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.

@@ -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\" />
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor

@codito codito left a 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
Copy link
Contributor

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)
Copy link
Contributor

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
Copy link
Contributor

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))
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

@codito codito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With few suggestions

@codito
Copy link
Contributor

codito commented Feb 1, 2017

@mayankbansal018 please ensure sign.proj includes the new assemblies. It will break TestPlatform.CI.Real otherwise.

@mayankbansal018 mayankbansal018 merged commit 92b930d into microsoft:master Feb 7, 2017
@mayankbansal018 mayankbansal018 deleted the migration_netstandard1.4 branch August 1, 2017 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants