-
Notifications
You must be signed in to change notification settings - Fork 52
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
Activate Ruby environment using version managers #113
Conversation
ad16140
to
12172dc
Compare
Sorry I forget to response on it. (1) do you plan to make a npm package for it? |
Another question. On rbenv, |
12172dc
to
8efa22d
Compare
I've rebased the PR and modified the changes in #124, since we want all shells to use interactive mode to load Concerning your questions
|
Thank you for your quick reply.
If it will be released soon, I want to wait for it.
Yes. My idea is "assuming users use
I understand the technique. My question was it is intentional or not for |
7c6c7e1
to
f136729
Compare
Unfortunately, we're not going to be able to work on it immediately. I would recommend merging this for now to make it work on any version manager and then we can refactor once the NPM package is released.
The other managers have a lot of users as well - in particular
I pushed another commit adding a file watcher. I think it's worth supporting the case of updating |
src/extension.ts
Outdated
switch (true) { | ||
case shell && (shell.endsWith("bash") || shell.endsWith("fish")): | ||
return shell + " -l -c '" + cmd + "'"; | ||
case shell && shell.endsWith("zsh"): | ||
// As the recommended way, initialization commands for rbenv are written in ".zshrc". | ||
// However, it's not loaded on the non-interactive shell. | ||
// Thus, we need to run this command as the interactive shell. | ||
// FYI: https://zsh.sourceforge.io/Guide/zshguide02.html | ||
return shell + " -l -c -i '" + cmd + "'"; | ||
default: | ||
return cmd; | ||
|
||
if (this.support_login(shell)) { | ||
return shell + " -lic '" + cmd + "'"; | ||
} else { | ||
return cmd; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you cut out this part to another PR? I can merge it soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not merge this PR instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I can't merge this PR since @ko1-san is reviewing this PR, and he decides it. And the reason why I ask you to cut this part to another PR is that it is significant to merge this part regardless of this feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But, it's just a suggestion, I'll leave it up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your point of view, but my sincere opinion is that we should focus on getting this PR merged.
Using Ruby version managers is common practice on the community and making sure the environment is activated properly is essential to get all of the benefits of RDBG in the editor.
I think no configuration is better but I feel current proposed documentation asks user to write it if they uses a version manager. So I want to rewrite it after merge. |
Can you clarify what you mean by Totally okay with you refactoring as needed. Just trying to understand your perspective since the long term vision is for the Ruby LSP and RDBG to both use an NPM package for Ruby environment activation. |
f136729
to
037c575
Compare
We're adding the |
@vinistock |
037c575
to
581d3a0
Compare
I rebased. Let me know if you want to include the |
|
Closes #21
Add Ruby environment activation through version managers. This PR
rdbg
executable