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

0.6.6 breaks compatibility piping to formatter in CI #221

Closed
PKilcommons opened this issue Sep 15, 2023 · 3 comments
Closed

0.6.6 breaks compatibility piping to formatter in CI #221

PKilcommons opened this issue Sep 15, 2023 · 3 comments
Labels
C-bug Category: related to a bug.

Comments

@PKilcommons
Copy link

PKilcommons commented Sep 15, 2023

I am unsure if this issue makes more sense here or on install-action so please let me know if I should close this issue and reopen over there.

At the risk of this sounding like xkcd 1172, I was wondering if an option could be provided to disable the grouping behaviour added in #219. In our CI we use cargo-action-fmt to provide Github Action formatting for clippy. This worked seamlessly with taiki-e/install-action@cargo-hack, but since v0.6.6 piping to cargo-action-fmt now breaks the pipe. For now we're pinning to v0.6.5.

Here's the job without pinning to v0.6.5 if that helps at all.

    steps:
    - uses: actions/checkout@v4

    - name: Sccache Setup
      uses: mozilla-actions/[email protected]
      with:
        version: "v0.5.3"

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

    - name: Install cargo-hack
      uses: taiki-e/install-action@cargo-hack

    - uses: olix0r/cargo-action-fmt/setup@v2

    - name: Check clippy
      run: cargo hack clippy --all-targets --feature-powerset --message-format=json -Zlints -- -Dwarnings -Adeprecated | cargo-action-fmt

    - name: Check rustfmt
      if: success() || failure()
      run: cargo fmt --all -- --check

If this is not something you wish to support or if there is an existing workaround that I am not aware of, please do let me know.

@taiki-e
Copy link
Owner

taiki-e commented Sep 15, 2023

Thanks for the report and sorry for the breakage!

Log grouping can be opt-out using the --log-group=none option, as explained in the changelog and help message.

Ideally, I would like to handle this using tty detection, but GitHub Actions is incompatible with tty detection (actions/runner#241).
A reasonable workaround here would be to avoid using log grouping if an option is passed in which stdout is assumed to be used, such as --message-format.

@taiki-e taiki-e added the C-bug Category: related to a bug. label Sep 15, 2023
@taiki-e taiki-e changed the title 0.6.7 breaks compatibility pipping to formatter in CI 0.6.6 breaks compatibility pipping to formatter in CI Sep 15, 2023
@PKilcommons
Copy link
Author

Ah, I completely missed that argument; my fault for not reading closely enough.

Thanks for the quick response, and sorry for the trouble!

@taiki-e
Copy link
Owner

taiki-e commented Sep 15, 2023

Fixed in v0.6.8. I have implemented the one mentioned in the above comment.

A reasonable workaround here would be to avoid using log grouping if an option is passed in which stdout is assumed to be used, such as --message-format.

@PKilcommons PKilcommons changed the title 0.6.6 breaks compatibility pipping to formatter in CI 0.6.6 breaks compatibility piping to formatter in CI Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants