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

Start lean server using lake serve #85

Closed
gebner opened this issue Dec 7, 2021 · 6 comments
Closed

Start lean server using lake serve #85

gebner opened this issue Dec 7, 2021 · 6 comments
Assignees

Comments

@gebner
Copy link
Member

gebner commented Dec 7, 2021

Related to #61.

@gebner
Copy link
Member Author

gebner commented Dec 7, 2021

@lovettchris
Copy link
Contributor

From Gabriel: On a high level, the biggest question is how the fallback should work. That is, when do we try lean --server after lake serve fails? Do we just call lake serve if there is a lakefile.lean present?

There's also a lot of tiny annoyances left. The extension has a configuration for the lean executable. Do we add one for lake as well? There is some version selection code by Chris which also makes it a bit harder to change replace lean --server by lake serve.

From Sebastian: Can we replace this with a setting for the toolchain root path (keeping bin/lean as the sanity check)? I'd like to avoid tying this to elan if not necessary.

@lovettchris
Copy link
Contributor

lovettchris commented Jan 7, 2022

Proposal, replace the following setting:
image

With:
image

Then the rules for using lake serve would be:

  1. is 'lake' or 'lake.exe' found in the toolchainPath, If not don't use lake
  2. is there a lakefile.lean in the current workspace root? If not don't use lake
  3. If the above are both good, use lake serve with optional +version if there's a workspace override in effect.
  4. If lake env lean --server fails fall back on lean --server.

@gebner
Copy link
Member Author

gebner commented Jan 9, 2022

I don't think it makes sense to fall back to lake env lean --server, just lake serve and lean --server should be good enough. Otherwise the logic looks good.

@lovettchris
Copy link
Contributor

lovettchris commented Jan 10, 2022

Yep, Mac showed me the "--" command line trick, so I already changed the code to use "lake serve -- filename" and "lake +version serve -- filename". I updated the PR description to match.

@lovettchris lovettchris linked a pull request Jan 13, 2022 that will close this issue
@lovettchris
Copy link
Contributor

This PR is now merged

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

Successfully merging a pull request may close this issue.

2 participants