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

docs: better warning when venv auto create is skipped #3573

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

syhol
Copy link
Contributor

@syhol syhol commented Dec 15, 2024

mise is πŸ“¦ v2024.12.10 via πŸ₯Ÿ v1.1.38 via  v23.3.0 via 🐍 v3.13.0 (.venv) via πŸ¦€ v1.83.0 
❯ rm -rf .venv
mise WARN  no venv found at: ~/Code/syhol/mise/.venv

mise will automatically create the venv once all requested python versions are installed.
To install the missing python versions and create the venv, please run:
mise install

mise is πŸ“¦ v2024.12.10 via πŸ₯Ÿ v1.1.38 via  v23.3.0 via 🐍 v3.13.0 (.venv) via πŸ¦€ v1.83.0 
❯ vim mise.toml # <-- changing env._.python.venv.create from true to false
mise WARN  no venv found at: ~/Code/syhol/mise/.venv

To create a virtualenv manually, run:
python -m venv ~/Code/syhol/mise/.venv
mise WARN  missing: python@3.9.21

@jdx
Copy link
Owner

jdx commented Dec 15, 2024

So showing warnings for literally anything inside of hook-env I've found to be almost always a bad idea. If for some reason you don't want this to be displayed, you'll be annoyed with it constantly. I think we should keep this as debug level. If we were to do it, it would certainly have to fit on a single line.

For example, I recently removed warnings for similar situations with _.source and _.file so mise just silently ignores their non-existence.

@jdx
Copy link
Owner

jdx commented Dec 15, 2024

I think the better thing to do here is put the information into mise dr

@syhol
Copy link
Contributor Author

syhol commented Dec 15, 2024

I'm not actually adding a new warning here, just changing the existing warning if it's create = true. Sorry I should have included more context in my description.

It comes from this ticket: #1898 (comment)

If you still want to close this PR, that's no problem.

@jdx
Copy link
Owner

jdx commented Dec 15, 2024

oh I see, I saw the debug! and assumed you were increasing the visibility, it's probably fine. If people complain, we can always tweak it.

@jdx jdx merged commit ec3853f into jdx:main Dec 15, 2024
18 checks passed
miguelmig pushed a commit to miguelmig/mise that referenced this pull request Dec 21, 2024
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 this pull request may close these issues.

2 participants