Closed Bug 1428989 Opened 2 years ago Closed 2 years ago

AndroidRect.{cpp,h} are not deterministically generated

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

There are multiple methods with the same name and that differ in their arguments. They end up being ordered in the source file randomly, despite there being some sorting done, because the sorting is only done on the method name.

This yields differences in the generated libxul.so, such as those that can be seen in https://public-artifacts.taskcluster.net/JTNlfog1TRqo6Ky_2R6lXQ/0/public/diff.html
Comment on attachment 8940974 [details]
Bug 1428989 - Generate Android bindings more deterministically.

This appears to not be enough.
Attachment #8940974 - Flags: review?(nalexander)
Comment on attachment 8940974 [details]
Bug 1428989 - Generate Android bindings more deterministically.

https://reviewboard.mozilla.org/r/211252/#review217178

Thanks, glandium.

::: build/annotationProcessors/SDKProcessor.java:339
(Diff revision 3)
>              @Override
>              public int compare(Member a, Member b) {
> -                return a.getName().compareTo(b.getName());
> +                int result = a.getName().compareTo(b.getName());
> +                if (result == 0) {
> +                    if (a instanceof Constructor && b instanceof Constructor) {
> +                        String sa = Arrays.toString(((Constructor)a).getParameterTypes());

nit: space after the cast, like `(Constructor) a` (throughout).
Attachment #8940974 - Flags: review?(nalexander) → review+
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/5faa09169991
Generate Android bindings more deterministically. r=nalexander
https://hg.mozilla.org/mozilla-central/rev/5faa09169991
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.