Okay, well, here I am resuming this conversation after a 3 month hiatus.
This whole situation with the tests for python and csharp (but particularly for csharp) has certainly caused me a fair bit of pain/discomfort over the last few months. And I've decided that this is a problem that must be resolved. And I see little option but to resolve it by taking a rather autocratic sort of "executive decision".
Effective, as soon as possible, we will NOT be using either Jython or IronPython, or Mono, for that matter, in this project.
Any use of Python should be the standard or canonical CPython only, and then only for the Python generating branch of the project.
But, I mean, look, as regards the Csharp tests, I took at least a couple of runs on getting it working on my own box and just never succeeded -- not on Mac or LInux, but not even on Windows. A couple of weeks ago, I recruited the help of an online acquaintance to try to help me get the Csharp tests working locally. This guy has quite a bit of experience with Dotnet. Well, I figured that surely I was just missing something obvious and he could figure it out quickly.
Result: This guy also could not get the tests working locally.
But there was a key moment in that whole interaction. After at least an hour of mucking with this thing (I'm sure it was over an hour, but you know, one loses one's notion of time when mucking with all these magical incantations on the command-line...) but anyway, after various attempts to get this all working, I had a sort of epiphany because the guy asked me the following question: "What is this ipy thing?"
And then, of course, I answered. I told him: "Oh, that's IronPython, which is a version of Python that runs on dotnet... analagous to Jython, which is a version of Python that runs on the JVM...."
Come to think of it, in retrospect, I don't think he knew what Jython was either. Not sure about that, but he definitely did not know what ipy was. So, hopefully, you get my point. I don't know exactly how to put it, but I would say that for most people, these are very sort of weird, exotic things. I mean, aside from the fact that we need these tests for our own purposes, we also need to provide very clear examples of usage. I mean, so finally, I just decided, for various reasons, that our test harness for running a Csharp example MUST be written in Csharp. Our test harness for running a parser generated in Java MUST be in Java -- not in Jython (or JRuby or Kotlin or.... The test harness for a parser generated in Python MUST be in Python -- but again, we only use the canonical CPython.
Really, it doesn't matter that you can express whatever test harness code a bit more tersely and elegantly in some alternative language for the JVM, or Dotnet... I'm not saying that what I did was perfect or anything, but I think we should have something for Python and CSharp that is much more similar to the the little test harnesses I wrote to invoke the parsers generated in Java -- JParse.java, CSParse.java, or PyTest.java respectively. Granted, those files are a bit repetitive and it's in the back of my mind to fix it up a bit, BUT... the point here is that at least those things provide a fairly clear example (I think) of how to invoke the parser. Another thing, by the way, is that they provide a
main() method that you can use as the entry point to fire up the thing in a debugger. I'm not saying, by the way, that it's impossible to get the code working in a debugger if it is invoked from Jython or IronPython. I'm sure it's possible, but it's far less obvious!
Well, I guess I've said what I meant to say. I would just add that I feel that this is part of a larger whole, which is that we do need to get much more... I guess the word might be purposeful... about setting certain objectives and systematically getting there. Well, I guess the broad objective I'm thinking about mostly is just getting this out there into these communities -- Python, Dotnet/CSharp... -- to announce the tool and have a reasonable expectation that somebody with some curiosity could get in there and get the examples working in short order. And I would have to say that, for me, it is really quite frustrating that we have had the Python and CSharp code generation working basically for over a year and we have, as far as I know, ZERO users. Well, it's not that we have widespread adoption on the Java side either, and we need to address that, but I'm sure there are some users. I recall vaguely that, back in the FreeMarker days, I estimated that, at most 1 in 30 end-users ever showed up in our community and said boo. But, well, I guess different people are motivated by different things. You put a very considerable work into getting the CSharp and Python code generation working. To do that and then not put in the incremental work to get this out there and get some people actually using it.... Well, whatever, but speaking for myself, I really want to get to that point reasonably quickly. Now that we have the machinery done for a polyglot project, and it looks feasible to get INJECT working for Python and CSharp pretty soon, I really want to get to the point where we can scream this from the rooftops. Maybe by the end of the summer at latest. Hopefully sooner...
But, look, I don't want to argue about this IronPython/Jython question. I've decided that we're not going to use those things in this project moving forward. At least not for now... So I'd really like you to address this ASAP.