Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Dafny Main method to accept optional seq<string> argument #2594
feat: Dafny Main method to accept optional seq<string> argument #2594
Changes from 27 commits
dd08b02
9f49d95
bf5b81c
9413f53
7e99661
c53df3d
b308899
aa57f69
e86a74a
e159db4
37a3e81
b080587
af0f559
3f081e5
b28e077
ab3e0a0
eef5c3f
3089663
1805a3d
652df6e
1d9066f
803fda9
e00ef86
f79ade5
62a6cc8
b1364a1
e69c668
ebf8dcb
0ca5a2f
bc7ab88
722824d
2472b61
e748bf1
fbfc0ca
c784ad9
955539b
34ff94a
a6668e1
1ca45b8
440f0a5
c0cfb9e
189aafe
6348703
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks odd — what happens if someone has a Dafny module called
os
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then there will be a compilation failure. What would be the alternative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A clean error produced by Dafny; but what is bothering me is the special case on the string
os
. We could store tuples in the list of modules (maybe("os", "Args")
and(id, DummyTypeName)
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by "we could store tuples in the list of modules"?
One could make this error go away by suppressing these dummy calls.
But overall, I think that if this is a problem down the road, the Go compiler will have to compile a Dafny module named "os" to something else, since "os" is a base package in Go anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't safe; arguments shouldn't be concatenated as strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's unfortunately the only way to launch a
ProcessInfo
:https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.processstartinfo.-ctor?view=net-6.0#system-diagnostics-processstartinfo-ctor(system-string-system-string)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thankfully that's not right :) Here's an example of how to do it:
dafny/Source/AutoExtern.Test/Tests.cs
Lines 16 to 31 in 5058d5a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's very interesting. I changed the existing behavior to also adapt to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this to DafnyRuntime