Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md: Command line example does not work with rustc nightly 2020-04-30 #427

Closed
gifnksm opened this issue May 1, 2020 · 10 comments · Fixed by #428
Closed

README.md: Command line example does not work with rustc nightly 2020-04-30 #427

gifnksm opened this issue May 1, 2020 · 10 comments · Fixed by #428

Comments

@gifnksm
Copy link

gifnksm commented May 1, 2020

The following command line option no longer works with rustc nightly due to the removal of the -Zno-landing-pads option (rust-lang/rust#70175)

export CARGO_INCREMENTAL=0
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"
rivy added a commit to rivy/rs.coreutils that referenced this issue May 1, 2020
…nightly toolchain

## [why]

Code coverage must currently use some unstable features in nightly rust builds. The
nightly builds are, by definition, unstable and subject to frequent breaking changes.
To prevent CI build breakage, the toolchain is pinned to a specific known working set.

Note: (maint!) this will require periodic review until code coverage is more fully
implemented/integrated into Rust and moved into the stable channel.

- refs: <mozilla/grcov#427>, <newsboat/newsboat#916>
rivy added a commit to rivy/rs.coreutils that referenced this issue May 1, 2020
…nightly toolchain

## [why]

Code coverage must currently use some unstable features in nightly rust builds. The
nightly builds are, by definition, unstable and subject to frequent breaking changes.
To prevent CI build breakage, the toolchain is pinned to a specific known working set.

Note: (maint!) this will require periodic review until code coverage is more fully
implemented/integrated into Rust and moved into the stable channel.

- refs: <mozilla/grcov#427>, <newsboat/newsboat#916>
rivy added a commit to rivy/rs.pastel that referenced this issue May 1, 2020
…nightly toolchain

## [why]

Code coverage must currently use some unstable features in nightly rust builds. The
nightly builds are, by definition, unstable and subject to frequent breaking changes.
To prevent CI build breakage, the toolchain is pinned to a specific known working set.

Note: (maint!) this will require periodic review until code coverage is more fully
implemented/integrated into Rust and moved into the stable channel.

- refs: <mozilla/grcov#427>, <newsboat/newsboat#916>
rivy added a commit to rivy/rs.pastel that referenced this issue May 1, 2020
…nightly toolchain

## [why]

Code coverage must currently use some unstable features in nightly rust builds. The
nightly builds are, by definition, unstable and subject to frequent breaking changes.
To prevent CI build breakage, the toolchain is pinned to a specific known working set.

Note: (maint!) this will require periodic review until code coverage is more fully
implemented/integrated into Rust and moved into the stable channel.

- refs: <mozilla/grcov#427>, <newsboat/newsboat#916>
rivy added a commit to rivy/rs.pastel that referenced this issue May 1, 2020
…nightly toolchain

## [why]

Code coverage must currently use some unstable features in nightly rust builds. The
nightly builds are, by definition, unstable and subject to frequent breaking changes.
To prevent CI build breakage, the toolchain is pinned to a specific known working set.

Note: (maint!) this will require periodic review until code coverage is more fully
implemented/integrated into Rust and moved into the stable channel.

- refs: <mozilla/grcov#427>, <newsboat/newsboat#916>
@wusyong
Copy link
Contributor

wusyong commented May 2, 2020

So is it safe if we just remove no-landing-pads? Or we should also add panic=abort?

rivy added a commit to rivy/rs.pastel that referenced this issue May 2, 2020
…nightly toolchain

## [why]

Code coverage must currently use some unstable features in nightly rust builds. The
nightly builds are, by definition, unstable and subject to frequent breaking changes.
To prevent CI build breakage, the toolchain is pinned to a specific known working set.

Note: (maint!) this will require periodic review until code coverage is more fully
implemented/integrated into Rust and moved into the stable channel.

- refs: <mozilla/grcov#427>, <newsboat/newsboat#916>
rivy added a commit to rivy/rs.coreutils that referenced this issue May 2, 2020
…nightly toolchain

## [why]

Code coverage must currently use some unstable features in nightly rust builds. The
nightly builds are, by definition, unstable and subject to frequent breaking changes.
To prevent CI build breakage, the toolchain is pinned to a specific known working set.

Note: (maint!) this will require periodic review until code coverage is more fully
implemented/integrated into Rust and moved into the stable channel.

- refs: <mozilla/grcov#427>, <newsboat/newsboat#916>
@kngwyu
Copy link

kngwyu commented May 3, 2020

Hey guys, I also encountered this issue and removed no-landing-pads, resulting in decreased coverage(from 58% to 38%).
https://codecov.io/gh/PyO3/pyo3/branch/master/commits?from=2020-04-28%2000%3A00%3A00&to=2020-05-03%2000%3A00%3A00

Any idea?

sagebind added a commit to sagebind/isahc that referenced this issue May 3, 2020
`-Zno-landing-pads` was removed from nightly recently (rust-lang/rust#70175), which seems to mess up grcov reports (mozilla/grcov#427). Even after figuring out how to set `panic=abort` on all the correct profiles, it seems that it still reports odd numbers relative to when `-Zno-landing-pads` worked.

Switch to [tarpaulin](https://github.com/xd009642/tarpaulin) for now which has also caught my eye recently.
@calixteman
Copy link
Collaborator

Hey guys, I also encountered this issue and removed no-landing-pads, resulting in decreased coverage(from 58% to 38%).
https://codecov.io/gh/PyO3/pyo3/branch/master/commits?from=2020-04-28%2000%3A00%3A00&to=2020-05-03%2000%3A00%3A00

Any idea?

Quite strange..., could you file a bug and attached a lcov.info file (if possible the one generated in your CI) ?

@calixteman
Copy link
Collaborator

Yep it's safe to remove no-landing-pads.
The only problem that we'll some accuracy...
A partial workaround could be to use the new option --exec-line with pattern "^[ \t]*\}[ \t]*$" to not count lines with only a closing brace (most of the time clean up stuff on stack unwinding is associated with the debug info of the closing element).

@calixteman
Copy link
Collaborator

I just read the rustc patch and it seems that -Cpanic=abort is (for now) just a renaming.
If I missed something please tell me but using this option should be equivalent to no-landing-pads.

mtreinish added a commit to mtreinish/retworkx that referenced this issue May 4, 2020
The coverage job requires setting the -Zno-landing-pads flag, however on
the current version of rust nightly this flag has been removed (see:
rust-lang/rust#70175) and the job is no longer working. This commit works
around this by removing the flag to fix the job (see mozilla/grcov#427
for more details).
mtreinish added a commit to Qiskit/rustworkx that referenced this issue May 4, 2020
The coverage job requires setting the -Zno-landing-pads flag, however on
the current version of rust nightly this flag has been removed (see:
rust-lang/rust#70175) and the job is no longer working. This commit works
around this by removing the flag to fix the job (see mozilla/grcov#427
for more details).
@calixteman
Copy link
Collaborator

I managed to run tests for pyo3 in using -Cpanic=abort -Zpanic_abort_tests in RUSTFLAGS.
The doc tests were failing with that so adding an extra RUSTDOCFLAGS="-Cpanic=abort" fixes failures.

@rivy
Copy link

rivy commented May 5, 2020

So, when fixing the problem by dropping -Zno-landing-pads and adding -Cpanic=abort -Zpanic_abort_tests to RUSTFLAGS and setting RUSTDOCFLAGS="-Cpanic=abort", does coverage drop?

Currently, to avoid problems or code coverage drops, my workaround for uutils/coreutils is pinning the rust version to the last working toolchain (nightly-2020-04-29) for code coverage.

@calixteman
Copy link
Collaborator

@rivy please make a try.
I made the change this afternoon for an other project:
https://codecov.io/gh/calixteman/dump_syms/commits
and it's ok.

@rivy
Copy link

rivy commented May 5, 2020

@calixteman , Ok, will do ...

@kngwyu
Copy link

kngwyu commented May 6, 2020

@calixteman

I managed to run tests for pyo3 in using -Cpanic=abort -Zpanic_abort_tests in RUSTFLAGS.
The doc tests were failing with that so adding an extra RUSTDOCFLAGS="-Cpanic=abort" fixes failures.

Great, thank you for investigating that!

mklein994 added a commit to mklein994/dynamic_wallpaper that referenced this issue May 9, 2020
sharkdp pushed a commit to sharkdp/pastel that referenced this issue May 24, 2020
…nightly toolchain

## [why]

Code coverage must currently use some unstable features in nightly rust builds. The
nightly builds are, by definition, unstable and subject to frequent breaking changes.
To prevent CI build breakage, the toolchain is pinned to a specific known working set.

Note: (maint!) this will require periodic review until code coverage is more fully
implemented/integrated into Rust and moved into the stable channel.

- refs: <mozilla/grcov#427>, <newsboat/newsboat#916>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants