Closed Bug 1536045 Opened 8 months ago Closed 8 months ago

--enable-warnings-as-errors fails due to -D unused-doc-comments

Categories

(Core :: XPCOM, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: jbeich, Assigned: emilio)

Details

Attachments

(1 file)

After bug 1513009 and https://github.com/rust-lang/rust/pull/57882 the following happens.

$ rustc -vV
rustc 1.35.0-nightly
binary: rustc
commit-hash: e68bf8ae15ee
commit-date: 2019-03-11
host: x86_64-unknown-freebsd
release: 1.35.0-nightly
LLVM version: 8.0

$ echo "ac_add_options --enable-warnings-as-errors # mimic MOZ_AUTOMATION" >>.mozconfig
$ ./mach build
[...]
error: unused doc comment
--> xpcom/rust/nsstring/src/lib.rs:1174:1
|
1174 | / /// This trait is implemented on types which are Latin1 nsCString-like,
1175 | | /// in that they can at very low cost be converted to a borrowed
1176 | | /// &nsACString and do not denote UTF-8ness in the Rust type system.
1177 | | ///
1178 | | /// This trait is used to DWIM when calling the methods on
1179 | | /// nsACString.
| |_________________^
1180 | / string_like! {
1181 | | char_t = u8;
1182 | |
1183 | | AString = nsACString;
... |
1188 | | StringAdapter = nsCStringAdapter;
1189 | | }
| |_- rustdoc does not generate documentation for macro expansions
|
= note: -D unused-doc-comments implied by -D warnings
= help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion
error: aborting due to previous error

Component: XPCOM → General
Product: Core → Firefox Build System

$ echo "ac_add_options --enable-warnings-as-errors # mimic MOZ_AUTOMATION" >>.mozconfig

Unless you're using the exact same version of compilers are the Mozilla CI builds, you shouldn't do that. And you shouldn't try to mimic MOZ_AUTOMATION. What you want is --enable-release.

That being said, those are issues we'll have to fix eventually, but they're issues in the corresponding code, not the build system.

Component: General → CSS Parsing and Computation
Product: Firefox Build System → Core
Component: CSS Parsing and Computation → XPCOM

(In reply to Mike Hommey [:glandium] from comment #3)

$ echo "ac_add_options --enable-warnings-as-errors # mimic MOZ_AUTOMATION" >>.mozconfig

Unless you're using the exact same version of compilers are the Mozilla CI
builds, you shouldn't do that. And you shouldn't try to mimic
MOZ_AUTOMATION. What you want is --enable-release.

No. The intent here is to get compatibility with latest Rust version early as mozilla-central switches to latest release just a few weeks after its release (unlike with C++ compiler). See also bug 1337955, bug 1516845, bug 1531986 or even bug 1354994.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/942fd44a3510
Turn a comment into a non-doc comment. r=nika
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee: nobody → emilio

I assume this can ride to 68.

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