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

Feature request: Dafny project file #1546

Closed
robin-aws opened this issue Oct 27, 2021 · 4 comments
Closed

Feature request: Dafny project file #1546

robin-aws opened this issue Oct 27, 2021 · 4 comments
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny

Comments

@robin-aws
Copy link
Member

This has come up in several contexts and I think the time is ripe to figure this out. The benefits include but are not limited to:

  • Making it easier to define the set of Dafny files to build (meaning verify, compile, etc.)
  • Documenting/locking down the version of Dafny your codebase should be built with.
  • Maintaining the switches the codebase requires (for many codebases a switch like /definiteAssignment:3 is particularly critical)
  • Providing more rigour around the different requirements between source and test code (as per this comment: Function by method bodies should not be allowed to contain expect statements #1376 (comment))
  • Enabling a more standard build system for Dafny (rather than relying on things like Makefiles)

The dafny.msbuild task provides some of this functionality, but I suspect it's worth defining a separate if similar format rather than permanently squatting on a .NET-specific (or at least C#-specific) *.csproj file format.

@robin-aws robin-aws added the kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny label Oct 27, 2021
@robin-aws
Copy link
Member Author

Note also this is follow-up from #1426, as having a project file that declared the supported Dafny version would have prevented the plugin from "silently" (or at least fairly quietly) upgrading Dafny.

@parno
Copy link
Collaborator

parno commented Oct 27, 2021

@jaybosamiya also had some relevant thoughts on how this could impact the include system: #1236 (comment)

@keyboardDrummer
Copy link
Member

keyboardDrummer commented Oct 28, 2021

I feel this ticket specifies a 'how' (use a project file) instead of 'what' (Enable a more standard build system for Dafny).

I think the benefits mentioned in the issue can be gotten by script file with a Dafny CLI call as well, given changes to the Dafny CLI. However, I can think of one thing that a project file can do that a script file with a Dafny CLI call can not, which is to provide an interface for sharing Dafny configuration between different Dafny tools, for example the CLI and the language server. This benefit isn't listed in this issue, but I think it's the most important reason to introduce a project file for Dafny.

A secondary reason for introducing a project file is I think to improve the UX of configuring a Dafny project. Configuration files allows specifying complex configuration in a readable way through textual tree structures, while specifying such information through the CLI can look clunky. More discussion can be found here.

@davidcok
Copy link
Collaborator

Completed with PR 3851

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny
Projects
None yet
Development

No branches or pull requests

4 participants