Interpreter mode: Can't pass target arguments
Submitted by Michael 'Mickey' Lauer
Link to original bug (#793657)
Description
Created attachment 368652 Sample
Vala behaves somewhat erratic when being run in "interpreter" mode:
The attached sample prints out the arguments it has been passed via POSIX main.
With Vala master (ref c424722d) it doesn't seem to be possible to call it as expected. There are two issues:
1.) % vala --pkg=posix ./yo.vala
(vala:45413): GLib-CRITICAL **: g_strsplit: assertion 'string != NULL' failed
This is just cosmetics, hence a minor issue. However
2.) % vala --pkg=posix ./yo.vala Test error: Test not found
I would have expected that every command line argument after the "script" is passed to the target. It looks though as the compiler intercepts the 'Test' argument, hence it's not possible to call it at all. Consequently, calling it via ./yo.vala, which should work as well since the sample is using a #! as first line, fails as well.
Attachment 368652, "Sample":
yo.vala