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

fix(ci): compile rust docs in release and deny warnings #2824

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

giladchase
Copy link
Contributor

@giladchase giladchase commented Dec 19, 2024

  • No reason to run cargo on release in the ci, and this busts cache
  • Cargo doc doesn't pick up the usual place we pass -Dwarnings, which is
    RUSTFLAGS, it needs a special flag RUSTDOCFLAGS (it cannot reference
    the usual RUSTFLAGS so we have to duplicate)

@reviewable-StarkWare
Copy link

This change is Reviewable

@giladchase giladchase force-pushed the gilad/gilad/rust-doc branch 6 times, most recently from cc32cc0 to 3673b2a Compare December 20, 2024 11:53
@giladchase giladchase changed the title refactor(ci): separate rustdoc to different job fix(ci): move rustdoc to nightly + deny warnings Dec 20, 2024
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @giladchase)


.github/workflows/main_nightly.yml line 66 at r1 (raw file):

        - name: Build Documentation
          run: cargo doc --all --no-deps

the command in run_tests.py is cargo doc -r --document-private-items --no-deps (disregarding the --workspace vs. -p crate list).
why not just remove the -r and keep it in run_tests.py`?

Code quote:

 run: cargo doc --all --no-deps

.github/workflows/main_nightly.yml line 69 at r1 (raw file):

          env:
            # Note that cargo doc requires RUSTDOCFLAGS, not RUSTFLAGS.
            RUSTDOCFLAGS: "-D warnings -C link-arg=-fuse-ld=lld"

won't this work?

Suggestion:

RUSTDOCFLAGS: ${{ env.RUSTFLAGS }}

Copy link
Contributor Author

@giladchase giladchase left a comment

Choose a reason for hiding this comment

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

Reviewable status: 4 of 5 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware)


.github/workflows/main_nightly.yml line 66 at r1 (raw file):

Previously, dorimedini-starkware wrote…

the command in run_tests.py is cargo doc -r --document-private-items --no-deps (disregarding the --workspace vs. -p crate list).
why not just remove the -r and keep it in run_tests.py`?

Whoops, added.

RE run_tests, you mean remove release so we can keep it in the PR flow?
I'm not sure why release was there in the first place, Ill reopen the PR as draft then and bring it up in the infra sync.

Regardless, I suggest moving it to nightly unless someone is actually looking at them on a regular basis / when reviewing PRs.
I see other ppl only generating them in a "release" workflow, and then I assume fixing all the issues on the spot.
The only issues that arise are broken links in the docs, which are trivial to fix all at once before release.


.github/workflows/main_nightly.yml line 69 at r1 (raw file):

Previously, dorimedini-starkware wrote…

won't this work?

Ohh nice.
Done

@giladchase giladchase closed this Dec 22, 2024
@giladchase giladchase reopened this Dec 22, 2024
@giladchase giladchase marked this pull request as draft December 22, 2024 08:21
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase)


.github/workflows/main_nightly.yml line 66 at r1 (raw file):

Regardless, I suggest moving it to nightly unless someone is actually looking at them on a regular basis / when reviewing PRs.

I'm saying: if it doesn't slow down the CI (i.e. we get a cache hit on compilation) it's nice to fix doc issues in the PR that introduces them


.github/workflows/main_nightly.yml line 69 at r1 (raw file):

Previously, giladchase wrote…

Ohh nice.
Done

I'm actually asking if this works or not 😅

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @giladchase)


a discussion (no related file):
rebase over main-v0.13.4

@giladchase giladchase changed the title fix(ci): move rustdoc to nightly + deny warnings fix(ci): compile rust docs in release and deny warnings Dec 25, 2024
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase)

@giladchase giladchase changed the base branch from main to main-v0.13.4 December 29, 2024 15:35
@giladchase giladchase marked this pull request as ready for review December 29, 2024 15:35
- No reason to run cargo on release in the ci, and this busts cache
- Cargo doc doesn't pick up the usual place we pass -Dwarnings, which is
  RUSTFLAGS, it needs a special flag RUSTDOCFLAGS (it cannot reference
  the usual RUSTFLAGS so we have to duplicate)
Copy link
Contributor Author

@giladchase giladchase left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 6 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)


a discussion (no related file):

Previously, dorimedini-starkware wrote…

rebase over main-v0.13.4

Done.


.github/workflows/main_nightly.yml line 66 at r1 (raw file):

Previously, dorimedini-starkware wrote…

Regardless, I suggest moving it to nightly unless someone is actually looking at them on a regular basis / when reviewing PRs.

I'm saying: if it doesn't slow down the CI (i.e. we get a cache hit on compilation) it's nice to fix doc issues in the PR that introduces them

Added in run_tests, file change is reverted.


.github/workflows/main_nightly.yml line 69 at r1 (raw file):

Previously, dorimedini-starkware wrote…

I'm actually asking if this works or not 😅

Stale, file change reverted.

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @giladchase)

@giladchase giladchase merged commit b875cc0 into main-v0.13.4 Dec 30, 2024
14 checks passed
@giladchase giladchase deleted the gilad/gilad/rust-doc branch December 30, 2024 08:10
@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants