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

Intent to change signature of context_sensitive_executable_path #1362

Open
kaste opened this issue Apr 28, 2018 · 4 comments
Open

Intent to change signature of context_sensitive_executable_path #1362

kaste opened this issue Apr 28, 2018 · 4 comments
Labels

Comments

@kaste
Copy link
Contributor

kaste commented Apr 28, 2018

context_sensitive_executable_path had a polymorphic signature in that
it also allowed the full cmd to be passed in. However all
implementations then only extracted cmd[0] and acted upon that.

Esp. for the new which_executable we want a simpler signature, so that
the user can just call e.g. self.which_executable('mypy'). We, of
course, could transform this internally to ['mypy'], pass it down,
and transform it back to 'mypy' in every csep implementation but
that seems unnecessary.

So the question is, is it sufficient to compute the executable from one
str (like all our implementations), or does the executable depend on the
full cmd.

@kaste
Copy link
Contributor Author

kaste commented Apr 29, 2018

Of course, ideally we could just call something like self.get_executable() bc the 'mypy' can be inferred.

@FichteFoll
Copy link
Contributor

The use case would be an executable setting override from the user like ['python', '-m', 'mypy'], correct?

@kaste
Copy link
Contributor Author

kaste commented Jun 11, 2018

I don't quite understand what you mean. It's already implemented in #1363 though. I think this should be mostly internal. The call signature changes from Union[List[str], str] to just str.

If a user wants to know which executable is configured, you just ask get_executable() which is a typical getter from None to Optional[List[str]]

@FichteFoll
Copy link
Contributor

FichteFoll commented Jun 11, 2018

I'm just not sure currently when user overrides (of executable) are accounted for and when the csep is called, i.e. which is first. It's been a while since I looked at the code. I'm thinking csep would be called beforehand, however. If it is, I don't see any issues with this.

I don't have a particular use case in mind. I was just wondering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants