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

Allow to customize parameters passed to verify in DafnyServer #41

Closed
ssaavedra opened this issue Feb 17, 2019 · 4 comments
Closed

Allow to customize parameters passed to verify in DafnyServer #41

ssaavedra opened this issue Feb 17, 2019 · 4 comments

Comments

@ssaavedra
Copy link
Contributor

It would be great to be able to configure at the editor's settings.json the parameters that are passed to DafnyServer on verify.

Currently this is implemented on server/backend/dafny/dafnyServer.js as:

    sendVerificationRequest(request) {
        if (request.verb === stringRessources_1.DafnyVerbs.CounterExample || request.verb === stringRessources_1.DafnyVerbs.Verify) {
            this.statusbar.changeServerStatus(stringRessources_1.StatusString.Verifying);
        }
        const task = {
            args: [],
            filename: vscode_uri_1.default.parse(request.document.uri).fsPath,
            source: request.source,
            sourceIsFile: false,
        };

I'm manually changing on the extension code the args: [], in my case to add args: ['/vcsLoad:1'], but it would be great if that was exported to be user-configurable.

@fabianhauser fabianhauser changed the title Feature request: allow to customize parameters passed to verify in DafnyServer Allow to customize parameters passed to verify in DafnyServer Feb 18, 2019
@fabianhauser
Copy link
Member

Hi @ssaavedra

That sounds like a great addition. Would you mind opening a pull request for that? 🙂

Adding the setting should be possible by extending the Dafny Settings Interface and adding it to the package.json of the client part.

@ssaavedra
Copy link
Contributor Author

Thanks for the cue, I just opened #42 😉

I have no idea about VSCode extensions (I've using the editor for a couple of hours, have been using Emacs and still doing so), so please feel free to review any issues.

Also, it seems that configuration changes are not picked up automatically by the extension and that it instead needs to be reloaded (by means of > Reload window). I suppose that is a different issue regarding the onDidChangeConfiguration event (from what I has just been reading).

@ssaavedra
Copy link
Contributor Author

Since you just opened #43 which is the only remaining question here (now that #42 is merged), I think this issue can be now closed :)

@fabianhauser
Copy link
Member

Great, thanks for your contribution! Your changes are included in the newest release (v0.16.0) which should be public in a couple of minutes 😊

I opened a new issue #43 to address the configuration reloading (seems that it was not properly implemented all along...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants