Skip to content

Commit

Permalink
feat(jsii): Further normalize assembly outputs (#177)
Browse files Browse the repository at this point in the history
Sort member arrays (`properties` and `methods`), to produce fully sorted assemblies:
1. `static` members
2. `immutable` members (only relevant for `properties`)
3. non-`optional` members (only relevant for `properties`)
4. lexicographically sorted

Also, stop emitting step builders for interfaces in Java (they break due to the property order change the above causes). Conveniently, this fixes #60.
  • Loading branch information
RomainMuller committed Aug 14, 2018
1 parent 46f1771 commit de3f062
Show file tree
Hide file tree
Showing 108 changed files with 2,691 additions and 2,517 deletions.
4 changes: 2 additions & 2 deletions packages/jsii-calc-base-of-base/test/assembly.jsii
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"fingerprint": "I/HF4zJK5eV4ZLmNLDEzShkHVsxngX3K/y2SEYjXsxU=",
"author": {
"name": "Amazon Web Services",
"organization": true,
Expand Down Expand Up @@ -68,5 +67,6 @@
]
}
},
"version": "0.6.4"
"version": "0.6.4",
"fingerprint": "I/HF4zJK5eV4ZLmNLDEzShkHVsxngX3K/y2SEYjXsxU="
}
4 changes: 2 additions & 2 deletions packages/jsii-calc-base/test/assembly.jsii
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"fingerprint": "b+UZfT/No0vxqTQ1n3lIsyw7olqARDbeGj853lNFoE8=",
"author": {
"name": "Amazon Web Services",
"organization": true,
Expand Down Expand Up @@ -100,5 +99,6 @@
]
}
},
"version": "0.6.4"
"version": "0.6.4",
"fingerprint": "b+UZfT/No0vxqTQ1n3lIsyw7olqARDbeGj853lNFoE8="
}
24 changes: 12 additions & 12 deletions packages/jsii-calc-lib/test/assembly.jsii
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"fingerprint": "qwjIHOtTOSWOv5qzVdHj4SDgxmnWYsacVvR7BkAVlo8=",
"author": {
"name": "Amazon Web Services",
"organization": true,
Expand Down Expand Up @@ -125,20 +124,20 @@
"properties": [
{
"docs": {
"comment": "A string value"
"comment": "An awesome number value"
},
"name": "astring",
"name": "anumber",
"type": {
"primitive": "string"
"primitive": "number"
}
},
{
"docs": {
"comment": "An awesome number value"
"comment": "A string value"
},
"name": "anumber",
"name": "astring",
"type": {
"primitive": "number"
"primitive": "string"
}
},
{
Expand Down Expand Up @@ -187,20 +186,20 @@
"properties": [
{
"docs": {
"comment": "The number."
"comment": "The number multiplied by 2."
},
"immutable": true,
"name": "value",
"name": "doubleValue",
"type": {
"primitive": "number"
}
},
{
"docs": {
"comment": "The number multiplied by 2."
"comment": "The number."
},
"immutable": true,
"name": "doubleValue",
"name": "value",
"type": {
"primitive": "number"
}
Expand Down Expand Up @@ -315,5 +314,6 @@
]
}
},
"version": "0.6.4"
"version": "0.6.4",
"fingerprint": "MHdlbqyf1RV6moIHslfpKnl7yjQoYVvvZLfxFXWihrU="
}
Loading

0 comments on commit de3f062

Please sign in to comment.