Closed
Bug 1133725
Opened 9 years ago
Closed 9 years ago
Langpacks: rename languages-provided.ab-CD.version to "revision"
Categories
(Core Graveyard :: DOM: Apps, defect)
Core Graveyard
DOM: Apps
Tracking
(firefox36 wontfix, firefox37 wontfix, firefox38 fixed, b2g-v2.2 fixed, b2g-master fixed)
RESOLVED
FIXED
mozilla38
People
(Reporter: stas, Assigned: stas)
References
Details
Attachments
(1 file, 4 obsolete files)
9.80 KB,
patch
|
fabrice
:
review+
sicking
:
review+
bajaj
:
approval-mozilla-b2g37+
|
Details | Diff | Splinter Review |
For consistency with all other "version" fields in the manifest, it might make sense to change the version of the language resources included in the langpack to be a string. This way it's up to the user-code to decide how to compare to language versions. Relevant code: http://mxr.mozilla.org/mozilla-central/source/dom/apps/Langpacks.jsm#195
Assignee | ||
Comment 1•9 years ago
|
||
It looks like we do the comparison of language versions in platform, too: http://mxr.mozilla.org/mozilla-central/source/dom/apps/Langpacks.jsm#251 We'd need to convert the version to an int for this to work if we go ahead with this change proposed in this bug. Same in l10n.js, where we're already doing it implicitly: https://github.com/mozilla-b2g/gaia/blob/e4956b2ecd5357ba4aa7604ca2ab244b01366f7a/shared/js/l10n.js#L1708 Zibi, Fabrice -- what do you think about this? Is it worth it to keep the "version" field of "langpacks-provided" consistent wrt. type with other version fields in the manifest?
Flags: needinfo?(gandalf)
Flags: needinfo?(fabrice)
Assignee | ||
Comment 2•9 years ago
|
||
In order to avoid more confusion in the future, would it make sense to rename this field to "timestamp", of type string?
Comment 3•9 years ago
|
||
"timestamp" or something similar would make more sense IMHO. Having a "version" field that's actually an integer and not compatible with a lot of version numbering schemes developers use is confusing (I made the mistake when implementing langpacks in Marketplace, I thought that the version field not being a string was a typo, because of the inconsistency with the other "version" field at the root of the manifest).
Comment 4•9 years ago
|
||
(In reply to Staś Małolepszy :stas from comment #1) > Zibi, Fabrice -- what do you think about this? Is it worth it to keep the > "version" field of "langpacks-provided" consistent wrt. type with other > version fields in the manifest? I have no preference. The langpack version is the only one we actually use on the platform side so I'm fine we doing changes there if needed.
Flags: needinfo?(fabrice)
Assignee | ||
Comment 5•9 years ago
|
||
The W3C spec [1] doesn't even define the "version" field and MDN explicitly states that it's not used by the runtime [2]. This is different from what we're doing with languages-provided.ab-CD.version: it *is* used by the runtime in places which I listed in comment 1. This is bound to create confusion. The runtime needs to compare two language versions and in order to do so it has expectations re. the type of the version field. It needs to know how to compare them. Making it a string would complicate this by letting third-party developers believe they can use any versioning scheme they like. My suggestion is to: - rename languages-provided.ab-CD.version to languages-provided.ab-CD.revision to avoid confusion caused by the fact that other "version" fields in the manifest are usually of string type, - keep it as an integer type, - explicitly state in the langpack spec that the revisions need to be comparable with the "<" operator. This will involve a little bit of juggling since we'd need to land this in Gecko 37 and 38 and Gaia 2.0 and master. [1] https://w3c.github.io/manifest/ [2] https://developer.mozilla.org/en-US/Apps/Build/Manifest#version
Comment 6•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Summary: Langpacks: change languages-provided.ab-CD.version to a string → Langpacks: rename languages-provided.ab-CD.version to "revision"
Assignee | ||
Comment 7•9 years ago
|
||
Assignee | ||
Comment 8•9 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ebedf02e07d1
Attachment #8565897 -
Flags: review?(fabrice)
Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8565884 [details] [review] [gaia] stasm:1133725-langpack-revision > mozilla-b2g:master th: https://treeherder.mozilla.org/#/jobs?repo=gaia-try&revision=5c0bd04c3068
Attachment #8565884 -
Flags: review?(gandalf)
Comment 10•9 years ago
|
||
Comment on attachment 8565897 [details] [diff] [review] [gecko] rename language versions to revisions Review of attachment 8565897 [details] [diff] [review]: ----------------------------------------------------------------- lgtm, thanks Staś !
Attachment #8565897 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 11•9 years ago
|
||
Comment on attachment 8565897 [details] [diff] [review] [gecko] rename language versions to revisions Review of attachment 8565897 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/webidl/Apps.webidl @@ +10,5 @@ > }; > > dictionary LanguageDesc { > DOMString target; > + DOMString revision; Fabrice, since we want revision to be an int, do I need to change this here somehow?
Comment 12•9 years ago
|
||
(In reply to Staś Małolepszy :stas from comment #11) > Comment on attachment 8565897 [details] [diff] [review] > [gecko] rename language versions to revisions > > Review of attachment 8565897 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/webidl/Apps.webidl > @@ +10,5 @@ > > }; > > > > dictionary LanguageDesc { > > DOMString target; > > + DOMString revision; > > Fabrice, since we want revision to be an int, do I need to change this here > somehow? Ha you're right. Change that to be a `long` instead.
Assignee | ||
Comment 13•9 years ago
|
||
I changed the webidl definition of "revision" to long. https://treeherder.mozilla.org/#/jobs?repo=try&revision=fc50c134d29c
Assignee: nobody → stas
Attachment #8565897 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8565928 -
Flags: review?(fabrice)
Comment 14•9 years ago
|
||
Comment on attachment 8565884 [details] [review] [gaia] stasm:1133725-langpack-revision > mozilla-b2g:master lgtm. Thanks stas!
Flags: needinfo?(gandalf)
Attachment #8565884 -
Flags: review?(gandalf) → review+
Updated•9 years ago
|
Attachment #8565928 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 15•9 years ago
|
||
Adding checkin-needed for both Gecko and Gaia patches.
Keywords: checkin-needed
Updated•9 years ago
|
Keywords: checkin-needed
Comment 16•9 years ago
|
||
Autolander could not locate a review from a user within the suggested reviewer list. Either the patch author or the reviewer should be in the suggested reviewer list.
Comment 17•9 years ago
|
||
Assignee | ||
Comment 18•9 years ago
|
||
Comment on attachment 8566426 [details] [review] [gaia] stasm:1134536-langpack-revision > mozilla-b2g:master Wrong bug, sorry.
Attachment #8566426 -
Attachment is obsolete: true
Assignee | ||
Comment 19•9 years ago
|
||
Comment on attachment 8565884 [details] [review] [gaia] stasm:1133725-langpack-revision > mozilla-b2g:master Moved to bug 1134536.
Attachment #8565884 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 20•9 years ago
|
||
this needs dom peer review for the idl change
Flags: needinfo?(stas)
Keywords: checkin-needed
Assignee | ||
Comment 21•9 years ago
|
||
Comment on attachment 8565928 [details] [diff] [review] [gecko] rename language versions to revisions, patch 2 Jonas, can you review the change to dom/webidl/Apps.webidl? This bug is about changing the name of the "version" property of languages inside langpacks to "revision" to avoid confusion with string-typed "version" fields in other places of the manifest. The type stays the same (int), but the webidl file didn't reflect that so I'm taking the opportunity here to fix that, too.
Flags: needinfo?(stas)
Attachment #8565928 -
Flags: review?(jonas)
Comment on attachment 8565928 [details] [diff] [review] [gecko] rename language versions to revisions, patch 2 Review of attachment 8565928 [details] [diff] [review]: ----------------------------------------------------------------- r=me on the Apps.webidl part
Attachment #8565928 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 23•9 years ago
|
||
Comment on attachment 8565887 [details] [review] [spec] rename language version to revision Marking this pull request to the spec as obsolete as it's not really related to the Gecko implementation worked on in this bug. (Merged in https://github.com/stasm/spec/commit/f3c4d8476279da6c1905bd6eb43c57115125a6b3)
Attachment #8565887 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 24•9 years ago
|
||
Comment on attachment 8565928 [details] [diff] [review] [gecko] rename language versions to revisions, patch 2 NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): langpack spec change: "version" becomes "revision" (langpacks are a FxOS 2.2 feature) User impact if declined: langpacks' manifests will have two different "version" fields of two different types: a string one for the version of the langpack and an integer type for the version of the language included in the langpack; this is confusing and makes it easy to make mistakes Testing completed: unit tests Risk to taking this patch (and alternatives if risky): low; it's basically a search & replace patch String or UUID changes made by this patch: none
Attachment #8565928 -
Flags: approval-mozilla-b2g37?
Comment 25•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d2c5ad87e7db
Flags: in-testsuite+
Keywords: checkin-needed
Comment 26•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d2c5ad87e7db
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Updated•9 years ago
|
Attachment #8565928 -
Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Comment 27•9 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/d69d6897419e
status-b2g-v2.2:
--- → fixed
status-b2g-master:
--- → fixed
status-firefox36:
--- → wontfix
status-firefox37:
--- → wontfix
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•