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(rosetta): Rosetta is not submodule-aware #3176

Merged
merged 20 commits into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
Changes from 7 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
11 changes: 10 additions & 1 deletion packages/@jsii/spec/lib/assembly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,14 @@ export interface ReadMe {
* The difference between a top-level module (the assembly) and a submodule is
* that the submodule is annotated with its location in the repository.
*/
export type Submodule = SourceLocatable & Targetable;
export interface Submodule extends SourceLocatable, Targetable {
/**
* Identifier of the symbol that represents the root of this submodule
*
* Used to map from TypeScript code back into the assembly.
*/
symbolId?: string;
}

/**
* Versions of the JSII Assembly Specification.
Expand Down Expand Up @@ -814,6 +821,8 @@ export interface TypeBase extends Documentable, SourceLocatable {

/**
* Unique string representation of the corresponding Typescript symbol
*
* Used to map from TypeScript code back into the assembly.
*/
symbolId?: string;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/@scope/jsii-calc-lib/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"filename": "lib/index.ts",
"line": 130
},
"symbolId": "lib/submodule/index:",
"targets": {
"dotnet": {
"namespace": "Amazon.JSII.Tests.CustomSubmoduleName"
Expand Down Expand Up @@ -948,5 +949,5 @@
}
},
"version": "0.0.0",
"fingerprint": "LN1bs46m2O4aR6AhHvi6UDh/f90EoUT3n5apMPzr9+c="
"fingerprint": "JgX4YJ8W1DfgIIOzHvT0dErUeskq/BI5oZctzlqE9z4="
}
99 changes: 66 additions & 33 deletions packages/jsii-calc/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"filename": "lib/index.ts",
"line": 130
},
"symbolId": "lib/submodule/index:",
"targets": {
"dotnet": {
"namespace": "Amazon.JSII.Tests.CustomSubmoduleName"
Expand Down Expand Up @@ -185,145 +186,169 @@
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 325
}
},
"symbolId": "lib/compliance:DerivedClassHasNoProperties"
},
"jsii-calc.InterfaceInNamespaceIncludesClasses": {
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1206
}
},
"symbolId": "lib/compliance:InterfaceInNamespaceIncludesClasses"
},
"jsii-calc.InterfaceInNamespaceOnlyInterface": {
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1199
}
},
"symbolId": "lib/compliance:InterfaceInNamespaceOnlyInterface"
},
"jsii-calc.PythonSelf": {
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1090
}
},
"symbolId": "lib/compliance:PythonSelf"
},
"jsii-calc.cdk16625": {
"locationInModule": {
"filename": "lib/index.ts",
"line": 23
}
},
"symbolId": "lib/cdk16625/index:"
},
"jsii-calc.cdk16625.donotimport": {
"locationInModule": {
"filename": "lib/cdk16625/index.ts",
"line": 6
}
},
"symbolId": "lib/cdk16625/donotimport/index:"
},
"jsii-calc.composition": {
"locationInModule": {
"filename": "lib/calculator.ts",
"line": 143
}
},
"symbolId": "lib/calculator:composition"
},
"jsii-calc.module2530": {
"locationInModule": {
"filename": "lib/index.ts",
"line": 20
}
},
"symbolId": "lib/module2530/index:"
},
"jsii-calc.module2617": {
"locationInModule": {
"filename": "lib/index.ts",
"line": 16
}
},
"symbolId": "lib/module2617/index:"
},
"jsii-calc.module2647": {
"locationInModule": {
"filename": "lib/index.ts",
"line": 15
}
},
"symbolId": "lib/module2647/index:"
},
"jsii-calc.module2689": {
"locationInModule": {
"filename": "lib/index.ts",
"line": 17
}
},
"symbolId": "lib/module2689/index:"
},
"jsii-calc.module2689.methods": {
"locationInModule": {
"filename": "lib/module2689/index.ts",
"line": 8
}
},
"symbolId": "lib/module2689/methods/index:"
},
"jsii-calc.module2689.props": {
"locationInModule": {
"filename": "lib/module2689/index.ts",
"line": 9
}
},
"symbolId": "lib/module2689/props/index:"
},
"jsii-calc.module2689.retval": {
"locationInModule": {
"filename": "lib/module2689/index.ts",
"line": 10
}
},
"symbolId": "lib/module2689/retval/index:"
},
"jsii-calc.module2689.structs": {
"locationInModule": {
"filename": "lib/module2689/index.ts",
"line": 7
}
},
"symbolId": "lib/module2689/structs/index:"
},
"jsii-calc.module2692": {
"locationInModule": {
"filename": "lib/index.ts",
"line": 19
}
},
"symbolId": "lib/module2692/index:"
},
"jsii-calc.module2692.submodule1": {
"locationInModule": {
"filename": "lib/module2692/index.ts",
"line": 1
}
},
"symbolId": "lib/module2692/submodule1/index:"
},
"jsii-calc.module2692.submodule2": {
"locationInModule": {
"filename": "lib/module2692/index.ts",
"line": 2
}
},
"symbolId": "lib/module2692/submodule2/index:"
},
"jsii-calc.module2700": {
"locationInModule": {
"filename": "lib/index.ts",
"line": 21
}
},
"symbolId": "lib/module2700/index:"
},
"jsii-calc.module2702": {
"locationInModule": {
"filename": "lib/index.ts",
"line": 18
}
},
"symbolId": "lib/module2702/index:"
},
"jsii-calc.nodirect": {
"locationInModule": {
"filename": "lib/index.ts",
"line": 14
}
},
"symbolId": "lib/no-direct-types/index:"
},
"jsii-calc.nodirect.sub1": {
"locationInModule": {
"filename": "lib/no-direct-types/index.ts",
"line": 3
}
},
"symbolId": "lib/no-direct-types/sub1/index:"
},
"jsii-calc.nodirect.sub2": {
"locationInModule": {
"filename": "lib/no-direct-types/index.ts",
"line": 4
}
},
"symbolId": "lib/no-direct-types/sub2/index:"
},
"jsii-calc.onlystatic": {
"locationInModule": {
"filename": "lib/index.ts",
"line": 13
}
},
"symbolId": "lib/only-static/index:"
},
"jsii-calc.submodule": {
"locationInModule": {
Expand All @@ -332,19 +357,22 @@
},
"readme": {
"markdown": "Read you, read me\n=================\n\nThis is the readme of the `jsii-calc.submodule` module.\n"
}
},
"symbolId": "lib/submodule/index:"
},
"jsii-calc.submodule.back_references": {
"locationInModule": {
"filename": "lib/submodule/index.ts",
"line": 7
}
},
"symbolId": "lib/submodule/refers-to-parent/index:"
},
"jsii-calc.submodule.child": {
"locationInModule": {
"filename": "lib/submodule/index.ts",
"line": 1
}
},
"symbolId": "lib/submodule/child/index:"
},
"jsii-calc.submodule.isolated": {
"locationInModule": {
Expand All @@ -353,31 +381,36 @@
},
"readme": {
"markdown": "Read you, read me\n=================\n\nThis is the readme of the `jsii-calc.submodule.isolated` module.\n"
}
},
"symbolId": "lib/submodule/isolated:"
},
"jsii-calc.submodule.nested_submodule": {
"locationInModule": {
"filename": "lib/submodule/nested_submodule.ts",
"line": 4
}
},
"symbolId": "lib/submodule/nested_submodule:nested_submodule"
},
"jsii-calc.submodule.nested_submodule.deeplyNested": {
"locationInModule": {
"filename": "lib/submodule/nested_submodule.ts",
"line": 6
}
},
"symbolId": "lib/submodule/nested_submodule:nested_submodule.deeplyNested"
},
"jsii-calc.submodule.param": {
"locationInModule": {
"filename": "lib/submodule/index.ts",
"line": 3
}
},
"symbolId": "lib/submodule/param/index:"
},
"jsii-calc.submodule.returnsparam": {
"locationInModule": {
"filename": "lib/submodule/index.ts",
"line": 4
}
},
"symbolId": "lib/submodule/returns-param/index:"
}
},
"targets": {
Expand Down Expand Up @@ -16779,5 +16812,5 @@
}
},
"version": "3.20.120",
"fingerprint": "XZczlgiEPAQC/n86Dqa40vixNH4txnPoyuF1Q+jR6I0="
"fingerprint": "FFTxJ+1vifGoRxoZqvPH+idnWSUcc4pPPY7gyvZV+Bk="
}
Loading