-
Notifications
You must be signed in to change notification settings - Fork 262
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
dafny test
and --output
option
#3612
Comments
How would you feel about the generated files being placed in a temporary directory by default for Also, should the default value of |
One use case for controlling the output in all cases is for build pipelines. If the build product exists and is newer than the sources then we know we don't need to rebuild/retest. |
Well, in essence that's what its doing now isn't? Or do you mean an OS-generated temporary directory (e.g. in |
Yes that's what I meant, with the purpose of not letting these temporary files pollute the user's file space.
Do you need to control it for |
Hmmmm, well I feel like control is always a good thing. For example, if I want to compile directly against an external dependency. Whilst I did successfully work around that by using an interface with a default implementation for Dafny to compile against, this didn't feel like a great solution. |
If you want to use |
Hmmm, so I could pass a Anyway, we're probably getting side tracked. Using a temporary directory for the intermediate files resolves the main issue. Whether or not you choose to support |
Makes sense. Thanks for adding this! I also wonder whether we want to distinguish between output files and intermediate build files.
Does it makes sense to have a separate intermediate and output folder? Also, I'm thinking it might be better to keep the intermediate build artifacts around, for possible caching purposes, although that raises the question of when to delete them. Also, I'm wondering to what extend we should allow different commands to overwrite each other's outputs. Suppose you do How would a default directory structure like:
be? This would imply two options: |
…12 (#3769) Fixes #3612 <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small> --------- Co-authored-by: davidcok <[email protected]> Co-authored-by: Aaron Tomb <[email protected]>
Summary
(This is related to #3611)
Unlike
dafny build
, thedafny test
command does not support the--output
option. When run with the--target java
option it just dumps the generatedjava
files into the directory where the file being tested is contained (in my casesrc/dafny
directory). This is not an ideal place to store generate files, and it would be nice to have some control here.Background and Motivation
I'm trying to update by project build file to use the new CLI syntax (e.g.
dafny build
, etc).Proposed Feature
Adding
--output
as an option fordafny test
.Alternatives
No response
The text was updated successfully, but these errors were encountered: