-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: copy over raw smithy-go codegen (#655) Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> * feat: remove not required codegen features (#657) Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> * fix: prettier formatting (#659) Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> * feat: modify smithy-go for smithy-dafny (#658) * feat: modify smithy-go for smithy-dafny * Update codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/codegen/AddOperationShapes.java Co-authored-by: Lucas McDonald <lucasmcdonald3@gmail.com> --------- Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> Co-authored-by: Lucas McDonald <lucasmcdonald3@gmail.com> * feat: Go nameresolvers (#667) Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> * feat: Adds shape visitors for local service (#672) * feat: Adds shape visitors for local service * fix: PR Comments * fix: PR Comments --------- Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> * feat: Adds local service generators (#681) Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> * feat: adds aws-sdk shapevisitors (#679) * feat: Adds shape visitors for local service * fix: PR Comments * fix: PR Comments * feat: adds aws-sdk shape visitors * fix: Remove timestamp shape from localservice visitors * fix: PR comments --------- Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> * feat: adds aws-sdk service generators (#721) * feat: Adds shape visitors for local service * fix: PR Comments * fix: PR Comments * feat: adds aws-sdk shape visitors * fix: Remove timestamp shape from localservice visitors * fix: PR comments * feat: adds aws-sdk service generators --------- Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> * feat: Merge from Golang/dev (#732) Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> * feat: smithy-go (#734) * feat: Merge from Golang/dev * feat: smithy-go * Update codegen/smithy-dafny-codegen/build.gradle.kts Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com> * Update codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/codegen/ValidationGenerator.java Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com> * Update codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/codegen/ValidationGenerator.java Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com> * fix: PR comments --------- Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com> * feat: smithy-go TestModels (#735) * feat: smithy-go TestModels * feat: smithy-go TestModels * feat: smithy-go (#734) * feat: Merge from Golang/dev * feat: smithy-go * Update codegen/smithy-dafny-codegen/build.gradle.kts Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com> * Update codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/codegen/ValidationGenerator.java Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com> * Update codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/codegen/ValidationGenerator.java Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com> * fix: PR comments --------- Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com> * fix: PR comments --------- Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com> * feat: Go Tests, CI, and Makefile (#736) * feat: Go Tests, CI, and Makefile * Update .github/workflows/test_models_go_tests.yml Co-authored-by: Robin Salkeld <salkeldr@amazon.com> * fix: PR comments * fix: enable aws-sdk/*v2 tests --------- Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> Co-authored-by: Robin Salkeld <salkeldr@amazon.com> * fix: PR comments --------- Co-authored-by: Shubham Chaturvedi <scchatur@amazon.com> Co-authored-by: Lucas McDonald <lucasmcdonald3@gmail.com> Co-authored-by: Tony Knapp <5892063+texastony@users.noreply.github.com> Co-authored-by: Robin Salkeld <salkeldr@amazon.com>
- Loading branch information
1 parent
c06e2c0
commit b0ea467
Showing
203 changed files
with
18,483 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Library Go tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
dafny: | ||
description: "The Dafny version to run" | ||
required: true | ||
type: string | ||
num_shards: | ||
required: false | ||
type: number | ||
default: 5 | ||
|
||
jobs: | ||
populate-matrix-dimensions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Populate shard list | ||
id: populate-shard-list | ||
run: echo "shard-list=[`seq -s , 1 ${{ inputs.num_shards }}`]" >> $GITHUB_OUTPUT | ||
outputs: | ||
shard-list: ${{ steps.populate-shard-list.outputs.shard-list }} | ||
testGo: | ||
needs: populate-matrix-dimensions | ||
strategy: | ||
fail-fast: false # at least for development; see all errors | ||
matrix: | ||
shard: ${{ fromJson(needs.populate-matrix-dimensions.outputs.shard-list) }} | ||
runs-on: "ubuntu-latest" | ||
permissions: | ||
id-token: write | ||
contents: read | ||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
DOTNET_NOLOGO: 1 | ||
steps: | ||
- name: Support longpaths on Git checkout | ||
run: | | ||
git config --global core.longpaths true | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-region: us-west-2 | ||
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-PolymorphTestModels-Role-us-west-2 | ||
role-session-name: PythonTests | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
# TODO: Use the released version once all the Dafny issues aew fixed. | ||
- name: Setup Dafny | ||
uses: dafny-lang/setup-dafny-action@v1.7.0 | ||
with: | ||
dafny-version: "nightly-2024-12-04-bf1aac6" | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.23" | ||
|
||
- name: Install Go imports | ||
run: | | ||
go install golang.org/x/tools/cmd/goimports@latest | ||
- name: Setup Java 17 for codegen | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "corretto" | ||
java-version: 17 | ||
|
||
- name: Install Smithy-Dafny codegen dependencies | ||
uses: ./.github/actions/install_smithy_dafny_codegen_dependencies | ||
|
||
- name: Install smithy-dafny-codegen locally | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: :smithy-dafny-codegen:pTML | ||
build-root-directory: codegen | ||
|
||
- name: Execute smithy-dafny-codegen-test tests | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
JUNIT_SHARD: ${{ matrix.shard }} | ||
JUNIT_SHARD_COUNT: ${{ inputs.num_shards }} | ||
with: | ||
arguments: :smithy-dafny-codegen-test:test --tests '*smithygo*' --info | ||
build-root-directory: codegen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
TestModels/Aggregate/runtimes/go/ImplementationFromDafny-go/go.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module github.com/smithy-lang/smithy-dafny/TestModels/Aggregate | ||
|
||
go 1.23.0 | ||
|
||
require github.com/dafny-lang/DafnyStandardLibGo v0.0.0 | ||
|
||
require github.com/dafny-lang/DafnyRuntimeGo/v4 v4.9.1 | ||
|
||
replace github.com/dafny-lang/DafnyStandardLibGo => ../../../../dafny-dependencies/StandardLibrary/runtimes/go/ImplementationFromDafny-go/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module github.com/smithy-lang/smithy-dafny/TestModels/Aggregate/test | ||
|
||
go 1.23.0 | ||
|
||
require github.com/dafny-lang/DafnyStandardLibGo v0.0.0 | ||
|
||
require ( | ||
github.com/dafny-lang/DafnyRuntimeGo/v4 v4.9.1 | ||
github.com/smithy-lang/smithy-dafny/TestModels/Aggregate v0.0.0 | ||
) | ||
|
||
replace github.com/smithy-lang/smithy-dafny/TestModels/Aggregate v0.0.0 => ../ImplementationFromDafny-go | ||
replace github.com/dafny-lang/DafnyStandardLibGo => ../../../../dafny-dependencies/StandardLibrary/runtimes/go/ImplementationFromDafny-go/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CORES=2 | ||
|
||
ENABLE_EXTERN_PROCESSING=1 | ||
|
||
include ../SharedMakefile.mk | ||
|
||
PROJECT_SERVICES := \ | ||
SimpleCallingawssdkfromlocalservice | ||
|
||
PROJECT_DEPENDENCIES := \ | ||
aws-sdks/kmsv2 \ | ||
aws-sdks/ddbv2 | ||
|
||
PROJECT_INDEX := \ | ||
aws-sdks/kmsv2/src/Index.dfy \ | ||
aws-sdks/ddbv2/src/Index.dfy | ||
|
||
SERVICE_NAMESPACE_SimpleCallingawssdkfromlocalservice=simple.callingawssdkfromlocalservice | ||
|
||
SERVICE_DEPS_SimpleCallingawssdkfromlocalservice := \ | ||
aws-sdks/kmsv2 \ | ||
aws-sdks/ddbv2 | ||
|
||
SMITHY_DEPS=dafny-dependencies/Model/traits.smithy | ||
|
||
# Constants for languages that drop extern names (Python, Go) | ||
|
||
TYPES_FILE_PATH=Model/SimpleCallingawssdkfromlocalserviceTypes.dfy | ||
TYPES_FILE_WITH_EXTERN_STRING="module {:extern \"simple.callingawssdkfromlocalservice.internaldafny.types\" } SimpleCallingawssdkfromlocalserviceTypes" | ||
TYPES_FILE_WITHOUT_EXTERN_STRING="module SimpleCallingawssdkfromlocalserviceTypes" | ||
|
||
INDEX_FILE_PATH=src/Index.dfy | ||
INDEX_FILE_WITH_EXTERN_STRING="module {:extern \"simple.callingawssdkfromlocalservice.internaldafny\" } SimpleCallingawssdkfromlocalservice refines AbstractSimpleCallingawssdkfromlocalserviceService {" | ||
INDEX_FILE_WITHOUT_EXTERN_STRING="module SimpleCallingawssdkfromlocalservice refines AbstractSimpleCallingawssdkfromlocalserviceService {" | ||
|
||
WRAPPED_INDEX_FILE_PATH=src/WrappedSimpleCallingawssdkfromlocalserviceImpl.dfy | ||
WRAPPED_INDEX_FILE_WITH_EXTERN_STRING="module {:extern \"simple.callingawssdkfromlocalservice.internaldafny.wrapped\"} WrappedSimpleCallingawssdkfromlocalserviceService refines WrappedAbstractSimpleCallingawssdkfromlocalserviceService {" | ||
WRAPPED_INDEX_FILE_WITHOUT_EXTERN_STRING="module WrappedSimpleCallingawssdkfromlocalserviceService refines WrappedAbstractSimpleCallingawssdkfromlocalserviceService {" | ||
|
||
# Go | ||
|
||
GO_DEPENDENCY_MODULE_NAMES := \ | ||
--dependency-library-name=com.amazonaws.kms=github.com/smithy-lang/smithy-dafny/kmsv2 \ | ||
--dependency-library-name=com.amazonaws.dynamodb=github.com/smithy-lang/smithy-dafny/ddbv2 \ | ||
--dependency-library-name=sdk.com.amazonaws.dynamodb=github.com/aws/aws-sdk-go-v2/service/dynamodb \ | ||
--dependency-library-name=sdk.com.amazonaws.kms=github.com/aws/aws-sdk-go-v2/service/kms | ||
|
||
GO_MODULE_NAME="github.com/smithy-lang/smithy-dafny/TestModels/CallingAWSSDKFromLocalService" | ||
|
||
TRANSLATION_RECORD_GO := \ | ||
dafny-dependencies/StandardLibrary/runtimes/go/ImplementationFromDafny-go/ImplementationFromDafny-go.dtr \ | ||
aws-sdks/kmsv2/runtimes/go/ImplementationFromDafny-go/ImplementationFromDafny-go.dtr \ | ||
aws-sdks/ddbv2/runtimes/go/ImplementationFromDafny-go/ImplementationFromDafny-go.dtr | ||
|
Oops, something went wrong.