-
Notifications
You must be signed in to change notification settings - Fork 182
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
Update dap-python for running in pipenv #293
Conversation
We have many options for executing the python program. At first, I want to add "pipenv" into the option.
dap-python.el
Outdated
(python-executable (dap-python--pyenv-executable-find dap-python-executable)) | ||
(virtualenv-type (plist-get conf :virtualenv)) | ||
(python-executable | ||
(cond ((= virtualenv-type "pyenv") |
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 think string=
is better for string comparison.
Is there any reason for virtualenv-type
to be a string? a symbol could fit better, what do you think?
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 afraid that symbol will pollute global variables... (I know emacs-lisp a bit.)
string= is better
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.
If the symbol is correct in terms of emacs lisp, please tell me.
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.
Symbols don't pollute the global namespace, unless you intern them, which you needn't do. A symbol ('foo) is just a lisp object like an int, string, .... You could use (eq virtualenv-type 'pyenv) instead of (= virtualenv-type "pyenv"), the latter invalid anyway since = can only compare ints and markers.
Co-authored-by: Eric Dallo <[email protected]>
@mpanarin, willing to take a look? |
Co-authored-by: Eric Dallo <[email protected]>
It is the same as #202 The problem with supporting virtualenvs is that everyone uses them differently. You can use them through But I am definitely open for a discussion @ericdallo @seagle0128 @yyoncho |
I agree with @mpanarin, IMO we should make dap-mode extensible and easy to setup with different templates, support all possible virtualenvs seems to be too much. |
But now you are supported pyenv. If you want to do so, you should remove pyenv option, shouldn't you? |
In my opinion, we can give the execute-python-path into a template. |
@MokkeMeguru pyenv is a version manager, not a virtualenv manager. |
If so, then we must consider conda, and Pyflow... It will be too complex problem... |
So how to run dap on python with pipenv? No way? |
@MokkeMeguru @mpanarin Since this pull-request is not accepted and #294 is an alternative: can this one be closed? |
hi @htgoebel |
We have many options for executing the python program.
At first, I want to add "pipenv" into the option.