Skip to content

Makefile: Test yosys git status in check-git-abc #4969

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

Merged
merged 2 commits into from
Apr 30, 2025

Conversation

KrystalDelusion
Copy link
Member

@KrystalDelusion KrystalDelusion commented Mar 28, 2025

What are the reasons/motivation for this change?

As in #4968, check-git-abc is misleading if Yosys itself isn't a git repository.

Explain how this is achieved.

So check git status before suggesting git based solutions, providing alternative suggestions for using ABCEXTERNAL (which bypasses check-git-abc), or downloading release tar (noting that the 'Source code' archives won't work, which is probably how they ended up in this situtation).

If applicable, please suggest to reviewers how they can test the change.

Applying patch to release yosys.tar.gz and running make check-git-abc should be be unaffected (i.e. should still succeed).
Applying patch to release source code archive and running make check-git-abc (or removing contents of abc folder from yosys.tar.gz) should give new error message.
Applying patch to either archive, and deleting abc folder should give new error message.
All other cases should be unaffected.

As in #4986, `check-git-abc` is misleading if Yosys itself isn't a git repository.
So check `git status` before suggesting `git` based solutions, providing alternative suggestions for using ABCEXTERNAL (which bypasses `check-git-abc`), or downloading release tar (noting that the 'Source code' archives won't work, which is probably how they ended up in this situtation).
For some platforms (Arch Linux, at least), `git status` reports errors on stdout instead of stderr, so we need to redirect that to `/dev/null` too.  This also prevents `git status` from logging output when the yosys directory is a git repo, but is missing the abc folder.
@KrystalDelusion KrystalDelusion added the merge-soon Merge: PR will be merged at the end of the next work day unless concerns are raised label Apr 28, 2025
@KrystalDelusion KrystalDelusion merged commit 4213f75 into main Apr 30, 2025
43 checks passed
@KrystalDelusion KrystalDelusion deleted the krys/check_yosys_git branch April 30, 2025 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-soon Merge: PR will be merged at the end of the next work day unless concerns are raised
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants