Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: partial @streaming blob support for Python #747

Open
wants to merge 719 commits into
base: main-1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
719 commits
Select commit Hold shift + click to select a range
bfc452f
mk
lucasmcdonald3 May 20, 2024
8323307
debug external shim
lucasmcdonald3 May 20, 2024
65a9af0
debug external shim
lucasmcdonald3 May 20, 2024
b014069
debug external shim
lucasmcdonald3 May 21, 2024
9a525ba
debug external shim
lucasmcdonald3 May 21, 2024
d203102
rename and fix
robin-aws May 21, 2024
241f7e2
Merge branch 'main-1.x' into lucmcdon/python-poc-v2
lucasmcdonald3 May 22, 2024
dc05c6c
fix smithy_to_dafny error
lucasmcdonald3 May 22, 2024
88a8aa1
Reorganize and fill in templates
robin-aws May 24, 2024
f7fcc12
More project files
robin-aws May 24, 2024
5342003
Progress
robin-aws May 24, 2024
a9cf7c3
.NET templates working
robin-aws May 24, 2024
656e9fa
Fix namespaces, start on Java
robin-aws May 24, 2024
f67b03e
Java working
robin-aws May 24, 2024
8340809
Progress on sdks working
robin-aws May 24, 2024
7f1c718
Dafn too (and refactor project.properties)
robin-aws May 25, 2024
5120586
Dafny too (and refactor project.properties)
robin-aws May 25, 2024
26c90f2
Merge branch 'robin-aws/generate-everything-mode' of github.com:robin…
robin-aws May 25, 2024
0293997
Comment
robin-aws May 25, 2024
c45fd3c
Merge branch 'robin-aws/generate-everything-mode' into robin-aws/stre…
robin-aws May 25, 2024
042a5ba
Fix model, fill in Java runtime
robin-aws May 25, 2024
e2b651b
Create directories
robin-aws May 25, 2024
8f0ffa2
Merge branch 'robin-aws/generate-everything-mode' into robin-aws/stre…
robin-aws May 25, 2024
c92b429
More Java files
robin-aws May 25, 2024
c6c154c
More notes
robin-aws May 27, 2024
e9dbf08
Teensy comment
robin-aws May 27, 2024
ead1df7
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws May 27, 2024
42f045f
Start moving code to the right places
robin-aws May 27, 2024
ced5b48
Generate Dafny Impl skeleton too (experimental)
robin-aws May 27, 2024
57c7e7b
Merge branch 'robin-aws/generate-everything-mode' into robin-aws/stre…
robin-aws May 27, 2024
fe0c86e
Regenerate
robin-aws May 27, 2024
d477d53
More notes
robin-aws May 28, 2024
367c192
wip
lucasmcdonald3 May 28, 2024
d5e3823
merge from main
lucasmcdonald3 May 28, 2024
16e1ee2
py dafny nightly
lucasmcdonald3 May 28, 2024
b9f8960
More notes
robin-aws May 28, 2024
e29bad6
cleanup a bit
lucasmcdonald3 May 29, 2024
e258104
cleanup
lucasmcdonald3 May 29, 2024
18026eb
Hacking codegen
robin-aws May 29, 2024
5d5ae44
Basic skeleton
robin-aws May 30, 2024
f9fce73
Ignore node_modules
robin-aws May 30, 2024
e7c53de
Simplification
robin-aws May 30, 2024
dc97e90
Start on JavaConversions
robin-aws May 31, 2024
236c42e
Cleanup
robin-aws May 31, 2024
7309df4
Correct Java codegen type, conversions of ByteBuffers
robin-aws May 31, 2024
2de2603
Progress, better aliases
robin-aws May 31, 2024
04de5fa
More thoughts
robin-aws May 31, 2024
213bc35
Fixes
robin-aws Jun 2, 2024
146ae7d
Add dafny-generated code so I can patch
robin-aws Jun 2, 2024
2ae1b9a
Fill out more chunking
robin-aws Jun 3, 2024
8e5493c
NEW WORLD ORDER
robin-aws Jun 5, 2024
6345075
First cut of Input/OutputStream use cases
robin-aws Jun 5, 2024
f0872b6
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Jun 7, 2024
0800f0e
PROGRESS
robin-aws Jun 7, 2024
e422e4e
Start to add dafny submodule to use standard library (not working yet)
robin-aws Jun 10, 2024
0f2c6cd
Actual Action trait definition
robin-aws Jun 10, 2024
324e879
Renaming and missing specs
robin-aws Jun 10, 2024
a2076fe
Switch back to separate Stream subtype
robin-aws Jun 11, 2024
10a5df1
common changes
lucasmcdonald3 Jun 11, 2024
e530f23
Small fixes
robin-aws Jun 11, 2024
1aa5ef7
cleanup
lucasmcdonald3 Jun 12, 2024
b9feab0
test no string enums
lucasmcdonald3 Jun 12, 2024
f57b740
cleanup
lucasmcdonald3 Jun 12, 2024
f7f1df5
note
lucasmcdonald3 Jun 12, 2024
3c4778b
cleanup plugins
lucasmcdonald3 Jun 12, 2024
60512c0
cleanup
lucasmcdonald3 Jun 12, 2024
74c1e82
debug
lucasmcdonald3 Jun 12, 2024
52f0f46
debug
lucasmcdonald3 Jun 12, 2024
a948ed0
debug
lucasmcdonald3 Jun 12, 2024
77cf6fd
fix
lucasmcdonald3 Jun 12, 2024
3ceed52
fix
lucasmcdonald3 Jun 12, 2024
891b522
DEBUG: swap escaping
lucasmcdonald3 Jun 12, 2024
5c8ea1e
DEBUG: no forward reference in unions
lucasmcdonald3 Jun 12, 2024
e43c1d6
fix
lucasmcdonald3 Jun 12, 2024
166ecb8
DEBUG: to
lucasmcdonald3 Jun 12, 2024
19330cd
DEBUG: to
lucasmcdonald3 Jun 12, 2024
bf43f25
DEBUG no None/False/True
lucasmcdonald3 Jun 13, 2024
85374db
update
lucasmcdonald3 Jun 13, 2024
a37e468
m
lucasmcdonald3 Jun 13, 2024
6112941
cleanup
lucasmcdonald3 Jun 13, 2024
bbdd36e
cleanup
lucasmcdonald3 Jun 13, 2024
7150f4f
DEBUG writeReprMembers
lucasmcdonald3 Jun 13, 2024
6ae291a
DEBUG writeReprMembers
lucasmcdonald3 Jun 13, 2024
f2c0884
more cosntraints
lucasmcdonald3 Jun 13, 2024
e6ca95a
more cosntraints
lucasmcdonald3 Jun 13, 2024
c575668
more cosntraints
lucasmcdonald3 Jun 13, 2024
6351cbd
more cosntraints
lucasmcdonald3 Jun 13, 2024
02f3d3e
more cosntraints
lucasmcdonald3 Jun 13, 2024
79470b8
more cosntraints
lucasmcdonald3 Jun 13, 2024
1c5ba5e
nope
lucasmcdonald3 Jun 13, 2024
434339a
cleanup extensions
lucasmcdonald3 Jun 13, 2024
6633264
fixes
lucasmcdonald3 Jun 13, 2024
94d2dad
cleanup shapevisitors awssdk
lucasmcdonald3 Jun 13, 2024
e613ee1
cleanup
lucasmcdonald3 Jun 13, 2024
4e3649d
cleanup extensions
lucasmcdonald3 Jun 13, 2024
cb9f4b5
cleanup
lucasmcdonald3 Jun 13, 2024
dbe6f48
cleanup
lucasmcdonald3 Jun 13, 2024
b9d3cde
mangling
lucasmcdonald3 Jun 14, 2024
0696c27
fix
lucasmcdonald3 Jun 14, 2024
8217184
fail timestamp loud
lucasmcdonald3 Jun 14, 2024
985f4ab
nits
lucasmcdonald3 Jun 17, 2024
fafae2d
fixes
lucasmcdonald3 Jun 17, 2024
00208a0
Partial progress on handling reference types (JavaConversions.dfy not…
robin-aws Jun 17, 2024
8b3aac3
Starting on composed
robin-aws Jun 17, 2024
0158cb7
fixes
lucasmcdonald3 Jun 17, 2024
ff9d412
Note
robin-aws Jun 19, 2024
4d5b78a
wip
lucasmcdonald3 Jun 20, 2024
e970f69
wip
lucasmcdonald3 Jun 20, 2024
8dd1e75
Another note
robin-aws Jun 21, 2024
93c4045
EUREKA!
robin-aws Jun 21, 2024
0222eff
First stab at enumerable DSL
robin-aws Jun 21, 2024
1be13fc
utf8
lucasmcdonald3 Jun 21, 2024
d9c4998
fixes
lucasmcdonald3 Jun 21, 2024
9cc27a2
update
lucasmcdonald3 Jun 21, 2024
8c5d267
update
lucasmcdonald3 Jun 21, 2024
e0df1eb
deps?
lucasmcdonald3 Jun 21, 2024
f34c7b3
kms
lucasmcdonald3 Jun 21, 2024
0cef964
ddb
lucasmcdonald3 Jun 21, 2024
04464ed
cleanup
lucasmcdonald3 Jun 21, 2024
855bffa
cleanup
lucasmcdonald3 Jun 21, 2024
f0f15fa
FunctionalEnumerator
robin-aws Jun 21, 2024
6a94122
Partial work on RepeatUntil
robin-aws Jun 22, 2024
fb092f2
more
lucasmcdonald3 Jun 24, 2024
ee5ab0c
mk
lucasmcdonald3 Jun 25, 2024
901eaaa
Refactor to define RepeatUntil termination metric
robin-aws Jun 29, 2024
0f9cb82
Progress on key termination lemma
robin-aws Jun 30, 2024
cdf5c2d
FIXED
robin-aws Jun 30, 2024
45fd0fb
Reorganize, start refactoring to use proof trait pattern
robin-aws Jul 5, 2024
c0972ad
type parameter fixes
robin-aws Jul 5, 2024
0a55429
Remove dafny submodule
robin-aws Jul 5, 2024
cdaceb7
Use datatypes for proofs instead
robin-aws Jul 5, 2024
ef7c0de
PROOF TRAITS FTW
robin-aws Jul 5, 2024
5c38ab8
Reorganize
robin-aws Jul 5, 2024
b700c51
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Jul 5, 2024
dddd59a
Typo
robin-aws Jul 5, 2024
6ac112b
Partially fix up JavaConversions (but disable for now)
robin-aws Jul 5, 2024
2e15a32
Codegen fixes, ForEach, mostly fix Impl.dfy
robin-aws Jul 5, 2024
45695a9
Pipeline mostly verifying
robin-aws Jul 5, 2024
7b2ab20
Add SimpleStreamingTypes.dfy for now since I have to modify it
robin-aws Jul 5, 2024
f9b8397
Progress on verifying Chunker
robin-aws Jul 5, 2024
e699e30
Merge branch 'robin-aws/streaming-test-models' of github.com:robin-aw…
robin-aws Jul 6, 2024
7d4d47d
Regenerate Dafny
robin-aws Jul 6, 2024
bec969a
Support Python
robin-aws Jul 6, 2024
91d4c19
Remove extern and WrapService
robin-aws Jul 6, 2024
a65212b
test and Python project files
robin-aws Jul 6, 2024
758ab15
Partial proof of CountBits correctness
robin-aws Jul 7, 2024
cab8eb9
Fixes and Python files
robin-aws Jul 7, 2024
acc7975
test runs but fails
robin-aws Jul 7, 2024
eab245d
Typos
robin-aws Jul 8, 2024
241b158
Good start!
robin-aws Jul 8, 2024
8993ac0
stdlib adaptors for streams and Python codegen
robin-aws Jul 8, 2024
ed3c606
WHOOPS
robin-aws Jul 9, 2024
047f5c2
Mostly fixed wrapped test
robin-aws Jul 9, 2024
63cdfe0
fix wrapped test
robin-aws Jul 9, 2024
995b2d6
Fix Pop
robin-aws Jul 9, 2024
a399715
update copy of runtime
robin-aws Jul 9, 2024
b243796
Revert "update copy of runtime"
robin-aws Jul 9, 2024
31d9c0d
Fix Folder constructor
robin-aws Jul 9, 2024
9bd50d5
Comments
robin-aws Jul 9, 2024
f7db5fd
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Nov 7, 2024
722e2f7
Regenerate
robin-aws Nov 7, 2024
3fb27d3
Nix bin
robin-aws Nov 7, 2024
f69e076
Revert unintentional changes from old branch
robin-aws Nov 7, 2024
45347f0
More
robin-aws Nov 7, 2024
75f28a3
Restore file, account for stdlib rename
robin-aws Nov 7, 2024
43c6e94
Start trying to use DafnyStandardLibraries
robin-aws Nov 8, 2024
1a2a16d
Start building separate doo file
robin-aws Nov 9, 2024
703e533
Fix options
robin-aws Nov 12, 2024
7b75c28
Correct dafny branch
robin-aws Nov 12, 2024
e386a87
Switch to using stdlibs.doo (IDE not yet working)
robin-aws Nov 12, 2024
875ec1c
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Nov 12, 2024
a288693
Wrapped test working!
robin-aws Nov 12, 2024
9f9faf4
Progress on more tests and mutability clauses
robin-aws Nov 13, 2024
9a4ce38
Relocate
robin-aws Nov 14, 2024
95575d3
Build separate doo file
robin-aws Nov 14, 2024
c86851f
Fix verify
robin-aws Nov 14, 2024
ffd8969
Naming
robin-aws Nov 21, 2024
5719e22
Merge branch 'robin-aws/use-dafny-standard-libraries' of github.com:s…
robin-aws Nov 22, 2024
fd1fd9b
Fix bad merge
robin-aws Nov 22, 2024
cfd5f9d
Starting datastream trait
robin-aws Nov 28, 2024
5498d9c
Filling out trait and enumerator adaptor
robin-aws Nov 28, 2024
b0180d4
Improve makefile
robin-aws Nov 28, 2024
8b8b585
SeqDataStream
robin-aws Nov 28, 2024
3edd74f
Got S3 test model working
robin-aws Nov 28, 2024
c00f154
Regenerate Streaming Dafny
robin-aws Nov 29, 2024
d2ce6d2
Get StreamingImpl to at least resolve
robin-aws Nov 29, 2024
a6021b0
Split off RewindableDataStream
robin-aws Nov 29, 2024
52e90ab
Separate Python shims as well
robin-aws Nov 29, 2024
e6bb4e2
Create patch file for Streaming
robin-aws Nov 29, 2024
e537f52
Whitespace
robin-aws Nov 29, 2024
1347f7c
Comments/cleanup
robin-aws Nov 29, 2024
8324109
Progress on Java
robin-aws Dec 11, 2024
67509a9
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Dec 12, 2024
28eefd8
Fix bad merge
robin-aws Dec 12, 2024
ad6cef9
1/2 rename
robin-aws Dec 12, 2024
e4af46d
2/2 rename
robin-aws Dec 12, 2024
0ff86bf
Try building on demand
robin-aws Dec 14, 2024
2029138
Avoid false positives on TestModel directories
robin-aws Dec 14, 2024
8a4c419
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Dec 14, 2024
681b607
Remove JavaConversions.dfy for now
robin-aws Dec 14, 2024
3e16d45
Revert
robin-aws Dec 18, 2024
fe79c0d
Bump rustc version to fix CI
robin-aws Dec 18, 2024
98740c7
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Dec 18, 2024
8dbb0cc
Don’t check in the doo file
robin-aws Dec 18, 2024
c157dbf
Add USE_DAFNY_STANDARD_LIBRARIES
robin-aws Dec 18, 2024
d90d725
Optional doesn’t work, just require Dafny >= 4.7.0
robin-aws Dec 18, 2024
d1055b8
Missing files
robin-aws Dec 18, 2024
db1a742
Fix Rust?
robin-aws Dec 19, 2024
1adffae
dafny submodule
robin-aws Dec 19, 2024
f253a94
Skip rustfmt for now
robin-aws Jan 6, 2025
b39160b
Merge branch 'main-1.x' into robin-aws/streaming-test-models-python
robin-aws Jan 6, 2025
d118f23
Revert bad merges/stale changes from python branch
robin-aws Jan 6, 2025
f23c910
Another one
robin-aws Jan 6, 2025
5d3b22f
Revert KMS changes
robin-aws Jan 6, 2025
cd33fa2
remove “extends object” for now, try pending branch
robin-aws Jan 8, 2025
3632846
Disabling verification to focus on Rust build for now
robin-aws Jan 8, 2025
52f490c
Possible Rust solution using sed :P
robin-aws Jan 9, 2025
451f0f7
Revert "Possible Rust solution using sed :P"
robin-aws Jan 9, 2025
f57e460
Another rustfmt
robin-aws Jan 9, 2025
4a5cd82
Move Streams to Dafny stdlib instead
robin-aws Jan 9, 2025
0c4ed58
use USE_DAFNY_STANDARD_LIBRARIES
robin-aws Jan 9, 2025
d5a3f4f
Typo
robin-aws Jan 9, 2025
089d44c
Fix $if conditions
robin-aws Jan 9, 2025
fbef7ba
Skip streaming models consistently
robin-aws Jan 9, 2025
bfed2e4
Renamings
robin-aws Jan 13, 2025
b0e094c
Remove WIP Java code (needs to be in dafny stdlibs anyway)
robin-aws Jan 13, 2025
d5c3475
Revert branch changes
robin-aws Jan 13, 2025
927f177
Back to same Dafny commit for Rust
robin-aws Jan 13, 2025
e9f3a08
testing tweaks
robin-aws Jan 13, 2025
430200f
Restore Rust
robin-aws Jan 14, 2025
733c0c7
Remove not-grep
robin-aws Jan 16, 2025
9773e5c
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Jan 16, 2025
8694844
Whoops
robin-aws Jan 20, 2025
02ad677
4.9.1
robin-aws Jan 20, 2025
8636105
Renames
robin-aws Jan 20, 2025
cbde8a2
Missing files
robin-aws Jan 20, 2025
10e7b1a
dafny submodule
robin-aws Jan 20, 2025
4b67d14
Typos
robin-aws Jan 20, 2025
5ac6c96
Debugging
robin-aws Jan 20, 2025
0c38c06
Min chunk size
robin-aws Jan 21, 2025
7833402
Remove half-baked Java support for now, cleanup
robin-aws Jan 21, 2025
896ae41
Move doo file under bin
robin-aws Jan 21, 2025
543f481
Cleanup
robin-aws Jan 21, 2025
f7fafcf
Merge branch 'main-1.x' of github.com:smithy-lang/smithy-dafny into r…
robin-aws Jan 21, 2025
eb6eec2
Readme
robin-aws Jan 21, 2025
26e8f0e
Formatting
robin-aws Jan 21, 2025
81b0448
Comments and renames
robin-aws Feb 7, 2025
4194f5f
Missing wrapped test call
robin-aws Feb 7, 2025
2eefa27
more cleanup
robin-aws Feb 8, 2025
2c97f24
length
robin-aws Feb 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/not-grep.toml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
steps:
- name: Populate Dafny versions list
id: populate-dafny-versions-list
run: echo "dafny-versions-list=['4.5.0','4.8.0']" >> $GITHUB_OUTPUT
run: echo "dafny-versions-list=['4.7.0','4.9.1']" >> $GITHUB_OUTPUT
- name: Populate Dafny versions list for "only new versions" languages (Python)
id: populate-only-new-dafny-versions-list
run: echo "only-new-dafny-versions-list=['4.8.0']" >> $GITHUB_OUTPUT
run: echo "only-new-dafny-versions-list=['4.9.1']" >> $GITHUB_OUTPUT
outputs:
dafny-version-list: ${{ steps.populate-dafny-versions-list.outputs.dafny-versions-list }}
only-new-dafny-version-list: ${{ steps.populate-only-new-dafny-versions-list.outputs.only-new-dafny-versions-list }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- name: Populate Dafny versions list
id: populate-dafny-versions-list
run: echo "dafny-versions-list=['4.5.0','4.8.0']" >> $GITHUB_OUTPUT
run: echo "dafny-versions-list=['4.5.0','4.9.1']" >> $GITHUB_OUTPUT
- name: Populate Dafny versions list for "only new versions" languages (Python, Go)
id: populate-only-new-dafny-versions-list
run: echo "only-new-dafny-versions-list=['4.8.0']" >> $GITHUB_OUTPUT
run: echo "only-new-dafny-versions-list=['4.9.1']" >> $GITHUB_OUTPUT
outputs:
dafny-version-list: ${{ steps.populate-dafny-versions-list.outputs.dafny-versions-list }}
only-new-dafny-version-list: ${{ steps.populate-only-new-dafny-versions-list.outputs.only-new-dafny-versions-list }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/smithy-polymorph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: actions/setup-java@v3
with:
distribution: "corretto"
java-version: "17"

- name: Setup Dafny
uses: dafny-lang/[email protected]
with:
Expand All @@ -45,7 +47,3 @@ jobs:
shell: bash
working-directory: TestModels/SimpleTypes/SimpleString
run: make polymorph_dafny

- name: not-grep
if: matrix.os == 'ubuntu-22.04'
uses: mattsb42-meta/[email protected]
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "smithy-dafny-codegen-modules/smithy-rs"]
path = smithy-dafny-codegen-modules/smithy-rs
url = https://github.com/smithy-lang/smithy-rs.git
[submodule "TestModels/dafny-dependencies/dafny"]
path = TestModels/dafny-dependencies/dafny
url = [email protected]:dafny-lang/dafny.git
branch = actions-and-streaming-stdlibs
10 changes: 8 additions & 2 deletions SmithyDafnyMakefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ verify:
--log-format csv \
--verification-time-limit $(VERIFY_TIMEOUT) \
--resource-limit $(MAX_RESOURCE_COUNT) \
$(if $(USE_DAFNY_STANDARD_LIBRARIES), --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/bin/DafnyStandardLibraries-smithy-dafny-subset.doo, ) \
$(DAFNY_OPTIONS) \
%

Expand All @@ -110,6 +111,7 @@ verify_single:
--log-format text \
--verification-time-limit $(VERIFY_TIMEOUT) \
--resource-limit $(MAX_RESOURCE_COUNT) \
$(if $(USE_DAFNY_STANDARD_LIBRARIES), --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/bin/DafnyStandardLibraries-smithy-dafny-subset.doo, ) \
$(DAFNY_OPTIONS) \
$(if ${PROC},-proc:*$(PROC)*,) \
$(FILE)
Expand Down Expand Up @@ -206,6 +208,7 @@ transpile_implementation:
$(DAFNY_OTHER_FILES) \
$(TRANSPILE_MODULE_NAME) \
$(if $(strip $(STD_LIBRARY)) , --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/src/Index.dfy, ) \
$(if $(USE_DAFNY_STANDARD_LIBRARIES) , --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/bin/DafnyStandardLibraries-smithy-dafny-subset.doo, ) \
$(TRANSLATION_RECORD) \
$(TRANSPILE_DEPENDENCIES)

Expand Down Expand Up @@ -243,6 +246,7 @@ transpile_test:
$(DAFNY_OPTIONS) \
$(DAFNY_OTHER_FILES) \
$(if $(strip $(STD_LIBRARY)) , --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/src/Index.dfy, ) \
$(if $(USE_DAFNY_STANDARD_LIBRARIES) , --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/bin/DafnyStandardLibraries-smithy-dafny-subset.doo, ) \
$(TRANSLATION_RECORD) \
$(SOURCE_TRANSLATION_RECORD) \
$(TRANSPILE_MODULE_NAME) \
Expand All @@ -251,7 +255,7 @@ transpile_test:
# If we are not the StandardLibrary, transpile the StandardLibrary.
# Transpile all other dependencies
transpile_dependencies:
$(if $(strip $(STD_LIBRARY)), $(MAKE) -C $(PROJECT_ROOT)/$(STD_LIBRARY) transpile_implementation_$(LANG), )
$(if $(strip $(STD_LIBRARY)), $(MAKE) -C $(PROJECT_ROOT)/$(STD_LIBRARY) transpile_implementation_$(LANG) USE_DAFNY_STANDARD_LIBRARIES=$(USE_DAFNY_STANDARD_LIBRARIES), )
$(patsubst %, $(MAKE) -C $(PROJECT_ROOT)/% transpile_implementation_$(LANG);, $(PROJECT_DEPENDENCIES))

transpile_dependencies_test:
Expand Down Expand Up @@ -324,7 +328,7 @@ _polymorph_wrapped:
$(POLYMORPH_OPTIONS)";

_polymorph_dependencies:
$(if $(strip $(STD_LIBRARY)), $(MAKE) -C $(PROJECT_ROOT)/$(STD_LIBRARY) polymorph_$(POLYMORPH_LANGUAGE_TARGET) LIBRARY_ROOT=$(PROJECT_ROOT)/$(STD_LIBRARY), )
$(if $(strip $(STD_LIBRARY)), $(MAKE) -C $(PROJECT_ROOT)/$(STD_LIBRARY) polymorph_$(POLYMORPH_LANGUAGE_TARGET) LIBRARY_ROOT=$(PROJECT_ROOT)/$(STD_LIBRARY) USE_DAFNY_STANDARD_LIBRARIES=$(USE_DAFNY_STANDARD_LIBRARIES), )
@$(foreach dependency, \
$(PROJECT_DEPENDENCIES), \
$(MAKE) -C $(PROJECT_ROOT)/$(dependency) polymorph_$(POLYMORPH_LANGUAGE_TARGET); \
Expand Down Expand Up @@ -685,6 +689,8 @@ test_go:

########################## Python targets

python: polymorph_dafny transpile_python polymorph_python test_python

# Install packages via `python3 -m pip`,
# which is the syntax Smithy-Python and Smithy-Dafny Python use
# to invoke these packages.
Expand Down
26 changes: 26 additions & 0 deletions TestModels/Streaming/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

CORES=2

USE_DAFNY_STANDARD_LIBRARIES=1

ENABLE_EXTERN_PROCESSING=1

include ../SharedMakefile.mk

NAMESPACE=simple.streaming
Expand All @@ -18,4 +22,26 @@ SMITHY_DEPS=dafny-dependencies/Model/traits.smithy

# This project has no dependencies
# DEPENDENT-MODELS:=

# Python

PYTHON_MODULE_NAME=simple_streaming

TRANSLATION_RECORD_PYTHON := \
--translation-record ../dafny-dependencies/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/generated/dafny_src-py.dtr

# LIBRARIES :=

# Constants for languages that drop extern names (Python, Go)

TYPES_FILE_PATH=Model/SimpleStreamingTypes.dfy
TYPES_FILE_WITH_EXTERN_STRING="module {:extern \"simple.streaming.internaldafny.types\" } SimpleStreamingTypes"
TYPES_FILE_WITHOUT_EXTERN_STRING="module SimpleStreamingTypes"

INDEX_FILE_PATH=src/Index.dfy
INDEX_FILE_WITH_EXTERN_STRING="module {:extern \"simple.streaming.internaldafny\"} SimpleStreaming refines AbstractSimpleStreamingService"
INDEX_FILE_WITHOUT_EXTERN_STRING="module SimpleStreaming refines AbstractSimpleStreamingService"

WRAPPED_INDEX_FILE_PATH=src/WrappedSimpleStreamingImpl.dfy
WRAPPED_INDEX_FILE_WITH_EXTERN_STRING="module {:extern \"simple.streaming.internaldafny.wrapped\"} WrappedSimpleStreamingService refines WrappedAbstractSimpleStreamingService"
WRAPPED_INDEX_FILE_WITHOUT_EXTERN_STRING="module WrappedSimpleStreamingService refines WrappedAbstractSimpleStreamingService"
Loading
Loading