-
Notifications
You must be signed in to change notification settings - Fork 41
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
Descriptive error for missing git tags #1291
Comments
wihobbs
added a commit
to wihobbs/flux-sched
that referenced
this issue
Sep 6, 2024
Problem: flux-sched's version comes from `git describe`, which is passed to CMake. CMake validates versions using a regex in `CMake/Source/cmProjectCommand.cxx`. When this is an invalid version, flux-sched can't build. This often happens in CI, forks, or stripped-down user environments, and often happens to new contributors. Solution: Validate the version before passing to CMake. If the version is invalid, throw a descriptive warning with some suggestions. Fixes flux-framework#1291
It's a different problem in core. Core will build with an invalid version, but fails on
Autoconf takes the version of a shallow clone (depth 1) as:
|
A hash-only version should probably be rejected at configure time since it creates an invalid |
wihobbs
added a commit
to wihobbs/flux-sched
that referenced
this issue
Sep 6, 2024
Problem: flux-sched's version comes from `git describe`, which is passed to CMake. CMake validates versions using a regex in `CMake/Source/cmProjectCommand.cxx`. When this is an invalid version, flux-sched can't build. This often happens in CI, forks, or stripped-down user environments, and often happens to new contributors. Solution: Validate the version before passing to CMake. If the version is invalid, throw a descriptive warning with some suggestions. Fixes flux-framework#1291
wihobbs
added a commit
to wihobbs/flux-core
that referenced
this issue
Sep 10, 2024
Problem: autoconf will accept junk at configure time as a valid version, then go off and generate an invalid version.h file. This happens frequently with shallow clones, setups in CI, or other constrained user environments. It has caused new contributors a lot of confusion in the past. Solution: Like flux-framework/flux-sched#1291 suggested, reject invalid versions at configure time and provide appropriate suggestions to the user to remedy this.
wihobbs
added a commit
to wihobbs/flux-core
that referenced
this issue
Sep 10, 2024
Problem: autoconf will accept junk at configure time as a valid version, then go off and generate an invalid version.h file. This happens frequently with shallow clones, setups in CI, or other constrained user environments. It has caused new contributors a lot of confusion in the past. Solution: Like flux-framework/flux-sched#1291 suggested, reject invalid versions at configure time and provide appropriate suggestions to the user to remedy this.
wihobbs
added a commit
to wihobbs/flux-core
that referenced
this issue
Sep 10, 2024
Problem: autoconf will accept junk at configure time as a valid version, then go off and generate an invalid version.h file. This happens frequently with shallow clones, setups in CI, or other constrained user environments. It has caused new contributors a lot of confusion in the past. Solution: Like flux-framework/flux-sched#1291 suggested, reject invalid versions at configure time and provide appropriate suggestions to the user to remedy this.
wihobbs
added a commit
to wihobbs/flux-core
that referenced
this issue
Sep 11, 2024
Problem: autoconf will accept junk at configure time as a valid version, then go off and generate an invalid version.h file. This happens frequently with shallow clones, setups in CI, or other constrained user environments. It has caused new contributors a lot of confusion in the past. Solution: Like flux-framework/flux-sched#1291 suggested, reject invalid versions at configure time and provide appropriate suggestions to the user to remedy this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jacobtkeio was hitting this problem in the CI for his fork last week, and it took me an hour and a half to figure out why. It turns out, since his fork didn't have tags, running
git push --tags
made the whole world happy again.This is a problem in flux-core too since both repositories determine version using
git describe
.But, since this has come up a few times, I'm going to look in to making a better error message:
The text was updated successfully, but these errors were encountered: