bfgroup / b2

B2 makes it easy to build C++ projects, everywhere.
https://www.bfgroup.xyz/b2/
Boost Software License 1.0
76 stars 228 forks source link

version mismatch message #324

Closed sdarwin closed 8 months ago

sdarwin commented 1 year ago

Hi,

Just ran into an issue, notice this line:

src/build/version.jam:        ECHO "error: mismatched versions of B2 engine and core" ;

When caching in CI it could be helpful to not rebuild b2 (saving time) or only rebuild b2 when necessary.

A way to facilitate that would be to add functionality in src/engine/bump_version.py, which is already manipulating version numbers and has knowledge about versions.

Add flags to bump_version.py:

--showcoreversion
--showengineversion
--compareversions

In the CI scripts, use --compareversions to decide if b2 should be rebuilt.

It would have simple output such as "match" "nomatch", or perhaps distinctive exit codes: 0 for success, 2 for failure.

grafikrobot commented 1 year ago

If you install b2 it can be easily cached without version mismatches. So not sure what you are asking for. Also, the bump_version.py script is obsolete and not used any longer.

sdarwin commented 1 year ago

There was a recent report of the mismatch error: boostorg/url Issue 760

You are suggesting to install b2. Not sure if that's different from building b2, which is what occurs during CI testing.

After building, b2 resides in the boost folder. Installation to /bin/ or /usr/local/bin would not get cached.

I think I have already fixed this by adding new logic in boost-ci. It just seemed that perhaps the comparison check should live in the bfgroup/b2 repository instead of boostorg/boost-ci . Otherwise, it's ok to close the issue.