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

Improve versioning display with --version #818

Merged
merged 4 commits into from
May 20, 2023

Conversation

mwestphal
Copy link
Contributor

@mwestphal mwestphal commented May 19, 2023

Before:

F3D 2.0.0

F3D - A fast and minimalist 3D viewer
Version: 2.0.0.
Build date: 2023-05-19 08:15:08.
Build system: Linux 64-bits.
Compiler: GNU 12.2.1.
External rendering module: OFF.
Raytracing module: OFF.
VTK version: 9.2.6 (build 20230427).
Copyright (C) 2019-2021 Kitware SAS.
Copyright (C) 2021-2023 Michael Migliore, Mathieu Westphal.
License BSD-3-Clause.
By Michael Migliore, Mathieu Westphal and Joachim Pouderoux.

After:

F3D 2.0.0

F3D - A fast and minimalist 3D viewer
Version: 2.0.0-69-g39a11ba6.
Build date: 2023-05-19 08:13:58.
Build system: Linux 64-bits.
Compiler: GNU 12.2.1.
External rendering module: OFF.
Raytracing module: OFF.
VTK version: 9.2.6-3279-ga3ba1fbbf3 (date: 20230427).
Copyright (C) 2019-2021 Kitware SAS.
Copyright (C) 2021-2023 Michael Migliore, Mathieu Westphal.
License BSD-3-Clause.
By Michael Migliore, Mathieu Westphal and Joachim Pouderoux.

We could always show the full version for F3D, but I like it like that.

@github-actions
Copy link

You are modifying libf3d public API! ⚠️Please update bindings accordingly⚠️!
You can find them in their respective directories: python, java, webassembly.

@mwestphal mwestphal marked this pull request as ready for review May 19, 2023 08:16
@mwestphal mwestphal requested a review from Meakk May 19, 2023 08:16
@mwestphal
Copy link
Contributor Author

@snoyer please review, F3D will not lie about versions anymore :)

@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #818 (f943d09) into master (9b26913) will decrease coverage by 0.02%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##           master     #818      +/-   ##
==========================================
- Coverage   96.09%   96.07%   -0.02%     
==========================================
  Files         109      109              
  Lines        6166     6173       +7     
==========================================
+ Hits         5925     5931       +6     
- Misses        241      242       +1     
Impacted Files Coverage Δ
library/src/engine.cxx 96.44% <88.88%> (-0.47%) ⬇️
application/F3DOptionsParser.cxx 98.08% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@snoyer
Copy link
Contributor

snoyer commented May 19, 2023

@snoyer please review, F3D will not lie about versions anymore :)

Generous of you to assume I know anything about cmake :) but I'm going to sit the review out.

Best I can do is test it...

nightly from sometime last month:

> /opt/f3d/bin/f3d --version
F3D 2.0.0

F3D - A fast and minimalist 3D viewer
Version: 2.0.0.
Build date: 2023-04-20 16:41:10.
Build system: Linux 64-bits.
Compiler: GNU 8.4.0.
External rendering module: ON.
Raytracing module: OFF.
VTK version: 9.2.6 (build 20230224).
Copyright (C) 2019-2021 Kitware SAS.
Copyright (C) 2021-2023 Michael Migliore, Mathieu Westphal.
License BSD-3-Clause.
By Michael Migliore, Mathieu Westphal and Joachim Pouderoux.

master:

make -j8 && bin/f3d --version
...
[100%] Built target f3d
F3D 2.0.0

F3D - A fast and minimalist 3D viewer
Version: 2.0.0.
Build date: 2023-05-19 09:10:57.
Build system: Linux 64-bits.
Compiler: GNU 13.0.1.
External rendering module: OFF.
Raytracing module: OFF.
VTK version: 9.2.5 (build 5).
Copyright (C) 2019-2021 Kitware SAS.
Copyright (C) 2021-2023 Michael Migliore, Mathieu Westphal.
License BSD-3-Clause.
By Michael Migliore, Mathieu Westphal and Joachim Pouderoux.

your branch:

> make -j8 && bin/f3d --version
CMake Warning at cmake/f3dVersion.cmake:48 (message):
  Version from git (1.3.1) disagrees with hard coded version (2.0.0).  Either
  update the git tags or main CMakeLists.txt.
Call Stack (most recent call first):
  CMakeLists.txt:39 (determine_version)
-- VTK 9.2.5 found
...
[100%] Built target f3d
F3D 1.3.1

F3D - A fast and minimalist 3D viewer
Version: 1.3.1-385-g39a11ba6.
Build date: 2023-05-19 09:01:15.
Build system: Linux 64-bits.
Compiler: GNU 13.1.1.
External rendering module: OFF.
Raytracing module: OFF.
VTK version: 9.2.5.
Copyright (C) 2019-2021 Kitware SAS.
Copyright (C) 2021-2023 Michael Migliore, Mathieu Westphal.
License BSD-3-Clause.
By Michael Migliore, Mathieu Westphal and Joachim Pouderoux.

Not super helpful observations:

  • git describe reports weird stuff but maybe that's because it's a branch and not main? or do I need to explicitly update tags somehow? either way, F3D repeats what git says as intended, the wrong version is probably user error on my side.
  • VTK build info got lost somehow?

@mwestphal
Copy link
Contributor Author

  • About the warning in git describe. Caused by an issue in the release process. The v2.0.0 tag had not been "annotated" I took care of that but you need to force update your tags locally with git fetch --tags -f. This issue will not appear on a fresh clone.

  • VTK "build 5" is replaced by "date: 20230519" if it makes sense. In your case, since you are building against VTK 9.2.5 release, no need to add the date as it is a true release.

@snoyer
Copy link
Contributor

snoyer commented May 19, 2023

All good then 👍

CMakeLists.txt Outdated Show resolved Hide resolved
cmake/f3dVersion.cmake Outdated Show resolved Hide resolved
cmake/f3dVersion.cmake Outdated Show resolved Hide resolved
mwestphal added 4 commits May 20, 2023 17:59
Improve `--version` output by creating a F3D_VERSION_FULL
that contains the output of `git describe`, handled
in f3dVersion.cmake.
@mwestphal mwestphal requested a review from Meakk May 20, 2023 10:00
@mwestphal mwestphal merged commit d37bb7a into f3d-app:master May 20, 2023
mwestphal added a commit that referenced this pull request Feb 10, 2024
Improve versioning display with `--version`
mwestphalnew pushed a commit to mwestphalnew/f3d that referenced this pull request Feb 10, 2024
Improve versioning display with `--version`
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.

F3D version and VTK version are incorrect when not release
3 participants