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: Microsoft Visual C++ 2015 Redistributable is required on Windows #11503

Closed
jborbely opened this issue May 23, 2024 · 9 comments · Fixed by #11589
Closed

Docs: Microsoft Visual C++ 2015 Redistributable is required on Windows #11503

jborbely opened this issue May 23, 2024 · 9 comments · Fixed by #11589
Assignees
Labels
help wanted Contributions especially welcome windows Specific to the Windows platform

Comments

@jborbely
Copy link

OS: Windows 10
ruff: version 0.4.4 (installed via pipx)

Issue

ruff.exe silently fails to run from the terminal if Microsoft Visual C++ 2015 Redistributable is not installed.

Running

> ruff --version

does not show the version in the terminal nor is an error shown. Complete silence.

Double-clicking the executable, located at ..\pipx\venvs\ruff\Scripts\ruff.exe, pops-up the following window

vcruntime140-error

Fix

Install Microsoft Visual C++ 2015 Redistributable, then

> ruff --version
ruff 0.4.4

Suggestion

Perhaps adding something to the docs (https://docs.astral.sh/ruff/installation/) for Windows users that Microsoft Visual C++ 2015 Redistributable must be installed. Either provide the download link (https://www.microsoft.com/en-us/download/details.aspx?id=52685) and/or specify the command to run to install it winget install --exact --id Microsoft.VCRedist.2015+.x64

@charliermarsh charliermarsh added the windows Specific to the Windows platform label May 23, 2024
@T-256
Copy link
Contributor

T-256 commented May 23, 2024

Currently Windows builds uses msvc runtime. we can eaither use different runtime (using mingw), or statically link it into binary at link time which causes larger binary.

@jborbely
Copy link
Author

Certainly, those additional options would resolve the external VCRUNTIME###.dll dependency issue. I do not have a preference for which option (update docs, use mingw, statically link, ...) the maintainers of ruff decide to go with.

@MichaReiser
Copy link
Member

@BurntSushi what's your experience with statically linking the CRT on windows? Any drawbacks that you've become aware after shipping the change in ripgrep?

https://github.com/BurntSushi/ripgrep/blob/35160a1cdb4c7e2c370e8a7fad6508ff922a33c2/.cargo/config.toml#L4C8-L8

@BurntSushi
Copy link
Member

@BurntSushi what's your experience with statically linking the CRT on windows? Any drawbacks that you've become aware after shipping the change in ripgrep?

https://github.com/BurntSushi/ripgrep/blob/35160a1cdb4c7e2c370e8a7fad6508ff922a33c2/.cargo/config.toml#L4C8-L8

Not that I'm aware of! It's been without incident to the point that I totally forgot that this change even happened. :-)

@BurntSushi
Copy link
Member

Also, ripgrep's msvc zip archive size went from ~1.6MB in ripgrep 13 to ~1.9MB in ripgrep 14. So at least in compressed form, the size difference seems tolerable.

@MichaReiser
Copy link
Member

Would someone be interested in contributing the change to Ruff? It requires porting the configuration from ripgrep to ruff and doing a quick analysis of the file size change between the two versions (release mode).

@MichaReiser MichaReiser added the help wanted Contributions especially welcome label May 28, 2024
@T-256
Copy link
Contributor

T-256 commented May 28, 2024

Can I take this one?

@jborbely
Copy link
Author

Can I take this one?

@T-256 definitely okay with me.

@charliermarsh
Copy link
Member

Go for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions especially welcome windows Specific to the Windows platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants