Closed
Bug 839843
Opened 12 years ago
Closed 7 years ago
we should/should we do something about mozprofile/mozrunner CLI class self.args
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: k0scist, Unassigned)
Details
Both mozprofile and mozrunner take non-option associated CLI arguments
and store them as self.args:
https://github.com/mozilla/mozbase/blob/master/mozrunner/mozrunner/runner.py#L279
https://github.com/mozilla/mozbase/blob/master/mozprofile/mozprofile/cli.py#L29
However, neither one actually does anything with them. TL;DR - bug or
feature?
Obviously a low priority. IMHO the current behaviour is confusing if
you get things wrong: accepting extra command line arguments (as long
as they don't start with '-') and just ignoring them is never good
behaviour IMHO (well, just about never).
OTOH, the storing of self.args on these instances does make for
perhaps easier consumption as part of a larger program's CLI
('perhaps', I think, is the operative word here).
FWIW, the current behaviour is for historical reasons that were
questionable at the time and definitely don't apply now.
I'm fine with keeping things the way they are (and would actually
advocate for that for now). But wanted to raise the issue as known
before a user actually did (I know, the billions of them).
In the past, we have proposed making a generic mozoptions package that
would front-end the annoying CLI stuff and help standardize us how (we
assert) CLI should work. I think that that is really the proper place
to figure out a solution to this problem. However, I am not going to
ticket it at this time because (TL;DR - just skip if you're bored already):
- I don't have time to spec out how I think it should work right now
in the level of detail appropriate for discussion, owing one spec
already
- I find that filing bugzilla bugs with incomplete/stub proposals is
usually not helpful because it generates a lot of churn as people
try to guess what the other person's napkin drawings are all about
and since details are missed they tend to get scattered throughout
comments making them less a spec than ingredients to a spec
- (...and I won't even go into why I'm not writing the bug and
pointing to a wiki page, etherpad, email thread, google document,
or .txt file on k0s.org)
- assuming we're serious about getting on python 2.7 in <st>2012</st>
2013, we should use the argparse module for such a class, and we
should probably block on that for any work
- there will be a lot of strong opinions on how things *should* be
done for this, and, the *best* case scenario is probably a
compromise where no one will be happy but no one feels shafted. Just
betwen A*Team and RelEng members, I've had a number of discussions
about how certain aspects of (unix-like) arguments should be treated
and there is considerable variation of opinions on the matter. Of
course, my way is correct, but... ;)
- ...and there will be the large amount of work of converting
all-the-things to use what we right here. Worthwhile, but I don't
believe we should do it now
Anyway, all off topic, just wanted to cover the bases here (though I
probably made a few laps at this point).
Comment 1•7 years ago
|
||
Mass closing bugs with no activity in 2+ years. If this bug is important to you, please re-open.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•