You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.
error: package configuration `./lakefile.lean` has errors
I would expect lake serve to start nevertheless so that you get diagnostics while editing lakefile.lean.
We'd like to replace lean --server by lake serve in the editors if possible, and I'd like to avoid yet another corner case.
Falling back to lean --server when lake serve fails is not ideal either. In the future lakefiles might e.g. require dependencies. Then it would become important that lake serve works (and fetches those dependencies) so that you get diagnostics for the top-level lakefile.
The text was updated successfully, but these errors were encountered:
reminder: remove the lean --server fallback in leanprover/vscode-lean4#97 when this issue is resolved, and perhaps if the lake version matches some number 3.0.1 or something...
The problem here is that without a valid configuration file it is not clear what the behavior of lake serve should even be. Thus, I think Lake failing in such a scenario makes sense. The user of lake serve (e.g., the editor extension) is much better at determining what a reasonable failback is in this case than Lake (as Lake is devoid of any helpful information without a config file).
it is not clear what the behavior of lake serve should even be
lean --server seems like a reasonable default behavior.
The user of lake serve (e.g., the editor extension) is much better at determining what a reasonable failback is in this case than Lake
The editor has exactly as much (or as little) information as lake. Implementing the fallback in the editors is much more brittle as you need to distinguish different failure modes (wrong lean-toolchain file, crashing server, lean not installed, lakefile wrong), and falling back to lean --server is only appropriate in one of them.
I also don't want to implement the same fallback logic in three+ editor extensions.
echo does not compile > lakefile.lean
lake serve
error: package configuration `./lakefile.lean` has errors
I would expect
lake serve
to start nevertheless so that you get diagnostics while editinglakefile.lean
.We'd like to replace
lean --server
bylake serve
in the editors if possible, and I'd like to avoid yet another corner case.Falling back to
lean --server
whenlake serve
fails is not ideal either. In the future lakefiles might e.g. require dependencies. Then it would become important thatlake serve
works (and fetches those dependencies) so that you get diagnostics for the top-level lakefile.The text was updated successfully, but these errors were encountered: