Skip to content

Commit

Permalink
Merge branch 'Golang/dev' into rishav-add-CallingAWSSDK
Browse files Browse the repository at this point in the history
  • Loading branch information
rishav-karanjit authored Oct 3, 2024
2 parents 5c31d4a + e19aaff commit f8031b5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion SmithyDafnyMakefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ polymorph_go:
_polymorph_go: OUTPUT_GO=--output-go $(LIBRARY_ROOT)/runtimes/go/
_polymorph_go: MODULE_NAME=--library-name $(GO_MODULE_NAME)
_polymorph_go: DEPENDENCY_MODULE_NAMES = $(GO_DEPENDENCY_MODULE_NAMES)
_polymorph_go: _polymorph _mv_polymorph_go run_goimports
#TODO: Drop go_imports till Dafny bugs are fix otherwise this fails
_polymorph_go: _polymorph _mv_polymorph_go

run_goimports:
cd runtimes/go/ImplementationFromDafny-go && goimports -w .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import software.amazon.polymorph.smithygo.localservice.nameresolver.SmithyNameResolver;
import software.amazon.polymorph.smithygo.localservice.shapevisitor.DafnyToSmithyShapeVisitor;
import software.amazon.polymorph.smithygo.localservice.shapevisitor.SmithyToDafnyShapeVisitor;
import software.amazon.smithy.aws.traits.ServiceTrait;
import software.amazon.polymorph.traits.ExtendableTrait;
import software.amazon.polymorph.traits.LocalServiceTrait;
import software.amazon.polymorph.traits.ReferenceTrait;
Expand Down Expand Up @@ -1280,6 +1281,9 @@ func Error_FromDafny(err $L.Error)(error) {
if (dependencies == null) {
return;
}
var sdkId = serviceShape.hasTrait(LocalServiceTrait.class)
? serviceShape.expectTrait(LocalServiceTrait.class).getSdkId()
: serviceShape.expectTrait(ServiceTrait.class).getSdkId().toLowerCase();
for (var dep : dependencies) {
var depService = context
.model()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,7 @@ public String integerShape(IntegerShape shape) {
func() int32 {
var b = %s.(int32)
return b
}()
""".formatted(dataSource);
}()""".formatted(dataSource);
}
}

Expand Down

0 comments on commit f8031b5

Please sign in to comment.