-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dotnet/analyzer): remove dependency on Runtime (#927)
* fix(dotnet/analyzer): remove dependency on Runtime Remove the dependency from the Amazon.JSII.Analyzers package to the Amazon.JSII.Runtime package - as that dependency was not used and turned out to be a source of problems. Also - pins the version of the runtimes to the exact version (this could later be extended to a range). * relax runtime version constraint * fix test expectations
- Loading branch information
1 parent
32be0d9
commit 815b449
Showing
34 changed files
with
709 additions
and
14 deletions.
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.