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

Rename standalone doctest attribute into standalone_crate #130931

Merged
merged 6 commits into from
Sep 29, 2024

Conversation

GuillaumeGomez
Copy link
Member

Following zulip discussion and poll results.

r? @notriddle

@GuillaumeGomez GuillaumeGomez marked this pull request as ready for review September 27, 2024 16:05
@rustbot
Copy link
Collaborator

rustbot commented Sep 27, 2024

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 27, 2024
@notriddle
Copy link
Contributor

Will this produce a warning if someone has a doctest with the old standalone attr in it?

  • You already published a blog post, so there's already probably people using this.
  • I don't expect a three-course meal with recovery, structured suggestions, and --explain docs. Just say something so that people aren't hopelessly lost when standalone stops working.
  • If it already produces a warning, add a test case for it.

@notriddle
Copy link
Contributor

It just occurred to me that it would also be smart to warn on standalone_crate, with an underscore.

@GuillaumeGomez
Copy link
Member Author

For now the 2024 edition is nightly only, so not sure if it's really useful, especially how little usage there should be for this attribute. However, suggesting standalone-crate if you have standalone or standalone_crate sounds like a good idea. Gonna add it.

@GuillaumeGomez
Copy link
Member Author

Updated! Unless this is the 2024 edition, the newly added check/warning won't be triggered. I added ui tests for both cases (with and without the 2024 edition too).

@notriddle
Copy link
Contributor

notriddle commented Sep 27, 2024

This looks great, but I have one more question.

Why does this one use a hyphen (standalone-crate), while every existing attribute uses an underscore (test_harness)?

@GuillaumeGomez
Copy link
Member Author

Because none of us thought about checking coherency. Renaming it.

@GuillaumeGomez
Copy link
Member Author

And done, great catch @notriddle !

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez changed the title Rename standalone doctest attribute into standalone-crate Rename standalone doctest attribute into standalone_crate Sep 28, 2024
@GuillaumeGomez
Copy link
Member Author

And blessed run-make test.

@notriddle
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 28, 2024

📌 Commit 4840f99 has been approved by notriddle

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 28, 2024
@@ -1,7 +1,5 @@

running 2 tests
test doctest-standalone.rs - (line 4) ... ok
test doctest-standalone.rs - init (line 8) ... ok
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, this is wrong.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow, I updated the attribute name wrongly. ><

@notriddle
Copy link
Contributor

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 28, 2024
@GuillaumeGomez
Copy link
Member Author

Fixed wrong test update.

@bors r=notriddle

@bors
Copy link
Contributor

bors commented Sep 29, 2024

📌 Commit 6f5f21a has been approved by notriddle

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 29, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 29, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#130931 (Rename `standalone` doctest attribute into `standalone_crate`)
 - rust-lang#131000 (Weekly `cargo update`)
 - rust-lang#131011 (cleanup: don't `.into()` identical types)
 - rust-lang#131013 (cleanup: don't manually `unwrap_or_default()`)
 - rust-lang#131014 (cleanup: don't clone types that are Copy)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3097951 into rust-lang:master Sep 29, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 29, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 29, 2024
Rollup merge of rust-lang#130931 - GuillaumeGomez:standalone-crate, r=notriddle

Rename `standalone` doctest attribute into `standalone_crate`

Following [zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Renaming.20code.20block.20.22standalone.22.20attribute.3F) and poll results.

r? `@notriddle`
@GuillaumeGomez GuillaumeGomez deleted the standalone-crate branch September 29, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants