#2076 closed defect (fixed)
simulation command-line arguments have changed
Reported by: | Bill Janssen | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.0 |
Component: | Backend | Version: | trunk |
Keywords: | Cc: | Lennart Ochel |
Description
Until recently (1.9.0b3) the generated C simulation programs could be run with "-f FILENAME" and "-r FILENAME". Suddenly in the trunk those command line switches have changed (after years) to be "-f=FILENAME" and "-r=FILENAME". This has broken downstream code, without warning. Please either revert the command-line flags to the previous behavior, or explain why the change is necessary.
Change History (11)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Cc: | added |
---|
comment:3 by , 12 years ago
So, why isn't "-override" now "-override=VALUES"? I don't think this is really consistent, so given that you're breaking a long-standing API with these changes, I think making the changes is on balance doing damage to your user community.
comment:4 by , 12 years ago
You mean something like "–override=var1=start1,startTime=val1" That looks quite strange and would not be very intuitive/user-friendly.
comment:5 by , 12 years ago
That's exactly what I mean. Right now you've got a mix of "-f VALUE", "-f=VALUE", and "-f", which is hard for people to remember. But if you don't like my suggestion for -override, what I actually prefer is this: go back to having just two consistent forms: "-f" and "-f VALUE". That way, "-r FOO" and "-override A=B,C=D" both follow the same rules.
comment:7 by , 12 years ago
Lennart, why don't we simply allow both types of input? It's not that hard to validate that input.
-r FOO and -r=FOO could both be allowed and everyone will be happy.
comment:8 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I already had the same idea to make everyone happy. I will implement it.
comment:9 by , 12 years ago
As far as I know all the flags were changed to
-flag=something, including override and overrideFile,
so that usage is homogeneous.
Yes, it would be good to provide either way with
-flag=something or -flag something (more natural
to users).
I think that not so many people are using the generated
executable directly and the changes to the programs that
start these are minimal (an = instead of a space).
Maybe is just a annoyance that we break the backwards
compatibility on this, but no more than that.
comment:10 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
No, the flags were changes to what I wrote in the beginning (3 types). But I guess even that was quite homogeneous. It should be comprehensible to use different notations for different flag-types.
Anyway, I have changed it in r15275 to make everyone happy. Now we can either use <-f=value> and <-f value>.
The command line flags for the simulation has been changed to provide better warnings. The old implementation did not recognized unknown flags or flag-values. If a user has misspellings in his flags, the simulation just ignored that flags without any warning.
Also the usage of the different flag types was not consistent.
Now we have 3 different flag-types: