Skip to content

Conversation

@robin-aws
Copy link
Member

@robin-aws robin-aws commented Sep 12, 2024

Description

The empty parent modules of a Dafny module like A.B.C can cause trouble in Go when trying to use --go-module-name - these aren't recorded in translation records since they can appear in multiple compilation units. This may need to be extended to other target languages in the future.

How has this been tested?

GoEmptyParentModules.dfy, which uses CHECK-NOT to assert the empty modules don't show up in the translated code.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@MikaelMayer
Copy link
Member

How is this PR doing @robin-aws ?

@robin-aws
Copy link
Member Author

Just need to beef up (or tasty-vegetarian-option-up :) the test to actually assert the empty modules aren't emitted, will try to do that today!

@robin-aws robin-aws marked this pull request as ready for review September 25, 2024 17:23
@robin-aws robin-aws enabled auto-merge (squash) September 25, 2024 18:54
Copy link
Member

@MikaelMayer MikaelMayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good but... I did not know the encoding to Go would replace dot with underscore? If that is the case, could it cause compilation issues like name clash?

@robin-aws robin-aws merged commit 664f343 into dafny-lang:master Sep 27, 2024
22 checks passed
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

Successfully merging this pull request may close these issues.

2 participants