Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Feature Request: add some configuration option to select the Dafny compiler to use #51

Open
hmijail opened this issue Apr 8, 2021 · 3 comments

Comments

@hmijail
Copy link

hmijail commented Apr 8, 2021

I'm using my own locally-built Dafny compiler in the CLI (to include a fix that is still not in any official release).
I can set the VSCode extension to use this compiler (setting ID dafny.compilerRuntimePath).
Confusingly, after some poking around, looks like this setting is only applied when I use the command dafny.compile – but not during the rest of the functioning of the extension / language server.

It would be great if this could be unified so the extension always used some specified Dafny installation.

@camrein
Copy link
Member

camrein commented Apr 8, 2021

Unfortunately, the language server includes the Dafny compiler's source as a git submodule at this time. This source dependency is necessary since the language server uses the compiler's parser and resolver infrastructure - otherwise, it would need its own implementation making it hard to keep language changes in sync. Thus, you'd need to compile the language server manually against the updated Dafny compiler source. However, if there are no breaking changes in the public changes, you may have luck by simply replacing the compiler DLLs with the ones located in your language server installation.

Last but not least: If we proceed with merging this repository into the main repo as suggested in #48, I suppose it will make your suggestion obsolete since the sources will always be in sync.

@hmijail
Copy link
Author

hmijail commented Apr 8, 2021

Thank you for the explanation.
I was about to open another Feature Request which is actually kind of dual to this one, so I'll try here (let me know if I should redirect it somewhere else - the main Dafny project perhaps?):

The VSCode extension is showing me finer and more useful errors than the CLI compiler, which emits much fewer / blunter / more uninformative messages. (I can provide an example if needed)
Is there any way to get that level of detail in the CLI? After a bit of poking around in the Language Server I didn't find anything obvious.

@camrein
Copy link
Member

camrein commented Apr 8, 2021

Yes, the CLI compiler belongs to the main Dafny project located under dafny-lang/dafny. I believe it would be helpful if you provide a short note (or a VSCode screenshot) of the details you're missing the CLI output.

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

No branches or pull requests

2 participants