Open Bug 1389751 Opened 7 years ago Updated 2 years ago

runtime.getBrowserInfo() expose beta version build number

Categories

(WebExtensions :: General, defect, P5)

defect

Tracking

(Not tracked)

People

(Reporter: ke5trel, Unassigned)

References

Details

Version values returned by runtime.getBrowserInfo():

> Nightly: 57.0a1
> Developer Edition: 56.0
> Beta: 56.0
> Release: 55.0

Beta version values lack the 'b' component (56.0b1) making them indistinguishable from release versions.
Blocks: 1268399
This is how version numbers are handled, but bug 1386076 should meet your needs.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
I want to notify the user when the beta build number changes in a format that is familiar to the user. It looks like this would require AppConstants.MOZ_APP_VERSION_DISPLAY to be exposed.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Summary: runtime.getBrowserInfo() does not identify beta versions → runtime.getBrowserInfo() expose beta version build number
I created bug 1386076 and yeah, the beta version number is a thing I need too, by the same reasons given in that bug.
Priority: -- → P5
I can add it as part of the patch for bug 1386076, or with other patch here.

Is it then Ok to change to AppConstants.MOZ_APP_VERSION_DISPLAY as the value returned for the version number by runtime.getBrowserInfo, instead of the current implementation? I think that numbers for beta builds will be the only affected by this.
Product: Toolkit → WebExtensions
Bulk move of bugs per https://bugzilla.mozilla.org/show_bug.cgi?id=1483958
Component: Untriaged → General

This is still a problem in recent beta builds. Is there any change that we can get that fixed? It will help a lot our users of the Nightly Tester Tools extension (https://github.com/mozilla/nightlytt/issues/204). If yes, what would be the right way to do it? Using AppConstants.MOZ_APP_VERSION_DISPLAY instead for the value of version?

Flags: needinfo?(mixedpuppy)
Status: UNCONFIRMED → NEW
Ever confirmed: true

I suspect the version number works that way for a reason. Maybe we should expose the update channel instead?

https://searchfox.org/mozilla-central/source/toolkit/components/extensions/parent/ext-runtime.js#117-118

const { name, vendor, version, appBuildID } = Services.appinfo;
const info = { name, vendor, version, buildID: appBuildID, updateChannel: AppConstants.MOZ_UPDATE_CHANNEL };
Flags: needinfo?(mixedpuppy)

Note that when using Nightly the version number that we currently get is 96.0a1. So I wonder why beta / DevEdition doesn't include the build number in Services.appinfo.version.

Also note that the update channel does not give the build number neither. It's just beta or aurora.

Mike, do you know why we have that difference?

Flags: needinfo?(mh+mozilla)

Please don't use the update channel.

I don't know whether Services.appinfo.version should reflect the real version or not. But the general reason why the beta version is not fully available (apart from AppConstants.MOZ_APP_VERSION_DISPLAY) is that betas are meant to be as close to releases as possible. I don't know whether this rule applies to runtime.getBrowserInfo or not.

Flags: needinfo?(mh+mozilla) → needinfo?(ryanvm)

I have no idea what the implication of changing runtime.getBrowserInfo to use MOZ_APP_VERSION_DISPLAY would be in practice. But yes, Beta as currently constructed is meant to track closely as release-ready builds so the lack of beta build number in the version string was an intentional choice.

Flags: needinfo?(ryanvm)

Could we instead have another property on BrowserInfo like fullVersion that relies on MOZ_APP_VERSION_DISPLAY instead? If yes, which work would be required to get it implemented?

Not sure where suggestions for API additions are discussed. If that is the wrong component where else should it be made? Shane maybe you as triage owner can help? Thanks.

Flags: needinfo?(mixedpuppy)

:whimboo a new property there should be fine. I don't like fullVersion -> VERSION_DISPLAY. I'd be more inclined towards firefoxVersion: MOZ_APP_VERSION_DISPLAY to really avoid future name conflicts. Or maybe parse the beta version out to e.g. extraVersionInfo: "b1"

Flags: needinfo?(mixedpuppy)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.