-
Notifications
You must be signed in to change notification settings - Fork 243
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
fix(dotnet/analyzer): remove dependency on Runtime #927
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f22c9a0
fix(dotnet/analyzer): remove dependency on Runtime
RomainMuller b417705
relax runtime version constraint
RomainMuller 3e9c2da
Merge branch 'master' into rmuller/analyzer-dependency
RomainMuller bc59e08
fix test expectations
RomainMuller 5d2ed53
Merge branch 'master' into rmuller/analyzer-dependency
RomainMuller 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 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
2 changes: 1 addition & 1 deletion
2
packages/jsii-dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests.sln
This file contains 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 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 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 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
115 changes: 115 additions & 0 deletions
115
...-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/.jsii
This file contains 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,115 @@ | ||
{ | ||
"author": { | ||
"name": "Amazon Web Services", | ||
"organization": true, | ||
"roles": [ | ||
"author" | ||
], | ||
"url": "https://aws.amazon.com" | ||
}, | ||
"description": "An example transitive dependency for jsii-calc.", | ||
"homepage": "https://github.com/aws/jsii", | ||
"jsiiVersion": "0.20.0", | ||
"license": "Apache-2.0", | ||
"name": "@scope/jsii-calc-base-of-base", | ||
"repository": { | ||
"directory": "packages/jsii-calc-base-of-base", | ||
"type": "git", | ||
"url": "https://github.com/aws/jsii.git" | ||
}, | ||
"schema": "jsii/0.10.0", | ||
"targets": { | ||
"dotnet": { | ||
"namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", | ||
"packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" | ||
}, | ||
"java": { | ||
"maven": { | ||
"artifactId": "calculator-base-of-base", | ||
"groupId": "software.amazon.jsii.tests" | ||
}, | ||
"package": "software.amazon.jsii.tests.calculator.baseofbase" | ||
}, | ||
"js": { | ||
"npm": "@scope/jsii-calc-base-of-base" | ||
}, | ||
"python": { | ||
"distName": "scope.jsii-calc-base-of-base", | ||
"module": "scope.jsii_calc_base_of_base" | ||
} | ||
}, | ||
"types": { | ||
"@scope/jsii-calc-base-of-base.IVeryBaseInterface": { | ||
"assembly": "@scope/jsii-calc-base-of-base", | ||
"fqn": "@scope/jsii-calc-base-of-base.IVeryBaseInterface", | ||
"kind": "interface", | ||
"locationInModule": { | ||
"filename": "lib/index.ts", | ||
"line": 1 | ||
}, | ||
"methods": [ | ||
{ | ||
"abstract": true, | ||
"locationInModule": { | ||
"filename": "lib/index.ts", | ||
"line": 2 | ||
}, | ||
"name": "foo" | ||
} | ||
], | ||
"name": "IVeryBaseInterface" | ||
}, | ||
"@scope/jsii-calc-base-of-base.Very": { | ||
"assembly": "@scope/jsii-calc-base-of-base", | ||
"fqn": "@scope/jsii-calc-base-of-base.Very", | ||
"initializer": {}, | ||
"kind": "class", | ||
"locationInModule": { | ||
"filename": "lib/index.ts", | ||
"line": 9 | ||
}, | ||
"methods": [ | ||
{ | ||
"locationInModule": { | ||
"filename": "lib/index.ts", | ||
"line": 10 | ||
}, | ||
"name": "hey", | ||
"returns": { | ||
"type": { | ||
"primitive": "number" | ||
} | ||
} | ||
} | ||
], | ||
"name": "Very" | ||
}, | ||
"@scope/jsii-calc-base-of-base.VeryBaseProps": { | ||
"assembly": "@scope/jsii-calc-base-of-base", | ||
"datatype": true, | ||
"fqn": "@scope/jsii-calc-base-of-base.VeryBaseProps", | ||
"kind": "interface", | ||
"locationInModule": { | ||
"filename": "lib/index.ts", | ||
"line": 5 | ||
}, | ||
"name": "VeryBaseProps", | ||
"properties": [ | ||
{ | ||
"abstract": true, | ||
"immutable": true, | ||
"locationInModule": { | ||
"filename": "lib/index.ts", | ||
"line": 6 | ||
}, | ||
"name": "foo", | ||
"type": { | ||
"fqn": "@scope/jsii-calc-base-of-base.Very" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"version": "0.20.0", | ||
"fingerprint": "4yJsyi5ch/E1bHSJMcEEBX/WvJK/zroW/a+Ta8Tc6lk=" | ||
} |
30 changes: 30 additions & 0 deletions
30
...geId.BaseOfBasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId.csproj
This file contains 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,30 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<!-- Package Identification --> | ||
<Description>An example transitive dependency for jsii-calc.</Description> | ||
<PackageId>Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId</PackageId> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
<PackageVersion>0.20.0</PackageVersion> | ||
<!-- Additional Metadata --> | ||
<Authors>Amazon Web Services</Authors> | ||
<Company>Amazon Web Services</Company> | ||
<Language>en-US</Language> | ||
<ProjectUrl>https://github.com/aws/jsii</ProjectUrl> | ||
<RepositoryUrl>https://github.com/aws/jsii.git</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<!-- Build Configuration --> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<IncludeSymbols>true</IncludeSymbols> | ||
<IncludeSource>true</IncludeSource> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<TargetFramework>netcoreapp3.0</TargetFramework> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<EmbeddedResource Include="scope-jsii-calc-base-of-base-0.20.0.tgz" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Amazon.JSII.Runtime" Version="[0.20.0,0.21.0)" /> | ||
</ItemGroup> | ||
</Project> | ||
|
11 changes: 11 additions & 0 deletions
11
...PackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterface.cs
This file contains 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,11 @@ | ||
using Amazon.JSII.Runtime.Deputy; | ||
|
||
namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace | ||
{ | ||
[JsiiInterface(nativeType: typeof(IVeryBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base-of-base.IVeryBaseInterface")] | ||
public interface IVeryBaseInterface | ||
{ | ||
[JsiiMethod(name: "foo")] | ||
void Foo(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...geId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterfaceProxy.cs
This file contains 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,18 @@ | ||
using Amazon.JSII.Runtime.Deputy; | ||
|
||
namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace | ||
{ | ||
[JsiiTypeProxy(nativeType: typeof(IVeryBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base-of-base.IVeryBaseInterface")] | ||
internal sealed class IVeryBaseInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseInterface | ||
{ | ||
private IVeryBaseInterfaceProxy(ByRefValue reference): base(reference) | ||
{ | ||
} | ||
|
||
[JsiiMethod(name: "foo")] | ||
public void Foo() | ||
{ | ||
InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseProps.cs
This file contains 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,14 @@ | ||
using Amazon.JSII.Runtime.Deputy; | ||
|
||
namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace | ||
{ | ||
[JsiiInterface(nativeType: typeof(IVeryBaseProps), fullyQualifiedName: "@scope/jsii-calc-base-of-base.VeryBaseProps")] | ||
public interface IVeryBaseProps | ||
{ | ||
[JsiiProperty(name: "foo", typeJson: "{\"fqn\":\"@scope/jsii-calc-base-of-base.Very\"}")] | ||
Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo | ||
{ | ||
get; | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...SII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Internal/DependencyResolution/Anchor.cs
This file contains 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,9 @@ | ||
namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Internal.DependencyResolution | ||
{ | ||
public class Anchor | ||
{ | ||
public Anchor() | ||
{ | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...eId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Very.cs
This file contains 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,26 @@ | ||
using Amazon.JSII.Runtime.Deputy; | ||
|
||
namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace | ||
{ | ||
[JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very), fullyQualifiedName: "@scope/jsii-calc-base-of-base.Very")] | ||
public class Very : DeputyBase | ||
{ | ||
public Very(): base(new DeputyProps(new object[]{})) | ||
{ | ||
} | ||
|
||
protected Very(ByRefValue reference): base(reference) | ||
{ | ||
} | ||
|
||
protected Very(DeputyProps props): base(props) | ||
{ | ||
} | ||
|
||
[JsiiMethod(name: "hey", returnsJson: "{\"type\":{\"primitive\":\"number\"}}")] | ||
public virtual double Hey() | ||
{ | ||
return InvokeInstanceMethod<double>(new System.Type[]{}, new object[]{}); | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...fBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBaseProps.cs
This file contains 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,15 @@ | ||
using Amazon.JSII.Runtime.Deputy; | ||
|
||
namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace | ||
{ | ||
[JsiiByValue(fqn: "@scope/jsii-calc-base-of-base.VeryBaseProps")] | ||
public class VeryBaseProps : Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseProps | ||
{ | ||
[JsiiProperty(name: "foo", typeJson: "{\"fqn\":\"@scope/jsii-calc-base-of-base.Very\"}", isOverride: true)] | ||
public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo | ||
{ | ||
get; | ||
set; | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...PackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBasePropsProxy.cs
This file contains 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,18 @@ | ||
using Amazon.JSII.Runtime.Deputy; | ||
|
||
namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace | ||
{ | ||
[JsiiTypeProxy(nativeType: typeof(IVeryBaseProps), fullyQualifiedName: "@scope/jsii-calc-base-of-base.VeryBaseProps")] | ||
internal sealed class VeryBasePropsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseProps | ||
{ | ||
private VeryBasePropsProxy(ByRefValue reference): base(reference) | ||
{ | ||
} | ||
|
||
[JsiiProperty(name: "foo", typeJson: "{\"fqn\":\"@scope/jsii-calc-base-of-base.Very\"}")] | ||
public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo | ||
{ | ||
get => GetInstanceProperty<Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very>(); | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/AssemblyInfo.cs
This file contains 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,3 @@ | ||
using Amazon.JSII.Runtime.Deputy; | ||
|
||
[assembly: JsiiAssembly("@scope/jsii-calc-base-of-base", "0.20.0", "scope-jsii-calc-base-of-base-0.20.0.tgz")] |
2 changes: 2 additions & 0 deletions
2
...SII.Tests.CalculatorPackageId.BaseOfBasePackageId/scope-jsii-calc-base-of-base-0.20.0.tgz
This file contains 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,2 @@ | ||
Placeholder for the expected module tarball | ||
The diff-test.sh harness will replace it with the real expected tarball |
Oops, something went wrong.
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.
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.
Not sure why this needs to be PrivateAssets="all".
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.
This is part of the (Microsoft-authored) tutorial I have found... So I fixed it up to match... I reckon the reason is that the compiler actually comes with it's own and it's better to not pollute, but I could be wrong.
The reference code from Microsoft's tutorial is here:
https://github.com/dotnet/samples/blob/7b8490d7c76c8e7d73f80883b10c166967f171dd/csharp/roslyn-sdk/Tutorials/MakeConst/MakeConst/MakeConst.csproj#L26