From 647dd3d3f4d6585e42e3ae2dd4bc24ec5087b69a Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 12:35:23 -0700 Subject: [PATCH 1/8] m --- .../action.yml | 42 +++++++++++++++---- .github/workflows/ci_codegen.yml | 3 -- submodules/MaterialProviders | 2 +- submodules/smithy-dafny | 2 +- 4 files changed, 36 insertions(+), 13 deletions(-) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index d4df6ab8a..458d1640c 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -8,14 +8,40 @@ description: "Install Java package dependencies required to run Smithy-Dafny cod runs: using: "composite" steps: - - name: Install smithy-dafny-codegen Rust dependencies locally - uses: gradle/gradle-build-action@v2 + - name: Setup Java 17 for codegen + uses: actions/setup-java@v3 with: - arguments: :codegen-client:pTML :codegen-core:pTML :rust-runtime:pTML - build-root-directory: submodules/smithy-dafny/smithy-dafny-codegen-modules/smithy-rs + distribution: "corretto" + java-version: "17" - - name: Install smithy-dafny-codegen Python dependencies locally - uses: gradle/gradle-build-action@v2 + - name: Install smithy-dafny-codegen dependencies locally + shell: bash + run: | + make -C smithy-dafny mvn_local_deploy_polymorph_dependencies + + - name: Setup Python, black, and docformatter for code formatting + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - shell: bash + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade black + python -m pip install --upgrade docformatter + + - name: Install Go + uses: actions/setup-go@v5 with: - arguments: :smithy-python-codegen:pTML - build-root-directory: submodules/smithy-dafny/codegen/smithy-dafny-codegen-modules/smithy-python/codegen + go-version: "1.23" + + - name: Install Go imports + shell: bash + run: | + go install golang.org/x/tools/cmd/goimports@latest + + # Without this the if-dafny-at-least command includes "Downloading ..." output + - name: Arbitrary makefile target to force downloading Gradle + shell: bash + run: | + make -C StandardLibrary setup_net \ No newline at end of file diff --git a/.github/workflows/ci_codegen.yml b/.github/workflows/ci_codegen.yml index 38f11beb0..311559b04 100644 --- a/.github/workflows/ci_codegen.yml +++ b/.github/workflows/ci_codegen.yml @@ -60,9 +60,6 @@ jobs: - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - - name: Install Smithy-Dafny codegen dependencies - uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - - uses: ./.github/actions/polymorph_codegen with: dafny: ${{ inputs.dafny }} diff --git a/submodules/MaterialProviders b/submodules/MaterialProviders index f033b9157..1fa8a4a67 160000 --- a/submodules/MaterialProviders +++ b/submodules/MaterialProviders @@ -1 +1 @@ -Subproject commit f033b915701eaa53d97019af61b96a51fed43483 +Subproject commit 1fa8a4a67485f32b01adb3b250e783a59c58bf1e diff --git a/submodules/smithy-dafny b/submodules/smithy-dafny index 2f83e28ad..feacf4a60 160000 --- a/submodules/smithy-dafny +++ b/submodules/smithy-dafny @@ -1 +1 @@ -Subproject commit 2f83e28ad9532b24c93d2229476c9a268355d338 +Subproject commit feacf4a60854532f16da2ef7c8a5d310116dc951 From 55d63eba52ae9b1ad8e59c79fb937fae2f065f4a Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 12:36:30 -0700 Subject: [PATCH 2/8] m --- submodules/MaterialProviders | 2 +- submodules/smithy-dafny | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/MaterialProviders b/submodules/MaterialProviders index 1fa8a4a67..f033b9157 160000 --- a/submodules/MaterialProviders +++ b/submodules/MaterialProviders @@ -1 +1 @@ -Subproject commit 1fa8a4a67485f32b01adb3b250e783a59c58bf1e +Subproject commit f033b915701eaa53d97019af61b96a51fed43483 diff --git a/submodules/smithy-dafny b/submodules/smithy-dafny index feacf4a60..2f83e28ad 160000 --- a/submodules/smithy-dafny +++ b/submodules/smithy-dafny @@ -1 +1 @@ -Subproject commit feacf4a60854532f16da2ef7c8a5d310116dc951 +Subproject commit 2f83e28ad9532b24c93d2229476c9a268355d338 From 932ccf0aa4d4708e6d65bb7d7edce343bd712383 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 12:38:36 -0700 Subject: [PATCH 3/8] m --- .../install_smithy_dafny_codegen_dependencies/action.yml | 2 +- submodules/MaterialProviders | 2 +- submodules/smithy-dafny | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index 458d1640c..28ae19dd6 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -44,4 +44,4 @@ runs: - name: Arbitrary makefile target to force downloading Gradle shell: bash run: | - make -C StandardLibrary setup_net \ No newline at end of file + make -C submodules/MaterialProviders/StandardLibrary setup_net \ No newline at end of file diff --git a/submodules/MaterialProviders b/submodules/MaterialProviders index f033b9157..1fa8a4a67 160000 --- a/submodules/MaterialProviders +++ b/submodules/MaterialProviders @@ -1 +1 @@ -Subproject commit f033b915701eaa53d97019af61b96a51fed43483 +Subproject commit 1fa8a4a67485f32b01adb3b250e783a59c58bf1e diff --git a/submodules/smithy-dafny b/submodules/smithy-dafny index 2f83e28ad..feacf4a60 160000 --- a/submodules/smithy-dafny +++ b/submodules/smithy-dafny @@ -1 +1 @@ -Subproject commit 2f83e28ad9532b24c93d2229476c9a268355d338 +Subproject commit feacf4a60854532f16da2ef7c8a5d310116dc951 From d6228f83a84f406f348d1a17f6a9d79f138eab5b Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 12:43:03 -0700 Subject: [PATCH 4/8] m --- .../install_smithy_dafny_codegen_dependencies/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index 28ae19dd6..7f2fadde8 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -17,7 +17,7 @@ runs: - name: Install smithy-dafny-codegen dependencies locally shell: bash run: | - make -C smithy-dafny mvn_local_deploy_polymorph_dependencies + make -C submodules/smithy-dafny mvn_local_deploy_polymorph_dependencies - name: Setup Python, black, and docformatter for code formatting uses: actions/setup-python@v4 From 0d12a6fdaa61eda303d8153f4d4ef8af2fe0bca7 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 12:48:12 -0700 Subject: [PATCH 5/8] m --- .github/workflows/ci_examples_java.yml | 1 - .github/workflows/ci_examples_net.yml | 1 - .github/workflows/ci_test_java.yml | 1 - .github/workflows/ci_test_latest_released_mpl_java.yml | 1 - .github/workflows/ci_test_net.yml | 1 - .github/workflows/ci_test_vector_java.yml | 1 - .github/workflows/ci_test_vector_net.yml | 1 - .github/workflows/library_dafny_verification.yml | 1 - 8 files changed, 8 deletions(-) diff --git a/.github/workflows/ci_examples_java.yml b/.github/workflows/ci_examples_java.yml index 13fc60abb..2499ac6ae 100644 --- a/.github/workflows/ci_examples_java.yml +++ b/.github/workflows/ci_examples_java.yml @@ -72,7 +72,6 @@ jobs: sed "s/mplDependencyJavaVersion=.*/mplDependencyJavaVersion=${{inputs.mpl-version}}/g" project.properties > project.properties2; mv project.properties2 project.properties - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary diff --git a/.github/workflows/ci_examples_net.yml b/.github/workflows/ci_examples_net.yml index fc42ec70f..f9d85e050 100644 --- a/.github/workflows/ci_examples_net.yml +++ b/.github/workflows/ci_examples_net.yml @@ -60,7 +60,6 @@ jobs: git rev-parse HEAD - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary diff --git a/.github/workflows/ci_test_java.yml b/.github/workflows/ci_test_java.yml index fd701c52a..34d8c1d08 100644 --- a/.github/workflows/ci_test_java.yml +++ b/.github/workflows/ci_test_java.yml @@ -66,7 +66,6 @@ jobs: sed "s/mplDependencyJavaVersion=.*/mplDependencyJavaVersion=${{inputs.mpl-version}}/g" project.properties > project.properties2; mv project.properties2 project.properties - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary diff --git a/.github/workflows/ci_test_latest_released_mpl_java.yml b/.github/workflows/ci_test_latest_released_mpl_java.yml index 0b923e36c..79b193440 100644 --- a/.github/workflows/ci_test_latest_released_mpl_java.yml +++ b/.github/workflows/ci_test_latest_released_mpl_java.yml @@ -59,7 +59,6 @@ jobs: dafny-version: ${{ needs.getVersion.outputs.version }} - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary diff --git a/.github/workflows/ci_test_net.yml b/.github/workflows/ci_test_net.yml index 9f86694f9..6c90f0e52 100644 --- a/.github/workflows/ci_test_net.yml +++ b/.github/workflows/ci_test_net.yml @@ -61,7 +61,6 @@ jobs: git rev-parse HEAD - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary diff --git a/.github/workflows/ci_test_vector_java.yml b/.github/workflows/ci_test_vector_java.yml index 54bf63ca3..d0396f2b4 100644 --- a/.github/workflows/ci_test_vector_java.yml +++ b/.github/workflows/ci_test_vector_java.yml @@ -80,7 +80,6 @@ jobs: sed "s/mplDependencyJavaVersion=.*/mplDependencyJavaVersion=${{inputs.mpl-version}}/g" project.properties > project.properties2; mv project.properties2 project.properties - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary diff --git a/.github/workflows/ci_test_vector_net.yml b/.github/workflows/ci_test_vector_net.yml index 91663fea8..c31ca8969 100644 --- a/.github/workflows/ci_test_vector_net.yml +++ b/.github/workflows/ci_test_vector_net.yml @@ -71,7 +71,6 @@ jobs: git rev-parse HEAD - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary diff --git a/.github/workflows/library_dafny_verification.yml b/.github/workflows/library_dafny_verification.yml index 30915f103..1759804e1 100644 --- a/.github/workflows/library_dafny_verification.yml +++ b/.github/workflows/library_dafny_verification.yml @@ -79,7 +79,6 @@ jobs: dotnet-version: "6.0.x" - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary From d5c068d5c23d837217cc7990f95f1ec156113728 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 12:53:03 -0700 Subject: [PATCH 6/8] m --- .github/workflows/test_vector_verification.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test_vector_verification.yml b/.github/workflows/test_vector_verification.yml index 7170063d6..d00b1fdc2 100644 --- a/.github/workflows/test_vector_verification.yml +++ b/.github/workflows/test_vector_verification.yml @@ -69,7 +69,6 @@ jobs: dotnet-version: "6.0.x" - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary From 08c15fa2d9714a6b20764bda0e6a5f1f16297da5 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 12:57:33 -0700 Subject: [PATCH 7/8] m --- .../install_smithy_dafny_codegen_dependencies/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index 7f2fadde8..3a5178153 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -44,4 +44,4 @@ runs: - name: Arbitrary makefile target to force downloading Gradle shell: bash run: | - make -C submodules/MaterialProviders/StandardLibrary setup_net \ No newline at end of file + make -C submodules/MaterialProviders/StandardLibrary setup_net From b9629689e919105b6cc7eb8ffdfd852dd390a21c Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 14:34:15 -0700 Subject: [PATCH 8/8] m --- submodules/MaterialProviders | 2 +- submodules/smithy-dafny | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/MaterialProviders b/submodules/MaterialProviders index 1fa8a4a67..f033b9157 160000 --- a/submodules/MaterialProviders +++ b/submodules/MaterialProviders @@ -1 +1 @@ -Subproject commit 1fa8a4a67485f32b01adb3b250e783a59c58bf1e +Subproject commit f033b915701eaa53d97019af61b96a51fed43483 diff --git a/submodules/smithy-dafny b/submodules/smithy-dafny index feacf4a60..2f83e28ad 160000 --- a/submodules/smithy-dafny +++ b/submodules/smithy-dafny @@ -1 +1 @@ -Subproject commit feacf4a60854532f16da2ef7c8a5d310116dc951 +Subproject commit 2f83e28ad9532b24c93d2229476c9a268355d338