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

Maybe convert xsh to py for faster startup? #13

Closed
eugenesvk opened this issue Dec 27, 2022 · 0 comments
Closed

Maybe convert xsh to py for faster startup? #13

eugenesvk opened this issue Dec 27, 2022 · 0 comments

Comments

@eugenesvk
Copy link
Contributor

eugenesvk commented Dec 27, 2022

Since xonsh xontribs are not compiled unlike the .py ones, so take slower to start xonsh/xonsh#3953, it might make sense to rewrite this xontrib in Python?

I've taken a stab at it by changing the pyenv version (and the langenv_common) in this fork https://github.com/eugenesvk/xontrib-langenv/tree/repy, besides conversion I've also didn't understand why there is a need to search for tools themselves (not their shims) that are supposed to be in PATH already if they're properly installed, so just replaced it ;) with a lazy search of known xonsh binaries

upd: seems to be working, also #14 is fixed
However, I don't get how source-bash works, it doesn't print anything even in the regular subprocess, e.g. source-bash --suppress-skip-message -n "echo 1" doesn't print 1, so in the create_alias function when you do pyenv shell which ultimately goes to source-bash to source echo $PYTHON_VERSION, nothing is printed even if said variable exists

asked this question in xonsh discussions xonsh/xonsh#5019

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

No branches or pull requests

1 participant