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

Smithy-generated Dafny interface allows custom implementations of non-@extendable resources #671

Open
robin-aws opened this issue Oct 29, 2024 · 1 comment

Comments

@robin-aws
Copy link
Contributor

Found this while working on SQSExtended in #666.

I neglected to add @extendable to my resource, but was able to write a successful Dafny test of the local service. Then I tried a Java equivalent, and it threw an IllegalArgumentException saying custom implementations are not supported. I'm glad Java correctly respected the Smithy model, but it would have saved a fair bit of time if Dafny did in the first place.

Bonus marks if we can encode this as a requires clause somewhere so Dafny code that tries to provide a custom implementation doesn't even verify. :)

@texastony
Copy link
Contributor

When you say the Dafny does not prevent this,
do you mean you can write Dafny source code that
extends non-extendable resources?

If so...
I am not certain this impacts Smithy-Dafny consumers very much,
if those consumers are like Crypto Tools.

i.e: I have a hard time imagining a Crypto Tools customer writing a Dafny implemention of the MPL's Key Store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants