Get rid of regex for parsing Firefox version number
Categories
(Testing :: geckodriver, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: ato, Unassigned)
Details
Attachments
(1 file)
7.56 KB,
text/plain
|
Details |
We parse the output of --version
as part of the capabilities negotiation in testing/geckodriver/src/capabilities.rs:83.
This is because the output may contain more data we don’t care about.
We could easily replace this with a small lexer.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
I’m going to have a look at this quickly.
Reporter | ||
Comment 2•5 years ago
•
|
||
I have a patch for this locally that needs tests, but this is on my back-burner.
Edit: Lost the patch.
Reporter | ||
Comment 3•4 years ago
|
||
version_from_binary()
should in fact be using mozversion::Version::from_str()
so we only parse the version number in one place.
However, mozversion
still relies on a regexp:
https://searchfox.org/mozilla-central/rev/9b99e1d9c6cf83539674cb016c7373f549ba59ca/testing/mozbase/rust/mozversion/src/lib.rs#119
Reporter | ||
Comment 4•4 years ago
|
||
Attaching list of historical Firefox versions. This was extracted from https://product-details.mozilla.org/1.0/firefox.json.
This is useful input for version parsing tests.
Comment 5•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Updated•2 years ago
|
Description
•