Closed Bug 1519629 Opened 5 years ago Closed 5 years ago

Stylo fails with --enable-warnings-as-errors using Rust 1.33

Categories

(Core :: CSS Parsing and Computation, enhancement)

60 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox-esr60 --- unaffected
firefox64 --- unaffected
firefox65 --- unaffected
firefox66 --- fixed

People

(Reporter: jbeich, Assigned: emilio)

References

Details

After bug 1513009 and https://github.com/rust-lang/rust/pull/56407 build fails.

$ rustc -vV
rustc 1.33.0-nightly
binary: rustc
commit-hash: 6ecad338381c
commit-date: 2019-01-09
host: x86_64-unknown-freebsd
release: 1.33.0-nightly
LLVM version: 8.0

$ echo "ac_add_options --enable-warnings-as-errors # mimic MOZ_AUTOMATION" >>.mozconfig
$ ./mach build
[...]
error: missing documentation for macro
--> servo/components/style_traits/values.rs:162:1
|
162 | macro_rules! serialize_function {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> servo/components/style_traits/lib.rs:11:22
|
11 | #![deny(unsafe_code, missing_docs)]
| ^^^^^^^^^^^^

error: missing documentation for macro
--> servo/components/style_traits/values.rs:454:1
|
454 | macro_rules! define_css_keyword_enum {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors
error: Could not compile style_traits.

Fixed already in https://github.com/servo/servo/pull/22674, need to cherry-pick that. Will do the next sync as soon as I have a decent internet connection :)

That fix wasn't enough:

error: missing documentation for macro
--> objdir/x86_64-unknown-freebsd/release/build/style-4911552580805987/out/gecko/atom_macro.rs:9:1
|
9 | macro_rules! atom {
| ^^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> servo/components/style/lib.rs:26:9
|
26| #![deny(missing_docs)]
| ^^^^^^^^^^^^

error: missing documentation for macro
--> servo/components/style/gecko_string_cache/namespace.rs:15:1
|
15 | macro_rules! ns {
| ^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors
error: Could not compile style.

Depends on: 1519729
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Assignee: nobody → emilio

Jorg, thank you, but in this bug the original comment is about the crate style_traits, and that same error happens now in Thunderbird 60.8.0. No idea, why that error did not show up in Thunderbird 60.7.2. The error with the crate style is indeed fixed in Thunderbird 60.8.0.

Should I report a separate issue for that, or is this comment enough for backporting the style_traits fix?

(In reply to Paul Menzel from comment #6)

Jorg, thank you, but in this bug the original comment is about the crate style_traits, and that same error happens now in Thunderbird 60.8.0. No idea, why that error did not show up in Thunderbird 60.7.2. The error with the crate style is indeed fixed in Thunderbird 60.8.0.

That was incorrect. The error with crate style is still present. (I had left the sed command in and did not notice.)

Should I report a separate issue for that, or is this comment enough for backporting the style_traits fix?

Are you using the correct branch on mozilla-esr60? The fix is on the THUNDERBIRD_60_VERBRANCH.

Note that the support of TB 60.x is coming to an end with the imminent release of TB 68. Besides, this uplift was a personal favour since I used to work at the Fritz-Haber-Institute back in the 1980ies which I believe shared the "Rechenzentrum" with the Molekulargenetik, in the days when it moved from the old DECSYSTEM to Vax/VMS in the new building.

(In reply to Jorg K (GMT+2) from comment #8)

Are you using the correct branch on mozilla-esr60? The fix is on the THUNDERBIRD_60_VERBRANCH.

I used the 60.8.0 release source archive.

Note that the support of TB 60.x is coming to an end with the imminent release of TB 68.

Please note, that a lot of distribution have to fix these build errors, as they often use the latest Rust release (at least in some of their versions).

I used the 60.8.0 release source archive.

And the respective file doesn't have the fix shown in comment #5? That would indicate that the source archive isn't generated from the special Thunderbird branch. That would be a huge problem since whoever building TB 60.x wouldn't be getting all the special tweaks for TB on that branch. That's hard to believe since some of those tweaks are really quite fundamental and not having them would lead to severe malfunctions.

This bug and references to other bugs (where only one number differs) is so confusing. Anyway, looking into the source archive the cherry-picked commit https://hg.mozilla.org/releases/mozilla-esr60/rev/eb76765892cfd646d3014e5f3b8df8c6753da2d2 is there. But it was not actually the commit fixing the error.

The commits below referenced in bug 1519729 are actually needed.

https://hg.mozilla.org/mozilla-central/rev/4f2e84dc490d
https://hg.mozilla.org/mozilla-central/rev/f63ebd7e9e28
https://hg.mozilla.org/mozilla-central/rev/a2f691714d70
https://hg.mozilla.org/mozilla-central/rev/7ccafc4ab34c

Emilio, which of the commits would be needed on the 60 ESR branch to fix the compile error there? I'd say the first two since they remove an unused macro and add comments. The last two fix a typo and do some formatting, so I guess they are not needed.

I already didn't have any fun with https://hg.mozilla.org/releases/mozilla-esr60/rev/eb76765892cfd646d3014e5f3b8df8c6753da2d2 since all hunks of the patch needed rebasing. So I'd like to backport as little as possible.

Emilio, can you please advise. We have some users at a place where I worked more than 30 years ago who insist to compile the TB source with an incompatible compiler :-(

Apparently, the people over at Debian use this:
https://salsa.debian.org/mozilla-team/thunderbird/blob/debian/sid/debian/patches/fixes/rust-ignore-not-available-documentation.patch
See bug 1561926 comment #8 for details.

Actually, Paul, this should also affect compiling FF 60.x from sources. So why didn't you complain about that instead of complaining about TB?

(In reply to Jorg K (GMT+2) from comment #12)

[…]

Apparently, the people over at Debian use this:
https://salsa.debian.org/mozilla-team/thunderbird/blob/debian/sid/debian/patches/fixes/rust-ignore-not-available-documentation.patch
See bug 1561926 comment #8 for details.

Actually, Paul, this should also affect compiling FF 60.x from sources. So why didn't you complain about that instead of complaining about TB?

We build the latest Mozilla Firefox release here, which is 68.x now. Debian also includes Firefox ESR 60.8.0, and Mike just demoted the warnings as errors.

export RUSTFLAGS = --cap-lints warn

Maybe Mike can comment on these issues.

You need to log in before you can comment on or make changes to this bug.