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

2 changes - git hash printing + consistency check #4

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

goracle
Copy link
Contributor

@goracle goracle commented Mar 3, 2018

EDIT: Do not pull. The feature #2 does not work. #1 does work is simple enough that it should be added.

Hi,

There are two changes here:

  1. An assert added to my first commit to check to make sure the provided thread level and the required thread level are the same. This should increase the safety of calling qmp init (and is in line with how Grid handles this).

EDIT: #2 does not work. I need to read some docs related to autoreconf to figure out why.
2) Printing of the git hash: During the initialization of qmp, print the current git hash. This is a feature request. This feature works by calling git from within make, printing the hash in a brief header file as a pre-processor defined string, then using this string in a print statement within qmp init message passing. Rationale(s): This feature is helpful in terms of identifying old binaries, doing recreation work, and general debugging. I have implemented and used this feature extensively. In particular, I have implemented it in my production copies of Grid (see my github page for this), CPS, and now QMP. This feature should be invisible to the user. The invisibility trades off with not forcing a correct hash to be printed every time a new binary is compiled, but the printed hash should be taken as a good hint as to the provenance of the binary.

There may be other ways to implement such a feature, and I would be open to hearing them, as well as hearing any other comments/reactions to this idea. Feel free to split these as necessary. Thanks.

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.

1 participant