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

Standard libraries included twice #4858

Closed
MikaelMayer opened this issue Dec 8, 2023 · 1 comment · Fixed by #4861
Closed

Standard libraries included twice #4858

MikaelMayer opened this issue Dec 8, 2023 · 1 comment · Fixed by #4861
Assignees
Labels
kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label release-blocker Must be resolved before the next release

Comments

@MikaelMayer
Copy link
Member

Dafny version

latest-nightly

Code to produce this issue

// A.dfy. The dfyconfig.toml contains "standard-library=true"
module A {
  import Std;
}

// B.dfy
// That dfyconfig.toml contains "standard-library=true" and also include A.dfy
module B {
  import Std;
}

Command to run and resulting output

Try to verify in VSCode or CLI. Fail

What happened?

Complaints that FileIO is imported twice. It's not practical to not have the standard library on either project.

Current workaround: use import A.Std instead of import Std

What type of operating system are you experiencing the problem on?

Windows

@MikaelMayer MikaelMayer added the kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label label Dec 8, 2023
@robin-aws
Copy link
Member

The actual bug is simpler and more serious AFAICT: if I create a new project with a dfyconfig.toml file with standard-libraries = true and open the folder in the IDE, then change the project file (say adding a space), I get the same error.

Hovering over the [options] part reveals a strong clue:

image

I suspect that the LSP is adding the standard library doo files again on every update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label release-blocker Must be resolved before the next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants