MantisBT - Rosetta | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000038 | Rosetta | [All Projects] Bad Coding | public | 2012-07-03 14:07 | 2012-07-03 15:31 |
Reporter | smlewis | ||||
Assigned To | |||||
Priority | low | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | OS | OS Version | |||
Product Version | |||||
Fixed in Version | |||||
Application(s) Affected | any with executable-defined options; AnchoredPDBCreator is the first example I found | ||||
Command Line Used | AnchoredPDBCreator -AnchoredPDBCreator:anchor_pdb | ||||
Developer Options | |||||
Fixed in SVN Version | |||||
Summary | 0000038: Executable-defined options cannot be namespaced | ||||
Description | The option system allows you to define options in basic/options_rosetta.py. This works great. Options defined in this way have C++ namespaces, and "option namespaces" such that they are namespaced on command line (like the in and file in -in:file:s). The options system forbids you from definition options elsewhere, mostly. This works great. The options system allows you to define options in executable files that can be referenced only within the code in that same file (global variable, but scoped to that file). This only sort-of works. You CAN C++ namespace options, but they do NOT acquire "option namespace" options. Options created in an executable cannot have namespace prefixes when used, and as a consequence cannot name-clash with any other options already existing. If this is intended behavior, it may not be the best design choice, because it forces suboptimal option names in executable-defined options. If this is unintended, then it's a bug. Example: AnchoredPDBCreator's options. The code defining the options namespaces them in text and in C++: interface_design/anchored_design/AnchoredPDBCreator.cc 53-namespace basic{ namespace options{ namespace OptionKeys{ 54-namespace AnchoredPDBCreator{ 55:basic::options::FileOptionKey const scaffold_loop("AnchoredPDBCreator::scaffold_loop"); 56:basic::options::FileOptionKey const scaffold_pdb("AnchoredPDBCreator::scaffold_pdb"); 57:basic::options::FileOptionKey const anchor_pdb("AnchoredPDBCreator::anchor_pdb"); 58:basic::options::FileOptionKey const target_pdb("AnchoredPDBCreator::target_pdb"); 59:basic::options::IntegerOptionKey const APDBC_cycles("AnchoredPDBCreator::APDBC_cycles"); 60-}//AnchoredPDBCreator 61-}}}//basic::options::OptionKeys Despite this clear namespacing to an AnchoredPDBCreator "options namespace", ONLY -anchor_pdb is accepted by Rosetta; -AnchoredPDBCreator:anchor_pdb is not accepted as a valid option. The second consequence of this unnamespaceability is that executable-defined options cannot have their name conflict with other existing options, as the options system is unable to discriminate them properly. | ||||
Steps To Reproduce | namespace the options in the AnchoredPDBCreator integration test and watch it fail | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-07-03 14:07 | smlewis | New Issue | |||
2012-07-03 15:31 | smlewis | Application(s) Affected | any => any with executable-defined options; AnchoredPDBCreator is the first example I found | ||
2012-07-03 15:31 | smlewis | Command Line Used | all => AnchoredPDBCreator -AnchoredPDBCreator:anchor_pdb | ||
2012-07-03 15:31 | smlewis | Description Updated | bug_revision_view_page.php?rev_id=8#r8 | ||
2012-07-03 15:31 | smlewis | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=10#r10 |
There are no notes attached to this issue. |