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

Cover all cases of submodule status in check-git-abc #4908

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

KrystalDelusion
Copy link
Member

What are the reasons/motivation for this change?

git submodule status can be prefixed with [ -+U], of which we expect the space, and assume anything else is a -. But seeing an error message that tells you abc is not initialized when it is initialized but pointing at a different commit is confusing.
Also closes #4888.

Explain how this is achieved.

Handle the [+U] cases and give an actually related error message instead of the generic one.

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

A '+'-prefix means that the submodule is initialized and checked out, but a different commit is checked out.
If this is accidental then the user should run `git submodule update` to fix it.
If it is intentional (because e.g. the user is explicitly wanting to test Yosys with a different version of abc), then creating a new commit in Yosys to update the expected commit is also a valid solution.
Covering all the bases, I guess?  '-'-prefix is already correctly handled by the base case message.
If the user somehow gets merge conflicts in abc, hopefully they know what they're doing.
@KrystalDelusion
Copy link
Member Author

@widlarizer Is abc the only submodule that we care enough about being the exact version to raise an error when it's not? Because the current suggestion to use git submodule update (with or without --init) will update all submodules, but we only check the status of abc.

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.

abc not recognised as a submodule when using a different abc commit
1 participant