Skip to content

Conversation

@fmease
Copy link
Contributor

@fmease fmease commented Jul 31, 2025

This attempts to fix the CI failure experienced in PR #25: https://github.com/pacman-repo-builder/arch-pkg-text/actions/runs/16651411652/job/47125370150.

I don't know what changed in the last few months, the latest commit on the master branch 9454e83 from March 22 is green.

I might be looking at the wrong thing but it seems like dtolnay/rust-toolchain installs Rust toolchains with the minimal profile: https://github.com/dtolnay/rust-toolchain/blob/4305c38b25d97ef35a8ad1f985ccf2d2242004f2/action.yml#L90. That profile doesn't contain the components rustfmt and clippy. It's odd though because that seems to have been the case for several years, so I don't know why CI used to work just fine a few months ago.

Edit: Not sure if this will fix it, I'll try to test it in my fork. Done.

@fmease fmease marked this pull request as draft July 31, 2025 15:54
@fmease fmease force-pushed the ci-add-missing-components branch 2 times, most recently from 7c8377a to 9389b36 Compare July 31, 2025 15:58
@fmease fmease force-pushed the ci-add-missing-components branch from 9389b36 to 4b2fd81 Compare July 31, 2025 16:27
Copy link
Contributor Author

@fmease fmease left a comment

Choose a reason for hiding this comment

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

${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}-
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Copy link
Contributor Author

@fmease fmease Jul 31, 2025

Choose a reason for hiding this comment

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

I've removed the dtolnay/rust-toolchain action because it doesn't work well or at all with the rust-toolchain / rust-toolchain.toml file. See dtolnay/rust-toolchain#159.

I still don't know why it used to work a few months ago in your project. Maybe rustup changed its behavior in a recent version, that's my only explanation.

At least on ubuntu-latest which this workflow uses, rustup comes preinstalled, so we can just use it directly to install the toolchain.

Copy link
Contributor Author

@fmease fmease Jul 31, 2025

Choose a reason for hiding this comment

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

I also tried to just specify the components (https://github.com/dtolnay/rust-toolchain?tab=readme-ov-file#inputs):

      - name: Install Rust toolchain
      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

but that didn't seem to get picked up by rustup, so I scraped it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I have been aware of the failure of dtolnay/rust-toolchain for a while. So I dropped it in favor of a simpler solution: #26 (review)

@fmease fmease marked this pull request as ready for review July 31, 2025 16:42
Copy link
Collaborator

@KSXGitHub KSXGitHub left a comment

Choose a reason for hiding this comment

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

I planned to address this PR in the weekends by pushing the real fix, but since I don't want to see you pulling your hair out. This is the real fix: KSXGitHub/parallel-disk-usage#278

@fmease
Copy link
Contributor Author

fmease commented Jul 31, 2025

I see, thanks for the quick reply! Feel free to close this PR then. I don't quite see the need to manually install rustup as you've done in KSXGitHub/parallel-disk-usage#278 (unless you want to pin it to a certain version) since it should come preinstalled on the Ubuntu actions runners but I might be missing the bigger picture here.

@KSXGitHub
Copy link
Collaborator

KSXGitHub commented Jul 31, 2025

unless you want to pin it to a certain version

The rust-toolchain file pins the compiler version, no?

@fmease
Copy link
Contributor Author

fmease commented Jul 31, 2025

I meant the version of rustup itself (latest version is currently rustup 1.28.2 (2025-06-02)), not of any Rust toolchain.

@KSXGitHub
Copy link
Collaborator

I see. Well I just copied my workflow files around without any deep thought to it. Maybe remove the action entirely still work after all? I will test it this weekends.

KSXGitHub added a commit that referenced this pull request Aug 2, 2025
@KSXGitHub KSXGitHub mentioned this pull request Aug 2, 2025
KSXGitHub added a commit that referenced this pull request Aug 2, 2025
@KSXGitHub
Copy link
Collaborator

I see, thanks for the quick reply! Feel free to close this PR then. I don't quite see the need to manually install rustup as you've done in KSXGitHub/parallel-disk-usage#278 (unless you want to pin it to a certain version) since it should come preinstalled on the Ubuntu actions runners but I might be missing the bigger picture here.

The preinstalled rustup fails for the same reason that GitHub Action failed: The default rustup wouldn't automatically install clippy and rustfmt. So fetching rustup is the only way.

Commit: e68c5b1
Action logs: https://github.com/pacman-repo-builder/arch-pkg-text/actions/runs/16691859664/job/47250691385

@KSXGitHub KSXGitHub closed this in #27 Aug 2, 2025
@fmease fmease deleted the ci-add-missing-components branch August 2, 2025 11:37
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 this pull request may close these issues.

2 participants