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

Run compiler doctests in CI #99144

Closed
jyn514 opened this issue Jul 11, 2022 · 16 comments · Fixed by #106621
Closed

Run compiler doctests in CI #99144

jyn514 opened this issue Jul 11, 2022 · 16 comments · Fixed by #106621
Assignees
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Jul 11, 2022

Right now these are only ever run locally, which means they often break. We should run these in CI.

See #99144 (comment) for mentoring instructions.

Originally posted by @jyn514 in #95994 (comment)

@jyn514 jyn514 added A-testsuite Area: The testsuite used to check the correctness of rustc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. labels Jul 11, 2022
@jyn514

This comment was marked as outdated.

@Mark-Simulacrum

This comment was marked as outdated.

@reez12g
Copy link
Contributor

reez12g commented Jul 11, 2022

@rustbot claim

@jyn514
Copy link
Member Author

jyn514 commented Jul 11, 2022

@reez12g see #99040 for an example of something similar

bors added a commit to rust-lang-ci/rust that referenced this issue Oct 6, 2022
Enable doctests in compiler/ crates

Helps with rust-lang#99144
@reez12g
Copy link
Contributor

reez12g commented Oct 6, 2022

The remaining crates that need to be fixed are

  • rustc_ast_lowering: claimed by @GentBinaku
  • rustc_builtin_macros
  • rustc_expand
  • rustc_infer: claimed by @CarsonV
  • rustc_middle
  • rustc_query_impl

Here's steps to fix these.

  1. Remove doctest=false in the target Calgo.toml.
    e.g. this
  2. Run the test locally.
    e.g. python3 x.py test compiler/rustc_ast_lowering --stage 0
  3. Fix the errors.

@jyn514
I couldn't edit the description, so I left it as a comment.

@reez12g reez12g removed their assignment Oct 6, 2022
@jyn514 jyn514 added the E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. label Oct 6, 2022
@nakatomotoi
Copy link

@rustbot claim

@jyn514 jyn514 changed the title Run compiler unit tests in CI Run compiler doctests in CI Oct 7, 2022
RalfJung pushed a commit to RalfJung/miri that referenced this issue Oct 7, 2022
Enable doctests in compiler/ crates

Helps with rust-lang/rust#99144
@GentBinaku
Copy link

@rustbot claim

@rustbot rustbot assigned GentBinaku and unassigned nakatomotoi Oct 24, 2022
@geikoh
Copy link

geikoh commented Nov 15, 2022

@rustbot claim

@rustbot rustbot assigned geikoh and unassigned GentBinaku Nov 15, 2022
JohnTitor pushed a commit to JohnTitor/rust that referenced this issue Nov 20, 2022
Fix doctest errors related to rustc_middle

Helps with rust-lang#99144
@technetos
Copy link
Member

@rustbot claim

@rustbot rustbot assigned technetos and unassigned geikoh Nov 30, 2022
@CarsonV
Copy link
Contributor

CarsonV commented Dec 24, 2022

@rustbot claim

@rustbot
Copy link
Collaborator

rustbot commented Dec 24, 2022

Error: Malformed triagebot.toml in default branch.
newline in string found at line 345 column 53

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

@CarsonV
Copy link
Contributor

CarsonV commented Dec 25, 2022

@rustbot claim

@rustbot rustbot assigned CarsonV and unassigned technetos Dec 25, 2022
@lokera666
Copy link

@rustbotreclamar

@jyn514
Copy link
Member Author

jyn514 commented Dec 31, 2022

Ok, this is not working. If you want to work on this issue, please also say which crate you are working on; doing one crate at a time is fine. It's ok to work on crates that haven't yet been claimed.

@GentBinaku
Copy link

GentBinaku commented Dec 31, 2022

@jyn514 I have been working on the first crate rustc_ast_lowering; I will finish this week I will do a Pull request

@CarsonV
Copy link
Contributor

CarsonV commented Jan 4, 2023

rustc_query_impl is done, claiming rustc_infer next while Gent works on ast_lowering

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 4, 2023
Enable doctests for rustc_query_impl

doctests worked out of the box for query_impl on my local machine. Working towards rust-lang#99144
@bors bors closed this as completed in ea0c22e May 8, 2023
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 20, 2024
Enable doctests in compiler/ crates

Helps with rust-lang/rust#99144
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 27, 2024
Enable doctests in compiler/ crates

Helps with rust-lang/rust#99144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
10 participants