emina / rosette

The Rosette solver-aided host language, sample solver-aided DSLs, and demos
Other
638 stars 74 forks source link

`raco symtrace` could use idiomatic `--` flag to indicate the end of symtrace flags/beginning of script-under-test flags #258

Closed gussmith23 closed 1 year ago

gussmith23 commented 1 year ago

Thanks for the great tool! This is just for your consideration! No action needed if you all decide to keep things as they are.

I'm glad symtrace has the ability to pass through flags; see these lines:

https://github.com/emina/rosette/blob/649184faf1733239f19a843f7c44bb0f068bce5b/rosette/lib/trace/raco.rkt#L57-L59

At first, though, I didn't realize it had this ability, because at first I tried something like

raco symtrace <symtrace args> -- <my script args>

which is fairly idiomatic, in my experience with these kinds of tools. The benefits of this approach as opposed to how it's currently done are:

  1. the script-under-test can have args that collide with symtrace without causing issues. This may also depend on your flag parser. Currently, though, if the script under test has flags that collide with symtrace, you'll get issues.
  2. like I said, I think it's more idiomatic/expected!

Anyway, just a suggestion. Thanks for the great tool!

sorawee commented 1 year ago

AFAIK, -- should already work for raco symtrace. Here's a part of the output from raco symtrace --help:

  --
     Do not treat any remaining argument as a switch (at this level)

Can you post what you tried (more concretely) and what did not go as you expected?

gussmith23 commented 1 year ago

That's my mistake -- my script must have failed for some other reason. I can't reproduce my original error now. Sorry about that!