Repository navigation
Only warn about duplicate script engines - #65
Conversation
|
@ctrueden could you have a look and merge if you find it okay? |
|
Hi guys, I'm thinking that CPython and Jython are two different beasts and that it's reasonable to choose one or the other. Maybe you still only want to warn, but also maybe you want CPython and Jython to have two different names? |
Once we have a Python script engine based on real Python (started in https://github.com/scijava/scripting-cpyton), we will want to avoid erroring out when there are *two* implementations for the same name, and instead let the implementation with the higher priority win. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The problem is not so much the name. The problem is the file extension, actually. We already have a number of |
|
Also: we cannot simply rename the language "Python" to "Jython" in Even worse: once we have cpython, the "Python" language would not at all be executed by the same interpreter anymore! So I am really in favor of just warning the user. It means also that we need a way for users to override compiled-in priorities so they can force one over the other language interpreter. What we should do in any case is to add more names to the interpreters, in addition to "Python". Jython should return both "Python" and "Jython", cpython should return both "Python" and "CPython". |
|
Should we support something like |
That would suggest that the scripts are actually to be executable from the command-line (which is a different thing altogether, something we still might want to support, but in addition to the issue at hand). Besides, it will interfere with the |
|
As for the names, see: https://github.com/scijava/scripting-jython/compare/language-name |
|
@dscho wrote:
My point is that we could have some sort of header indicating the preferred interpreter. It doesn't have to be
Improving the parameter handling to support this would be rather trivial, so that is a non-issue. |
|
Okay, fine, I still want to merge this pull request, though... ;-) Objections? |
|
Oh yeah, as we briefly discussed, I am on board with this change. Sorry to give an impression otherwise. The main thing I was hesitant about (why I didn't just merge it) is the behavior of the |
Only warn about duplicate script engines
Once we have a Python script engine based on real Python (started in
https://github.com/scijava/scripting-cpyton), we will want to avoid
erroring out when there are two implementations for the same name,
and instead let the implementation with the higher priority win.
Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de