Opened 13 years ago

Closed 12 years ago

#3942 closed Bugs (fixed)

Backwards Compatibility break, program_options error with multiple occurrences

Reported by: Scott MacVicar <macvicar@…> Owned by: Vladimir Prus
Milestone: Boost 1.44.0 Component: program_options
Version: Boost 1.44.0 Severity: Showstopper
Keywords: Cc:

Description

We recently upgraded a project to 1.42 and noticed that command line parsing has regressed since 1.41.

We defined --config and --config-value, with 1.42 we get an error regarding multiple occurrences. In 1.41 this worked without issue.

[macvicar@dev457 /tmp] LD_LIBRARY_PATH=/tmp/b142/lib ./a.out --config foo --config-value bar
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::multiple_occurrences> >'
  what():  multiple occurrences
Aborted
[macvicar@dev457 /tmp] LD_LIBRARY_PATH=/tmp/b141/lib ./a.out --config foo --config-value bar
config: foo
config-value: bar

Attachments (1)

boost-program-options.cpp (1.3 KB ) - added by Scott MacVicar <macvicar@…> 13 years ago.
Test demonstrating program_options regression

Download all attachments as: .zip

Change History (9)

by Scott MacVicar <macvicar@…>, 13 years ago

Attachment: boost-program-options.cpp added

Test demonstrating program_options regression

comment:1 by Scott MacVicar <macvicar@…>, 13 years ago

Summary: BC break, program_options error with multiple occurrencesBackwards Compatibility break, program_options error with multiple occurrences

comment:2 by Vladimir Prus, 13 years ago

Resolution: fixed
Status: newclosed

(In [59744]) Robustify disambiguation of full/approximate matches.

Fixes #3942.

comment:3 by anonymous, 12 years ago

Resolution: fixed
Status: closedreopened

comment:4 by anonymous, 12 years ago

the bugfix is not included in Boost 1.44 see author's comment here http://stackoverflow.com/questions/2589668/boostprogram-options-bug-or-feature

comment:5 by anonymous, 12 years ago

Milestone: Boost 1.43.0Boost 1.44.0
Version: Boost 1.42.0Boost 1.44.0

comment:6 by Vladimir Prus, 12 years ago

Scott, I am confused about your changes to the ticket. For starters, 1.44.0 is already released, so setting milestone to 1.44 is surely wrong (and generally, milestones are for library authors to set). But further, my comment on that site refers to 1.43. The change in question is on the release branch, since 2010-05-14. Therefore, I am not sure what you expect me to do?

comment:7 by macvicar@…, 12 years ago

I didn't change this, was someone else.

  • Scott

comment:8 by Vladimir Prus, 12 years ago

Resolution: fixed
Status: reopenedclosed

Oh, sorry. Then I'll just make it fixed again.

Note: See TracTickets for help on using tickets.