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

Module refinement breaks outline, error reporting and gutter icons #3329

Closed
seebees opened this issue Nov 30, 2022 · 1 comment · May be fixed by #3330
Closed

Module refinement breaks outline, error reporting and gutter icons #3329

seebees opened this issue Nov 30, 2022 · 1 comment · May be fixed by #3330
Assignees
Labels
during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: language server Support for LSP in Dafny (server part; client is in ide-vscode repo)

Comments

@seebees
Copy link

seebees commented Nov 30, 2022

There is strange behavior with the gutter icons when verifying refining an abstract modules.

abstract module Test {
  method Encrypt()
    ensures false
}

module Ok refines Test {
  function test(): int {
    2
  }
  // Might not work as expected
  method Encrypt() {
  }
}

See the result here
image

  • The error on the refined module is expressed in the abstract module, which completely breaks not only the gutter icons, but also the outline (there is no method Encrypt in the refined module)

We can use this behavior to pretend we prove false, at least on the gutter icons:
image

It's even worse when the abstract module is included instead of being in the same file, because its errors are reported on the file containing the refined module, which is out of offset. Look at the postcondition error underlined.... in the comment.
image

@MikaelMayer MikaelMayer changed the title gutter icons with module refinement Module refinement breaks outline, error reporting and gutter icons Nov 30, 2022
@MikaelMayer MikaelMayer self-assigned this Nov 30, 2022
@MikaelMayer MikaelMayer transferred this issue from dafny-lang/ide-vscode Jan 5, 2023
@MikaelMayer MikaelMayer added kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: language server Support for LSP in Dafny (server part; client is in ide-vscode repo) labels Jan 5, 2023
@keyboardDrummer keyboardDrummer added the during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program label Feb 7, 2024
@keyboardDrummer
Copy link
Member

It seems this issue is already resolved. I get the following behavior given the example program, which seems good:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: language server Support for LSP in Dafny (server part; client is in ide-vscode repo)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants