-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Tracking issue for stabilizing the #[coverage(..)]
attribute
#134749
Comments
…ieyouxu Update `#[coverage(..)]` attribute error messages to match the current implementation The allowed positions for `#[coverage(..)]` attributes were expanded by rust-lang#126721, but the corresponding error messages were never updated to reflect the new behaviour. Part of rust-lang#134749.
Rollup merge of rust-lang#134750 - Zalathar:coverage-attr-errors, r=jieyouxu Update `#[coverage(..)]` attribute error messages to match the current implementation The allowed positions for `#[coverage(..)]` attributes were expanded by rust-lang#126721, but the corresponding error messages were never updated to reflect the new behaviour. Part of rust-lang#134749.
This comment has been minimized.
This comment has been minimized.
What feels like a large source of confusion here is that this attribute isn't actually changing the status quo in terms of the stabilisation of Even though I feel like this attribute should have the same treatment: we're comfortable accepting that We can't guarantee that instrumentation is emitted since, at least for the moment, dead code removal will also remove code from coverage instrumentation. We don't even guarantee that code with I think that part of the reason why this "feels" like a large language change is because of the fact that, until now, coverage instrumentation has not been mentioned outside of the compiler realm, and thus the lang team hasn't really needed to comment on the stability of coverage instrumentation. In the reference docs I proposed initially, I only clarified that the attribute indicates whether instrumentation should be emitted, and not what the instrumentation does or whether it's actually emitted. I'm definitely open to a better way of wording this that makes this aspect more clear. Responding specifically to some of the remaining items below: It's entirely reasonable to say that we should have a better guide-level explanation of code coverage available, but it feels like the lack of said explanation is an explicit decision at the moment. Right now, I treat code coverage as a diagnostic tool only: it can help me determine if I'm missing obvious cases in tests, but I can't rely on it for anything, including whether my code is adequately tested. There are tools like The reason why I think it's okay to stabilise the attribute now is that In terms of testing, I can't comment for the entirety of coverage instrumentation, but it looks like everything for the attribute in particular is quite thorough, based upon what I saw when making the stabilisation PR. @ehuss had mentioned verifying that trait methods don't get infected by I definitely agree that we should make sure that everyone is on board with the stabilisation before it happens, but I'm not sure if there's anything else we need to do to be "ready" to start collecting that feedback and running the FCP for the lang team. As I mentioned in my PR, I'm more than happy to do the work on the stabilisation PR and reference docs, including whatever merge conflicts show up until everyone's on board. |
I am already very unhappy with how much stress and hassle you have created for me by trying to rush this stabilization while dismissing real concerns. Seeing more of the same has more than exhausted my patience. |
Stressing you out was never my intention, and if the answer is just to wait until you've got less on your plate then I'm fine with that too; genuinely. I mean, I should have expected that you'd be stress given the revert and coordinating that, but this is the first time I'm hearing about this specifically, either because I'm bad at reading (very possible; I even missed this issue entirely initially) or it's the first time you've mentioned it. Like, maintainer burnout is a real thing and I'm only able to work on this type of stuff because I've been unemployed for almost two years at this point, and counter-intuitively, I work on FOSS stuff because it helps me forget the impending existential crisis of unemployment. Having to manage much larger commitments at the same time is substantially more difficult. And, it's especially difficult because having less time to work on this means less time to express your concerns, meaning people like me come by and just assume that means you have no concerns, because you haven't fully expressed them. And I'm sorry for that; genuinely, I should have been able to understand that better, but I haven't because I've not had that full context. I'll close the stabilisation PR for now and we can revisit this topic at a later point when you're willing. |
This is a sub-issue of #84605 for tracking the remaining obstacles to stabilization of the coverage attribute. The
#[coverage(off)]
and#[coverage(on)]
attributes provide hints for whether-Cinstrument-coverage
should instrument a particular function or not.The feature gate for the issue is
#![feature(coverage_attribute)]
.About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
#[coverage(..)]
attribute error messages to match the current implementation #134750Unresolved Questions
Implementation history
This functionality was originally introduced as an unstable feature, without a formal RFC. After a period of inactivity, there was a user-led push for stabilization, leading to further design and implementation changes.
A stabilization PR was briefly merged on nightly due to a process mixup, then reverted. This tracking issue picks up after that revert.
#[coverage(..)]
apply recursively to nested functions #126721#[coverage(..)]
attribute #134672The text was updated successfully, but these errors were encountered: