chipsalliance / verible-formatter-action

Apache License 2.0
8 stars 8 forks source link

Usability improvements #4

Closed mole99 closed 2 years ago

mole99 commented 2 years ago

Hi, this is a really useful GitHub action to me.

I just wonder why such an old version of verible is used. It also seems to point to the old Google repository, which has since been moved to CHIPS Alliance. Would it be possible to update it to the latest version?

The following command gives the url to the latest version:

curl -s https://api.github.com/repos/chipsalliance/verible/releases/latest | grep browser_download_url | grep Ubuntu-20.04 | cut -f4 -d\"

Another improvement for me would be to have an input field for parameters to the formatter. For example, if I need to set the indentation with --indentation_spaces.

I could do this by using the path input, but this does not feel right.

tgorochowik commented 2 years ago

Hi

Thank you for the report!

Would you be willing to submit a PR with the changes you suggest?

mole99 commented 2 years ago

Hi @tgorochowik,

I created a PR for the first improvement: #5

But there seems to be an issue with reviewdog. At the very end of the action when the reviews should be posted, I get an error:

reviewdog: POST https://api.github.com/repos/semify-eda/waveform-generator/pulls/4/reviews: 502 Server Error []
done running reviewdog

It seems to be a similar issue to this here: https://github.com/reviewdog/reviewdog/issues/355

But the commit that is used for this action is from 2021, so I don't think that's the issue.

commit 72c205e138df049330f2a668c33782cda55d61f6
Merge: ac7a123 a489e3d
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Aug 17 04:32:08 2021 +0000

Could I be doing anything else wrong?

My configuration is:

name: Verible formatter
on:
  pull_request:
jobs:
  format:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: mole99/verible-formatter-action@main
      with:
        paths: design/*.sv
        github_token: ${{ secrets.GITHUB_TOKEN }}
mole99 commented 2 years ago

Also, it seems that Verible no longer has support for directories as inputs. Now you have to add the file directly or with a wildcard.

mole99 commented 2 years ago

Hi @tgorochowik, I have to correct myself.

Today I started the same run again and reviewdog succesfully added some reviews. See here: https://github.com/semify-eda/waveform-generator/pull/5

Still remains the question what was the problem yesterday?

mglb commented 2 years ago

But there seems to be an issue with reviewdog. At the very end of the action when the reviews should be posted, I get an error:

reviewdog: POST https://api.github.com/repos/semify-eda/waveform-generator/pulls/4/reviews: 502 Server Error []
done running reviewdog

502 is a "Bad Gateway" error. It was a GitHub server issue. Not your fault.

mole99 commented 2 years ago

This issue has been addressed by #5 and #6, therefore I will close it.