-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
tea symbolic links should be development environment aware #667
Comments
I think this only doesn't work because the dev-env wasn't updated, which is a separate “bug” that we have avoided fixing so far for performance reasons, but yep: it's confusing and not delightful. If you were to |
@mxcl please note that I believe the |
oh ok, not a bug then, more a thing about how the symlinks to tea work, they are not dev-env aware without magic. The magic adds the env to the shell environment which tea then sees when it is invoked via symlink. Which I think is the right choice. magic is named accordingly and this feels like magical behavior. Maybe I'm wrong… feel free to opine. |
Sure, that sounds like magic indeed. But the issue I'm reporting is for when magic can't be used. This is stated in the documentation:
In the latter example (VS Code), the editor runs within a development environment with a potential version of However, when executing such binaries, VS Code won't have tea magic in place (unless an extension can overcome this limitation someday, but then we will have countless other editors or tools to tackle). Thus, while creating symbolic links helps the editor to have some version of As mentioned above, this is something Volta addresses. Their symbolic links to I can of course understand that such operation can be costly on the performance, but it should be doable (even if it requires special files like |
Maybe on first invocation it can take a longer time to "parse" the environment, but then subsequent calls can be speeded up by leveraging some cache mechanism. Example:
Later executions:
|
Thanks for great tool. I expect behaviour of flag |
That actually makes sense. Why not? # no tea magic installed
$ tea node --version
v20.5.0
$ cd $(mktemp -d)
$ echo 18.17.0 > .node-version
# why not make --env on by default?
$ tea node --version
v18.17.0
# but we should allow to disable such behavior
$ tea --no-env node --version
v20.5.0 Again, if performance impact is the barrier, we can certainly work to keep it minimal. |
However provided the I'm considering though that perhaps our stubs should respect the dev env and otherwise use the version that was “installed” as that seems more correct, that could be done quite easily. Requires some thought. Please chime in! |
I totally agree. Functionality, it would work the same as I mentioned in #667 (comment), the difference being stubs in place of symlinks. |
This is fixed per-se with the v1 release, though I think invocations of tools via scripting should operate in a |
Otherwise things like pinning
python
version to 3.7 through.tea.yml
and expecting VS Code's Python extension to pick it up from the PATH won't work.The documentation mentions that for things where magic doesn't apply, like VS Code extensions for finding Python's version and so on, you can create a symbolic link (on Linux it should be hard links) so that VS Code can "see" tea's python as a binary in your PATH.
In the current state, tea's symlinks will only use the global tool version.
Example:
This is something Volta does by the way:
The text was updated successfully, but these errors were encountered: