You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module UsesWrappers {
importopened Std.Wrappers
functionSafeDiv(a: int, b: int): Option<int> {
if b == 0 then None elseSome(a/b)
}
}
Command to run and resulting output
> dafny format --check --standard-libraries UsesStdLibs.dfy
The file /DafnyStandardLibraries-notarget.doo needs to be formatted
The file /DafnyStandardLibraries.doo needs to be formatted
Error: 2 files need formatting.
What happened?
I'd expect the standard libraries to not be in scope for formatting in general, given they are pre-built. Or at least if they are in scope, they would be considered correctly formatted.
This is a general doo file problem and not specific to the standard libraries. dafny format without the check already produces Please use the '--check' and/or '--print' option as doo files cannot be formatted in place.
There's a fairly easy workaround as you don't actually need to pass --standard-libraries to dafny format, since it doesn't attempt resolution. But that's not easy when using a project file, for example.
What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered:
robin-aws
added
the
kind: bug
Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
label
Jan 7, 2025
Dafny version
4.9.1
Code to produce this issue
Command to run and resulting output
What happened?
I'd expect the standard libraries to not be in scope for formatting in general, given they are pre-built. Or at least if they are in scope, they would be considered correctly formatted.
This is a general doo file problem and not specific to the standard libraries.
dafny format
without thecheck
already producesPlease use the '--check' and/or '--print' option as doo files cannot be formatted in place.
There's a fairly easy workaround as you don't actually need to pass
--standard-libraries
todafny format
, since it doesn't attempt resolution. But that's not easy when using a project file, for example.What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered: