Gracefully fallback to subprocess when Python wrappers not available/insufficient
Closed this issue · 14 comments
This should at least fix the Windows build so that we're not going backwards.
We should also fallback if we don't support the specified flags/combination of them.
@Vaydheesh why is the Windows build still not working? You mentioned something about lrx-proc
but I didn't really catch it.
https://ci.appveyor.com/project/sushain97/apertium-python/builds/25755769/job/sx0oreu75t67vq9l#L210
lrx-proc -m
seems to be expecting input from stdin
on windows. I tried building lrx-proc
on windows itself, and the last working commit was apertium/apertium-lex-tools@4165215
Should I log messages when calling processes upon falling back to subprcoess implementation?
This would help in finding the exact cause in future.
https://ci.appveyor.com/project/sushain97/apertium-python/builds/25755769/job/sx0oreu75t67vq9l#L210
lrx-proc -m
seems to be expecting input fromstdin
on windows.
Ah. This was working before, right?
I tried building
lrx-proc
on windows itself, and the last working commit was apertium/apertium-lex-tools@4165215
As in, it doesn't build after this commit or it hangs only after this commit?
Should I log messages when calling processes upon falling back to subprcoess implementation?
I'm not sure what you would log but go ahead and try? You can also run it locally, yes? If not: https://www.appveyor.com/docs/how-to/rdp-to-build-worker/.
lrx-proc was working till apertium/apertium-lex-tools@4165215
It failed on apertium/apertium-lex-tools@2a77a50
I'm not sure what you would log but go ahead and try?
I want to log the calling of each subprocess if python wrappers aren't available, like https://ci.appveyor.com/project/sushain97/apertium-python/builds/25755769/job/sx0oreu75t67vq9l#L210, RN its only showing test_en_spa (tests.TestTranslate) ...
https://ci.appveyor.com/project/sushain97/apertium-python/branch/master/job/9of59fyjciehgltr#L195
This might come handy if something fails during future builds
Sure, feel free to log at debug level. Can you talk to @unhammer about what might be wrong now? It seems like an error unrelated to swig entirely (you can confirm this on Windows?).
I'll re-compile this(just to be sure) and then discuss this tomorrow
Can we remove -m flag, when calling lrx-proc
during subprocess implementation. This should pass the test case in appveyor, until a fix is pushed on apertium-lex-tools
Uhh, I'm opposed to arbitrarily removing flags with semantic value. Presumably removing the -m
flag will change how a pair actually behaves and therefore is not OK.
There were discussions on actually removing the mode without -m
, so default acted the same way. We probably should wrap up that conversation
@xavivars makes sense. That being said, we can't just willy nilly remove the -m
from the mode pipe, yes?
@sushain97 Should I close this issue if any changes aren't required
Is there another issue tracking adding tests for this? If so, go ahead and close this one, yes.
The subprocess tests are tracked here #54