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

fix(jsii): flatten out dependency list #454

Merged
merged 8 commits into from
Apr 15, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"private": true,
"license": "Apache-2.0",
"devDependencies": {
"lerna": "^3.13.1",
"nodeunit": "^0.11.3",
"nyc": "^13.3.0",
"tslint": "^5.15.0",
"typescript": "^3.4.2"
}
"private": true,
"license": "Apache-2.0",
"devDependencies": {
"lerna": "^3.13.1",
"nodeunit": "^0.11.3",
"nyc": "^13.3.0",
"tslint": "^5.15.0",
"typescript": "^3.4.2"
},
"repository": {
"type": "git",
"url": "https://github.com/awslabs/jsii.git"
}
}
4 changes: 4 additions & 0 deletions packages/jsii-calc-base-of-base/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export interface IVeryBaseInterface {
foo(): void;
}

export interface VeryBaseProps {
readonly foo: Very;
}
Expand Down
30 changes: 25 additions & 5 deletions packages/jsii-calc-base-of-base/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,40 @@
"sphinx": {}
},
"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": 5
"line": 9
},
"methods": [
{
"locationInModule": {
"filename": "lib/index.ts",
"line": 6
"line": 10
},
"name": "hey",
"returns": {
Expand All @@ -71,7 +91,7 @@
"kind": "interface",
"locationInModule": {
"filename": "lib/index.ts",
"line": 1
"line": 5
},
"name": "VeryBaseProps",
"properties": [
Expand All @@ -80,7 +100,7 @@
"immutable": true,
"locationInModule": {
"filename": "lib/index.ts",
"line": 2
"line": 6
},
"name": "foo",
"type": {
Expand All @@ -91,5 +111,5 @@
}
},
"version": "0.9.0",
"fingerprint": "1O+di7RZanglLmeCs57JLdO5m98kRnkL4uLPnDbm/z4="
"fingerprint": "ENFUcMchPwpuq+F97Ft6h/qSsOv03zzW/rOn+EpnPkM="
}
6 changes: 5 additions & 1 deletion packages/jsii-calc-base/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { VeryBaseProps } from '@scope/jsii-calc-base-of-base';
import { IVeryBaseInterface, VeryBaseProps } from '@scope/jsii-calc-base-of-base';

/**
* A base class.
Expand All @@ -15,3 +15,7 @@ export abstract class Base {
export interface BaseProps extends VeryBaseProps {
readonly bar: string;
}

export interface IBaseInterface extends IVeryBaseInterface {
bar(): void;
}
25 changes: 24 additions & 1 deletion packages/jsii-calc-base/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,31 @@
}
}
]
},
"@scope/jsii-calc-base.IBaseInterface": {
"assembly": "@scope/jsii-calc-base",
"fqn": "@scope/jsii-calc-base.IBaseInterface",
"interfaces": [
"@scope/jsii-calc-base-of-base.IVeryBaseInterface"
],
"kind": "interface",
"locationInModule": {
"filename": "lib/index.ts",
"line": 19
},
"methods": [
{
"abstract": true,
"locationInModule": {
"filename": "lib/index.ts",
"line": 20
},
"name": "bar"
}
],
"name": "IBaseInterface"
}
},
"version": "0.9.0",
"fingerprint": "iWT7GmFaVPERM/zg8WXtKv7ydudD28ixjJDVfms7DJ4="
"fingerprint": "hKgGmoOGm3jH3UhX4XxpFYAHHSPubsh9TCLtyGA0v7Y="
}
10 changes: 10 additions & 0 deletions packages/jsii-calc-lib/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,13 @@ export enum EnumFromScopedModule {
Value1,
Value2
}

/**
* Interface that inherits from packages 2 levels up the tree
*
* Their presence validates that .NET/Java/jsii-reflect can track all fields
* far enough up the tree.
*/
export interface IThreeLevelsInterface extends base.IBaseInterface {
baz(): void;
}
55 changes: 28 additions & 27 deletions packages/jsii-calc-lib/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,6 @@
},
"dependencies": {
"@scope/jsii-calc-base": {
"dependencies": {
"@scope/jsii-calc-base-of-base": {
"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"
},
"sphinx": {}
},
"version": "0.9.0"
}
},
"targets": {
"dotnet": {
"namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace",
Expand Down Expand Up @@ -171,6 +145,33 @@
],
"name": "IFriendly"
},
"@scope/jsii-calc-lib.IThreeLevelsInterface": {
"assembly": "@scope/jsii-calc-lib",
"docs": {
"remarks": "Their presence validates that .NET/Java/jsii-reflect can track all fields\nfar enough up the tree.",
"summary": "Interface that inherits from packages 2 levels up the tree."
},
"fqn": "@scope/jsii-calc-lib.IThreeLevelsInterface",
"interfaces": [
"@scope/jsii-calc-base.IBaseInterface"
],
"kind": "interface",
"locationInModule": {
"filename": "lib/index.ts",
"line": 108
},
"methods": [
{
"abstract": true,
"locationInModule": {
"filename": "lib/index.ts",
"line": 109
},
"name": "baz"
}
],
"name": "IThreeLevelsInterface"
},
"@scope/jsii-calc-lib.MyFirstStruct": {
"assembly": "@scope/jsii-calc-lib",
"datatype": true,
Expand Down Expand Up @@ -445,5 +446,5 @@
}
},
"version": "0.9.0",
"fingerprint": "/aA8aq2OBJL26oZOAhZj4Gi1QaKDqfEKQj3ONPxmbBM="
"fingerprint": "G+nAgUOCEq/zWtm7ln7XBsWXaH8PYIwnX3Wb0wXOi7s="
}
80 changes: 1 addition & 79 deletions packages/jsii-calc/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,6 @@
],
"dependencies": {
"@scope/jsii-calc-base": {
"dependencies": {
"@scope/jsii-calc-base-of-base": {
"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"
},
"sphinx": {}
},
"version": "0.9.0"
}
},
"targets": {
"dotnet": {
"namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace",
Expand Down Expand Up @@ -109,58 +83,6 @@
"version": "0.9.0"
},
"@scope/jsii-calc-lib": {
"dependencies": {
"@scope/jsii-calc-base": {
"dependencies": {
"@scope/jsii-calc-base-of-base": {
"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"
},
"sphinx": {}
},
"version": "0.9.0"
}
},
"targets": {
"dotnet": {
"namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace",
"packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId"
},
"java": {
"maven": {
"artifactId": "calculator-base",
"groupId": "software.amazon.jsii.tests"
},
"package": "software.amazon.jsii.tests.calculator.base"
},
"js": {
"npm": "@scope/jsii-calc-base"
},
"python": {
"distName": "scope.jsii-calc-base",
"module": "scope.jsii_calc_base"
},
"sphinx": {}
},
"version": "0.9.0"
}
},
"targets": {
"dotnet": {
"namespace": "Amazon.JSII.Tests.CalculatorNamespace.LibNamespace",
Expand Down Expand Up @@ -6637,5 +6559,5 @@
}
},
"version": "0.9.0",
"fingerprint": "Lg8wDjQSsRLa2sk8EriArt/u5aibYilCuYFRZHh02Eg="
"fingerprint": "Q+lLDSCuPcE7WXeuEPk1X81ttdU4onoyT1N8iSMXDa8="
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,31 @@
}
}
]
},
"@scope/jsii-calc-base.IBaseInterface": {
"assembly": "@scope/jsii-calc-base",
"fqn": "@scope/jsii-calc-base.IBaseInterface",
"interfaces": [
"@scope/jsii-calc-base-of-base.IVeryBaseInterface"
],
"kind": "interface",
"locationInModule": {
"filename": "lib/index.ts",
"line": 19
},
"methods": [
{
"abstract": true,
"locationInModule": {
"filename": "lib/index.ts",
"line": 20
},
"name": "bar"
}
],
"name": "IBaseInterface"
}
},
"version": "0.9.0",
"fingerprint": "iWT7GmFaVPERM/zg8WXtKv7ydudD28ixjJDVfms7DJ4="
"fingerprint": "hKgGmoOGm3jH3UhX4XxpFYAHHSPubsh9TCLtyGA0v7Y="
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Amazon.JSII.Runtime.Deputy;

namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace
{
[JsiiTypeProxy(nativeType: typeof(IIBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base.IBaseInterface")]
internal sealed class IBaseInterfaceProxy : DeputyBase, IIBaseInterface
{
private IBaseInterfaceProxy(ByRefValue reference): base(reference)
{
}

[JsiiMethod(name: "bar")]
public void Bar()
{
InvokeInstanceVoidMethod(new object[]{});
}

[JsiiMethod(name: "foo")]
public void Foo()
{
InvokeInstanceVoidMethod(new object[]{});
}
}
}
Loading