Open Bug 1585961 Opened 5 years ago Updated 2 years ago

Get rid of regex for parsing Firefox version number

Categories

(Testing :: geckodriver, enhancement, P3)

Version 3
enhancement

Tracking

(Not tracked)

People

(Reporter: ato, Unassigned)

Details

Attachments

(1 file)

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.

Priority: -- → P3

I’m going to have a look at this quickly.

Assignee: nobody → ato
Status: NEW → ASSIGNED
Priority: P3 → P1

I have a patch for this locally that needs tests, but this is on my back-burner.

Edit: Lost the patch.

Priority: P1 → P3

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

Attached file firefoxversions.txt

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.

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: ato → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: