Skip to content

Commit

Permalink
Use pipleline approach for projectAsset (#236)
Browse files Browse the repository at this point in the history
* wip

* first green test

* using pipeline in project asset

* clear obj folder

* use pipeline clean up

* change the pipeline to load previous build

* refactor heuristic for reaload analyzer result

* add ncrunch project settings

* add file lock

* remove console work-space copies

* remove workspace copy invocations

* code clean up

* refactor common code for roslynserver tests

* remove copy

* lock file async

* lock lookup as static field

* formatting

* fix test

* fix aspnet.webapi run test

* move out copy functionalities

* reuse registry

* address PR feedback for null check in compilation utility

* copies and creation of packages in tests only

* remove tests that are no longer  relevant

* change test assertion

* refactor code for console package builder configuration

* skip aspnet.webapi package tests

* address Pr comments

* PR feedback

* remove unused using statement

* changed test to use default registry

* add to dictionary

* blazor test commented as runner picks them up, add editor config
  • Loading branch information
colombod committed May 29, 2019
1 parent 2d6b98d commit acfa623
Show file tree
Hide file tree
Showing 53 changed files with 1,236 additions and 483 deletions.
31 changes: 31 additions & 0 deletions .editorconfig
@@ -0,0 +1,31 @@

[*.{c,c++,cc,cp,cpp,cu,cuh,cxx,h,hh,hpp,hxx,inc,inl,ino,ipp,mpp,proto,tpp}]
indent_style=tab
indent_size=tab
tab_width=4

[*.{asax,ascx,aspx,cs,cshtml,css,htm,html,js,jsx,master,razor,skin,ts,tsx,vb,xaml,xamlx,xoml}]
indent_style=space
indent_size=4
tab_width=4

[*.{appxmanifest,build,config,csproj,dbml,discomap,dtd,json,jsproj,lsproj,njsproj,nuspec,proj,props,resjson,resw,resx,StyleCop,targets,tasks,vbproj,xml,xsd}]
indent_style=space
indent_size=2
tab_width=2

[*]

# Microsoft .NET properties
csharp_new_line_before_members_in_object_initializers=false
csharp_preferred_modifier_order=public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion
csharp_style_var_elsewhere=true:hint
csharp_style_var_for_built_in_types=true:hint
csharp_style_var_when_type_is_apparent=true:hint
dotnet_style_predefined_type_for_locals_parameters_members=true:hint
dotnet_style_predefined_type_for_member_access=true:hint
dotnet_style_qualification_for_event=false:warning
dotnet_style_qualification_for_field=false:warning
dotnet_style_qualification_for_method=false:warning
dotnet_style_qualification_for_property=false:warning
dotnet_style_require_accessibility_modifiers=for_non_interface_members:hint
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -9,7 +9,6 @@
*.user
*.userosscache
*.sln.docstates
*NCrunch*
.trydotnet-*

# User-specific files (MonoDevelop/Xamarin Studio)
Expand Down
2 changes: 2 additions & 0 deletions DotNetTry.sln.DotSettings
@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=trydotnet/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
6 changes: 6 additions & 0 deletions DotNetTry.v3.ncrunchsolution
@@ -0,0 +1,6 @@
<SolutionConfiguration>
<Settings>
<AllowParallelTestExecution>True</AllowParallelTestExecution>
<SolutionConfigured>True</SolutionConfigured>
</Settings>
</SolutionConfiguration>
30 changes: 10 additions & 20 deletions MLS.Agent.Tests/ApiContracts/ApiOutputContractTests.cs
Expand Up @@ -9,10 +9,8 @@
using Microsoft.DotNet.Try.Protocol;
using Microsoft.DotNet.Try.Protocol.Tests;
using Recipes;
using WorkspaceServer.Tests;
using Xunit;
using Xunit.Abstractions;
using Package = WorkspaceServer.Packaging.Package;

namespace MLS.Agent.Tests.ApiContracts
{
Expand All @@ -31,12 +29,11 @@ public ApiOutputContractTests(ITestOutputHelper output) : base(output)
[Fact]
public async Task The_Run_contract_for_compiling_code_has_not_been_broken()
{
var package = await Package.Copy(await Default.ConsoleWorkspace());
var viewport = ViewportCode();

var requestJson = new WorkspaceRequest(
new Workspace(
workspaceType: package.Name,
workspaceType: "console",
buffers: new[]
{
EntrypointCode(),
Expand All @@ -55,12 +52,11 @@ public async Task The_Run_contract_for_compiling_code_has_not_been_broken()
[Fact]
public async Task The_Run_contract_for_noncompiling_code_has_not_been_broken()
{
var package = await Package.Copy(await Default.ConsoleWorkspace());
var viewport = ViewportCode("doesn't compile");

var request = new WorkspaceRequest(
new Workspace(
workspaceType: package.Name,
workspaceType: "console",
buffers: new[]
{
EntrypointCode(),
Expand All @@ -81,12 +77,11 @@ public async Task The_Run_contract_for_noncompiling_code_has_not_been_broken()
[Fact]
public async Task The_Compile_contract_for_compiling_code_has_not_been_broken()
{
var package = await Package.Copy(await Default.ConsoleWorkspace());
var viewport = ViewportCode();

var requestJson = new WorkspaceRequest(
new Workspace(
workspaceType: package.Name,
workspaceType: "console",
buffers: new[]
{
EntrypointCode(),
Expand Down Expand Up @@ -116,12 +111,11 @@ public async Task The_Compile_contract_for_compiling_code_has_not_been_broken()
[Fact]
public async Task The_Compile_contract_for_noncompiling_code_has_not_been_broken()
{
var package = await Package.Copy(await Default.ConsoleWorkspace());
var viewport = ViewportCode("doesn't compile");

var request = new WorkspaceRequest(
new Workspace(
workspaceType: package.Name,
workspaceType: "console",
buffers: new[]
{
EntrypointCode(),
Expand All @@ -142,12 +136,11 @@ public async Task The_Compile_contract_for_noncompiling_code_has_not_been_broken
[Fact]
public async Task The_Completions_contract_has_not_been_broken()
{
var package = await Package.Copy(await Default.ConsoleWorkspace());
var viewport = ViewportCode("Console.Ou$$");

var requestJson = new WorkspaceRequest(
new Workspace(
workspaceType: package.Name,
workspaceType: "console",
buffers: new[]
{
EntrypointCode(),
Expand All @@ -166,12 +159,11 @@ public async Task The_Completions_contract_has_not_been_broken()
[Fact]
public async Task The_signature_help_contract_has_not_been_broken()
{
var package = await Package.Copy(await Default.ConsoleWorkspace());
var viewport = ViewportCode("Console.Write($$);");

var requestJson = new WorkspaceRequest(
new Workspace(
workspaceType: package.Name,
workspaceType: "console",
buffers: new[]
{
EntrypointCode(),
Expand All @@ -190,10 +182,9 @@ public async Task The_signature_help_contract_has_not_been_broken()
[Fact]
public async Task The_instrumentation_contract_has_not_been_broken()
{
var package = await Package.Copy(await Default.ConsoleWorkspace());
var requestJson = new WorkspaceRequest(
new Workspace(
workspaceType: package.Name,
workspaceType: "console",
buffers: new[]
{
EntrypointCode("int a = 1; int b = 2; a = 3; b = a;")
Expand All @@ -212,10 +203,9 @@ public async Task The_instrumentation_contract_has_not_been_broken()
[Fact]
public async Task The_run_contract_with_no_instrumentation_has_not_been_broken()
{
var package = await Package.Copy(await Default.ConsoleWorkspace());
var requestJson = new WorkspaceRequest(
new Workspace(
workspaceType: package.Name,
workspaceType: "console",
buffers: new[]
{
EntrypointCode("int a = 1; int b = 2; a = 3; b = a;")
Expand Down Expand Up @@ -248,7 +238,7 @@ public static void Main()
}}
}}".EnforceLF();

MarkupTestFile.GetPosition(input, out string output, out var position);
MarkupTestFile.GetPosition(input, out var output, out var position);

return new Buffer(
"Program.cs",
Expand Down Expand Up @@ -282,7 +272,7 @@ public static object Method()
}}
}}".EnforceLF();

MarkupTestFile.GetPosition(input, out string output, out var position);
MarkupTestFile.GetPosition(input, out var output, out var position);

return new Buffer(
"ViewportCode.cs",
Expand Down

0 comments on commit acfa623

Please sign in to comment.