Commit 34f5452
feat: Better .NET type conversion encapsulation
Dafny has optional parameters.
Smithy-Dafny uses this feature
to produce Dafny types
that default to `:= None`.
However, the translated Dafny
does *not* support optional parameters.
This means that these optional parameters,
are _not_ interoperable in target runtimes.
.NET already deferred type conversions
of wrapped resources to the target module.
But it assumed that Dafny was overly interoperable.
This change to .NET defers all type conversion
to the module that owns the type.
This brings .NET more in line with other runtimes.
This change is not completely backwards compatible.
There are a few edge cases with orphaned types
as well as already published versions.1 parent 5fb3f25 commit 34f5452
File tree
2 files changed
+41
-2
lines changed- codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph
- smithydotnet
- utils
2 files changed
+41
-2
lines changedLines changed: 28 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
239 | 263 | | |
240 | 264 | | |
241 | 265 | | |
| |||
258 | 282 | | |
259 | 283 | | |
260 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
261 | 288 | | |
262 | 289 | | |
263 | 290 | | |
| |||
1984 | 2011 | | |
1985 | 2012 | | |
1986 | 2013 | | |
1987 | | - | |
| 2014 | + | |
1988 | 2015 | | |
1989 | 2016 | | |
1990 | 2017 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
560 | | - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
561 | 573 | | |
562 | 574 | | |
563 | 575 | | |
| |||
0 commit comments