Comment 19 for bug 1830096

Revision history for this message
In , Dtownsend (dtownsend) wrote :

Ok so it looks like bug 1554029 has landed and stuck and will be rolling out in a 67.0.1 soon. During testing of that I found that the suggestion I made in comment 6 would have actually only worked on some platforms due to a bug in the version comparator code. It probably would have worked on Linux but now the code is fixed it that changes things a little.

If you care about your users being able to upgrade from a version with the old-style build ID (14 digits based on the date) then either you need to:

1. Continue to use a purely numeric build ID that is larger each time you build (and the first must be larger than the last build ID your users have).

2. Switch to a build ID that can be parsed by the toolkit version code (https://developer.mozilla.org/en-US/docs/Mozilla/Toolkit_version_format) and must contain a character that is not a digit in it (or Firefox will just parse it as a number) and do the above.

For the second option in the first upgrade where users are switching from the old build ID to your new one the version comparator will consider the old build ID to be "0" because the number is too large and overflows. So for your new build ID to be larger than that then it has to be a valid version considered larger than or equal to 0. Mostly that means it must start with at least one digit so "1build1" would work (and then after "1build2" etc. would be considered larger.

It's a little uglier than I'd like unfortunately but it should work.