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

Nested extern attribute creates stub with incorrect file name in Python #2963

Closed
robin-aws opened this issue Nov 1, 2022 · 1 comment · Fixed by #3919
Closed

Nested extern attribute creates stub with incorrect file name in Python #2963

robin-aws opened this issue Nov 1, 2022 · 1 comment · Fixed by #3919
Labels
area: ffi The {:extern} attribute and otherwise interfacing with code in other languages lang: python Dafny's Python transpiler and its runtime part: code-generation Support for transpiling Dafny to another language. If relevant, add a `lang:` tag

Comments

@robin-aws
Copy link
Member

Follow-up from #2952.

After #2952, module {:extern "A.B.C"} A.B.C works in Python, but creates an unnecessary and confusing stub named A.B.C.py (as opposed to where you actually implement the extern, A/B/C.py). As clean up we should have the Python code generation not create this stub.

@robin-aws robin-aws added part: code-generation Support for transpiling Dafny to another language. If relevant, add a `lang:` tag area: ffi The {:extern} attribute and otherwise interfacing with code in other languages lang: python Dafny's Python transpiler and its runtime labels Nov 1, 2022
@fabiomadge
Copy link
Collaborator

fabiomadge commented Nov 1, 2022

I think the file should be created, but with the correct name, location, and content.

robin-aws pushed a commit that referenced this issue May 2, 2023
Fixes #2963.

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ffi The {:extern} attribute and otherwise interfacing with code in other languages lang: python Dafny's Python transpiler and its runtime part: code-generation Support for transpiling Dafny to another language. If relevant, add a `lang:` tag
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants