-
Notifications
You must be signed in to change notification settings - Fork 263
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
--show-snippets with default true and off in tests #4087
Merged
davidcok
merged 88 commits into
dafny-lang:master
from
davidcok:cok-3304-show-snippet-2
Jun 20, 2023
Merged
Changes from all commits
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
73cb290
Enabling show-snippet option
4b5830a
Renaming to align with issue number
6bb7c25
Renaming files
d268ce6
Fixing formatting
7f9686b
Fixing up tests
5bfbc77
Missed renaming typo
e7fbc8b
Merge branch 'master' into cok-3304-show-snippet
davidcok 9962f1e
Improving code
e50dd4e
Merge branch 'master' into cok-3304-show-snippet
davidcok be1cd88
Merge edits
e607d49
Merge branch 'cok-3304-show-snippet' of https://github.com/davidcok/d…
b366096
Merge branch 'master' into cok-3304-show-snippet
davidcok db754da
Merge branch 'master' into cok-3304-show-snippet
davidcok 55e7359
Merge branch 'master' into cok-3304-show-snippet
davidcok 7a25759
Merge branch 'master' into cok-3304-show-snippet
davidcok 2fbf6a5
Merge branch 'master' into cok-3304-show-snippet
davidcok d356ce1
Merge branch 'master' into cok-3304-show-snippet
davidcok 5d40fcd
Setting show-snippets default to true and turing it off in tests
3182535
Merge branch 'master' into cok-3304-show-snippet-2
8e59c70
Fixes to turn off --show-snippets
345b4ea
Misc fixes
6d0d904
Merge branch 'master' into cok-3304-show-snippet
davidcok a7518a8
Merge branch 'master' into cok-3304-show-snippet-2
davidcok a077bae
Edits to error messages
f5a0e81
Merge branch 'master' into cok-3304-show-snippet
davidcok 7a06981
Merge resolution
062e8b5
Merge branch 'cok-3304-show-snippet' of https://github.com/davidcok/d…
a21ff86
Fixed compile problem
fe51320
Mertge resolution
a76dca0
Fixing option
1c97537
Touchup test
f7046ae
Checking errorids when checking examples
4b89d56
Adjusting options
25a94fe
Attempting auto insertion of show-snippets:false
54b833b
Typo
314108a
Cleanine up check-examples script
b1b488c
Checkpoint in editing
011be2c
Checkpointing edits
5d43f39
More edits
2c5b540
Review edit
6227471
Merge branch 'master' into cok-3304-show-snippet-2
davidcok 654cd6f
Merge branch 'master' into cok-check-errorids
davidcok 79a0c0d
Test about allocation set
fc2c4c5
Merge branch 'cok-check-errorids' of https://github.com/davidcok/dafn…
17c72d0
Merge resolution
98d4493
Merging
81bf90e
Test fixes
3a70693
Edits to get checks working
e486087
Debugging file location
61c46eb
Debugging legacy behavior
e871503
Merge branch 'master' into cok-check-errorids
davidcok 588bf19
Merge branch 'master' into cok-check-errorids
davidcok f0f147e
Merge branch 'master' into cok-check-errorids
fde6a52
Adding to CI tests
6f3ad0b
Merge branch 'cok-check-errorids' of https://github.com/davidcok/dafn…
b74eb00
Typo
38f239b
Merge branch 'master' into cok-check-errorids
davidcok 5559120
Typos
c3df0a6
Merge branch 'cok-check-errorids' of https://github.com/davidcok/dafn…
df3a9fd
Merging
b68db72
Touchups
6f6e321
Merging
1b6e054
Merge branch 'master' into cok-3304-show-snippet-2
8aea9f3
Merge branch 'master' into cok-3304-show-snippet-2
davidcok 1bbf084
Merge branch 'master' into cok-3304-show-snippet-2
davidcok 8f2411f
Merge branch 'master' into cok-3304-show-snippet-2
3996edd
Removing new style option from old style commands
31b4afe
Cleaning up tets for show-snippets
96cfbdc
Merge branch 'master' into cok-3304-show-snippet-2
davidcok a46f60d
more test tweaks
cf82161
Merge branch 'cok-3304-show-snippet-2' of https://github.com/davidcok…
d7a61ab
Merge branch 'master' into cok-3304-show-snippet-2
davidcok 9060f25
Adjusting condition
1a115e1
Fixing tests
c01574e
Merge branch 'master' into cok-3304-show-snippet-2
davidcok 9db0fa4
Merge branch 'master' into cok-3304-show-snippet-2
davidcok dbd9b2e
Merge branch 'master' into cok-3304-show-snippet-2
davidcok 8cb7f85
Merge branch 'master' into cok-3304-show-snippet-2
davidcok 5ccf7a5
Removing confusing use of
557a9d5
Merge branch 'cok-3304-show-snippet-2' of https://github.com/davidcok…
afcc6d2
Merge branch 'master' into cok-3304-show-snippet-2
ddb4ee8
Merge branch 'master' into cok-3304-show-snippet-2
davidcok 37572ee
Merge branch 'master' into cok-3304-show-snippet-2
davidcok 1a175ac
Merge branch 'master' into cok-3304-show-snippet-2
davidcok 683265b
Merge branch 'master' into cok-3304-show-snippet-2
davidcok 6fe7fa4
Adding a release note
1d44b6c
Merge branch 'cok-3304-show-snippet-2' of https://github.com/davidcok…
a2b1a3f
Merge branch 'master' into cok-3304-show-snippet-2
davidcok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
// A project file can specify input files and configure options | ||
// RUN: %baredafny resolve --use-basename-for-filename "%S/dfyconfig.toml" > "%t" | ||
// RUN: %baredafny resolve --show-snippets:false --use-basename-for-filename "%S/dfyconfig.toml" > "%t" | ||
|
||
// Test using a URL instead of a local file as a project file | ||
// RUN: ! %baredafny resolve --use-basename-for-filename "https://github.com/dafny-lang/dafny/blob/master/dfyconfig.toml" | ||
// RUN: ! %baredafny resolve --show-snippets:false --use-basename-for-filename "https://github.com/dafny-lang/dafny/blob/master/dfyconfig.toml" | ||
|
||
// Test option override behavior | ||
// RUN: %baredafny resolve --use-basename-for-filename "%S/dfyconfig.toml" --warn-shadowing=false >> "%t" | ||
// RUN: %baredafny resolve --show-snippets:false --use-basename-for-filename "%S/dfyconfig.toml" --warn-shadowing=false >> "%t" | ||
|
||
// Multiple project files are not allowed | ||
// RUN: ! %baredafny resolve --use-basename-for-filename "%S/dfyconfig.toml" "%S/broken/dfyconfig.toml" | ||
// RUN: ! %baredafny resolve --show-snippets:false --use-basename-for-filename "%S/dfyconfig.toml" "%S/broken/dfyconfig.toml" | ||
|
||
// Project files may not contain unknown properties | ||
// RUN: ! %baredafny resolve --use-basename-for-filename "%S/broken/dfyconfig.toml" | ||
// RUN: ! %baredafny resolve --show-snippets:false --use-basename-for-filename "%S/broken/dfyconfig.toml" | ||
|
||
// Warn if file contains options that don't exist | ||
// RUN: %baredafny resolve --use-basename-for-filename "%S/broken/invalidOption.toml" >> "%t" | ||
// RUN: %baredafny resolve --show-snippets:false --use-basename-for-filename "%S/broken/invalidOption.toml" >> "%t" | ||
|
||
// Project files must be files on disk. | ||
// RUN: ! %baredafny resolve --use-basename-for-filename "%S/doesNotExist/dfyconfig.toml" | ||
// RUN: ! %baredafny resolve --show-snippets:false --use-basename-for-filename "%S/doesNotExist/dfyconfig.toml" | ||
|
||
// Project file options must have the right type | ||
// RUN: ! %baredafny resolve --use-basename-for-filename "%S/badTypes/dfyconfig.toml" 2>> "%t" | ||
// RUN: ! %baredafny resolve --show-snippets:false --use-basename-for-filename "%S/badTypes/dfyconfig.toml" 2>> "%t" | ||
|
||
// A project file without includes will take all .dfy files as input | ||
// RUN: %baredafny resolve --use-basename-for-filename "%S/noIncludes/dfyconfig.toml" >> "%t" | ||
// RUN: %baredafny resolve --show-snippets:false --use-basename-for-filename "%S/noIncludes/dfyconfig.toml" >> "%t" | ||
|
||
// Files included by the project file and on the CLI, duplicate is ignored. | ||
// RUN: %baredafny resolve --use-basename-for-filename "%S/dfyconfig.toml" "%S/src/input.dfy" >> "%t" | ||
// RUN: %baredafny resolve --show-snippets:false --use-basename-for-filename "%S/dfyconfig.toml" "%S/src/input.dfy" >> "%t" | ||
|
||
// Files excluded by the project file and included on the CLI, are included | ||
// RUN: ! %baredafny resolve --use-basename-for-filename "%S/dfyconfig.toml" "%S/src/excluded.dfy" >> "%t" | ||
// RUN: ! %baredafny resolve --show-snippets:false --use-basename-for-filename "%S/dfyconfig.toml" "%S/src/excluded.dfy" >> "%t" | ||
|
||
// RUN: %diff "%s.expect" "%t" | ||
// RUN: %diff "%s.expect" "%t" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// RUN: %exits-with 0 %stdin "module A{}" %baredafny verify --stdin > "%t" | ||
// RUN: %exits-with 4 %stdin "method a() { assert false; }" %baredafny verify --stdin >> "%t" | ||
// RUN: %exits-with 0 %stdin "module A{}" %baredafny verify --show-snippets:false --stdin > "%t" | ||
// RUN: %exits-with 4 %stdin "method a() { assert false; }" %baredafny verify --show-snippets:false --stdin >> "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// RUN: %exits-with 2 %baredafny resolve --use-basename-for-filename "%s" > "%t" | ||
// RUN: %exits-with 2 %baredafny resolve --show-snippets:false --use-basename-for-filename "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
const |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// RUN: %exits-with 2 %baredafny resolve --use-basename-for-filename "%s" > "%t" | ||
// RUN: %exits-with 2 %baredafny resolve --show-snippets:false --use-basename-for-filename "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
const + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
errors issued in command-line mode now show source code context by default; this behavior can be disabled using the option --show-snippets:false. | ||
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.
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.
I would phrase this as "Errors emitted by the command-line interface". "Mode" seems like a strange concept here, since the IDE and CLI are so different as an experience, I wouldn't describe them as two different modes.