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

Print more detailed version information; allow custom version suffix #1167

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

illuhad
Copy link
Collaborator

@illuhad illuhad commented Oct 4, 2023

  • By default, the git commit hash is appended to the version as +gitHASH, with HASH being the git hash.
  • Suffix can be overridden using -DACPP_VERSION_SUFFIX in cmake
  • This also adds a new field to syclcc.json called version-suffix.
  • Changes macros in code from HIPSYCL_VERSION_<TYPE> to ACPP_VERSION_<TYPE>. Whether macros should better use ADAPTIVECPP_ prefix still needs to be discussed; I've used ACPP_ for consistency with cmake.

The new version string is e.g. presented when invoking acpp --acpp-version, but might also be visible in the version number that the clang plugin presents itself, or the version_string() that our SYCL headers use.

Fixes #1165

@illuhad illuhad force-pushed the feature/detailed-version-information branch from 679a6c3 to 7d64892 Compare October 4, 2023 15:32
CMakeLists.txt Outdated Show resolved Hide resolved
@pszi1ard
Copy link

pszi1ard commented Oct 6, 2023

A few tips:

  • it can be very useful to have a date in the version string of a build from git since git hashes do not help understanding whether a specific build is from a day a month or a year ago.
  • as a developer, you may find it useful to know whether your build is from a dirty tree or not ;)

There are a few more cases you may want consider, as inspiration take a look at our versioning:
https://gitlab.com/gromacs/gromacs/-/blob/main/cmake/gmxVersionInfo.cmake?ref_type=heads#L167-193

and here is the code we use to generate the git-based version string: https://gitlab.com/gromacs/gromacs/-/blob/main/cmake/gmxGenerateVersionInfo.cmake

@illuhad illuhad force-pushed the feature/detailed-version-information branch from 7a083a1 to b04053e Compare October 13, 2023 22:05
@illuhad
Copy link
Collaborator Author

illuhad commented Oct 13, 2023

Thanks for the suggestions @pszi1ard :-) I have expanded the version string to include head date, git branch and dirty flag. Example string is now:

$ install/bin/acpp --acpp-version
acpp [AdaptiveCpp compilation driver], Copyright (C) 2018-2023 Aksel Alpay and the AdaptiveCpp project
  AdaptiveCpp version: 23.10.0+git.f19037f9.20231013.branch.feature/detailed-version-information.dirty

@illuhad illuhad force-pushed the feature/detailed-version-information branch from b04053e to 81022d0 Compare October 13, 2023 22:11
@illuhad illuhad force-pushed the feature/detailed-version-information branch from 81022d0 to 60eb1ba Compare October 13, 2023 22:14
@illuhad illuhad merged commit f5b55a1 into develop Oct 18, 2023
34 of 36 checks passed
@illuhad illuhad deleted the feature/detailed-version-information branch October 18, 2023 15:44
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.

More detailed version reporting
3 participants