New Issue: Alternative delimiter for mason build/run passthrough arguments

18280, "arezaii", "Alternative delimiter for mason build/run passthrough arguments", "2021-08-23T21:54:11Z"

Mason documentation indicates that a user may specify arguments to be passed, as-is, to the compiler through mason build, or the runtime through mason run by using a single dash - to indicate that all following arguments should be passed.
ex:

$ mason build - --cc-warnings
$ mason run - --configVar=value

However, the mason argument parsing code is not setup to match a single dash -, but rather a double dash --, meaning the examples above result in an argument parsing error, while the following will be accepted.

$ mason build -- --cc-warnings
$ mason run -- --configVar=value

In experimenting with this, it is clear that mason never actually sees a -- as the Chapel runtime consumes the first -- it encounters from the command line. This means that in practice a user may omit the -- entirely and not see an error, as below:

$ mason build --cc-warnings
$ mason run --configVar=value

The feature only appears to be working as intended because any unrecognized arguments are collected and passed to the runtime/compiler.

We would like to update the documentation to be clear and correct this behavior to actually recognize a delimiter which means "everything after this is to be passed along, unmodified."

One way to achieve this behavior is to simply use a different delimiter, such as ++ or a single dash -. Because convention (user expectation) appears to be the biggest driver of the -- syntax, we would like to gather user input before making the change.

The consequence of this action would be that any existing scripts that use the -- syntax would need to be updated with the new delimiter.