dap-mode icon indicating copy to clipboard operation
dap-mode copied to clipboard

Update dap-python for running in pipenv

Open MokkeMeguru opened this issue 4 years ago • 8 comments

We have many options for executing the python program. At first, I want to add "pipenv" into the option.

MokkeMeguru avatar Jun 08 '20 11:06 MokkeMeguru

@mpanarin, willing to take a look?

yyoncho avatar Jun 08 '20 13:06 yyoncho

It is the same as https://github.com/emacs-lsp/dap-mode/issues/202 To be honest, I am against explicit support of the virtualenv in lsp-mode or dap-mode. This should be handled by emacs and its executable-find. There are a bunch of packages and minor-modes that will make executable-find find a proper python in virtualenv. I mentioned a few in the issue above.

The problem with supporting virtualenvs is that everyone uses them differently. You can use them through pipenv, 'virtualenv', 'virtualenvwrapper', 'poetry' to name a few. And I don't think we should write support for all of them. pyenv is a bit different as it is not really a virtualenv, so we have a direct support for it.

But I am definitely open for a discussion @ericdallo @seagle0128 @yyoncho

mpanarin avatar Jun 08 '20 14:06 mpanarin

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.

ericdallo avatar Jun 08 '20 14:06 ericdallo

But now you are supported pyenv. If you want to do so, you should remove pyenv option, shouldn't you?

MokkeMeguru avatar Jun 08 '20 14:06 MokkeMeguru

In my opinion, we can give the execute-python-path into a template. Can you fix it?

MokkeMeguru avatar Jun 08 '20 14:06 MokkeMeguru

@MokkeMeguru pyenv is a version manager, not a virtualenv manager. As I said, it is a different story, so we support it explicitly

mpanarin avatar Jun 08 '20 14:06 mpanarin

If so, then we must consider conda, and Pyflow... It will be too complex problem...

MokkeMeguru avatar Jun 08 '20 14:06 MokkeMeguru

So how to run dap on python with pipenv? No way?

greboide avatar Jul 15 '20 23:07 greboide

@MokkeMeguru @mpanarin Since this pull-request is not accepted and #294 is an alternative: can this one be closed?

htgoebel avatar Feb 26 '23 13:02 htgoebel

hi @htgoebel IMO, this pr can be closed. thanks for your review

MokkeMeguru avatar Feb 26 '23 15:02 MokkeMeguru