Menu

#1978 --adf Option causes program exit

None
WontFix
nobody
Low
2018-10-03
2017-07-01
No

Fgfs now intentionally exits upon encountering the option: --adf, a 'legacy' option. It seems a bit punitive to exit the program for this. The --adf option has always been , and remains, unambiguously synonymous with --adf1. The error message ' Please replace this with --adf1' confirms there is no possible confusion in its intent. Why not post a nag and get on with it, allowing scripts upwards of two decades old to just work ?
Suggest at src/Main/options.cxx # 1310:

static int
fgOptADF( const char * arg )
{
SG_LOG(SG_ALL,SG_ALERT,
"the option --adf is obsolete. Please use --adf1 "
"instead.");
if (parse_colon(arg, &rot, &freq))
fgSetDouble("/instrumentation/adf[0]/rotation-deg", rot);
fgSetDouble("/instrumentation/adf[0]/frequencies/selected-khz", freq);
return FG_OPTIONS_OK;
}

Thanks !

Discussion

  • Huntley Palmer

    Huntley Palmer - 2017-07-01

    That suggested change needs, also,
    double rot, freq;
    c.f the treatment for --adf1

     
  • xDraconian

    xDraconian - 2018-09-26
    • Milestone: 2017.3 --> None
     
  • xDraconian

    xDraconian - 2018-09-26
    • labels: --> Commandline, Usability
     
  • xDraconian

    xDraconian - 2018-10-02
    • status: New --> WontFix
     
  • xDraconian

    xDraconian - 2018-10-02

    I'm assuming everyone has acclimated to --adf1 at this point.
    Ticket has 0 votes. Closing request.

     
  • Huntley Palmer

    Huntley Palmer - 2018-10-03

    Under protest: it was utterly unnecessary in the first place to "acclimatise everybody" to breaking a command syntax that was valid for over twenty years, particularly since a valid fix was included in the ticket and the developer who made this change could have, with less work, have allowed the command to complete with simply a "deprecated, please update" console message instead of terminarting the application.

     
  • xDraconian

    xDraconian - 2018-10-03

    I don't have the background on the decision that led to this change, so I cannot comment on the rationale.

    Your suggestion of a deprecation message made a lot more sense back when this ticket was new. But now that this issue is over a year old it seems unproductive to include such a message.
    The question is, where do we go now? Is this message still needed?

    If this remains a pain point, I'll ask you to please create a new ticket based on the latest FG version with a renewed recommendation.
    My current perspective is that it was unfortunate this was not addressed more promptly, but I'm in favor of leaving this as-is.

     

Log in to post a comment.

MongoDB Logo MongoDB