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

lake clean should remove lakefile.olean in the root directory and under lake-packages #2592

Open
semorrison opened this issue Sep 26, 2023 · 3 comments · May be fixed by #2699
Open

lake clean should remove lakefile.olean in the root directory and under lake-packages #2592

semorrison opened this issue Sep 26, 2023 · 3 comments · May be fixed by #2699
Labels
Lake Lake related issue RFC Request for comments

Comments

@semorrison
Copy link
Collaborator

(And possibly its location outside of build should be reconsidered.)

@semorrison semorrison added RFC Request for comments Lake Lake related issue labels Sep 26, 2023
@digama0
Copy link
Collaborator

digama0 commented Sep 26, 2023

The technical reason given for not putting lakefile.olean in build (there was also a philosophical reason but I didn't really understand it) is that the location of the build directory is configurable from the lakefile using the buildDir option in package, so we wouldn't know where to look for the olean until we'd already parsed the lakefile.

My opinion is that the location of the build directory is a user option, not a package option, and should be configured (if configuration for this is even necessary) using a separate configuration mechanism: a global configuration file, a project-local configuration file (not the lakefile, and customarily not checked in), an environment variable, or a CLI flag.

@semorrison
Copy link
Collaborator Author

I see. No configuration is the best configuration! :-) I'm currently failing to think of a use case of configuring the location of build directory. Configuring the location of lake-packages is obviously important, because lecturers may want to be able to share this to support student accounts with limited space.

In any case, this question is incidental to the actual topic of the issue, which can certainly be resolved without worrying about the location question.

@tydeu
Copy link
Member

tydeu commented Sep 27, 2023

@semorrison

I'm currently failing to think of a use case of configuring the location of build directory.

If it helps,, two of use cases were I currently customize the build directory:

  • Splitting it by platform architecture when that is relevant. This allows me to have one build directory for Windows and one for WSL without having to rebuild or manually switch them in and out.
  • Building Lean with Lake (which I do locally for a more interactive VSCode). The build directory needs to be in build/<config>/stage<n> (with the subdirectories for libs, IR, etc also customized).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lake Lake related issue RFC Request for comments
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants