-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Conversation
Make sure to merge in develop to this branch or CICD will continue to fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is not right with the dependency graph.
$ git status
HEAD detached at origin/version-library
nothing to commit, working tree clean
$ ninja
$ programs/cleos/cleos version full
v1.9.0-develop-bc02b709dc6006f492b80b8f7da86e14ae8aea22
$ echo "//hello" >> programs/eosio-blocklog/main.cpp
$ git status
HEAD detached at origin/version-library
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: programs/eosio-blocklog/main.cpp
$ ninja
$ programs/cleos/cleos version full
v1.9.0-develop-bc02b709dc6006f492b80b8f7da86e14ae8aea22
$ ninja
$ programs/cleos/cleos version full
v1.9.0-develop-bc02b709dc6006f492b80b8f7da86e14ae8aea22-dirty
Take a close look at how appbase does it -- it doesn't have this problem of needing to build twice to pick up a change.
@spoonincode Very interesting. This seems to be a caveat associated with ~/eos $ mkdir ninja; mkdir make; pushd ./; cd ninja; cmake -GNinja ..; popd; pushd ./; cd make; cmake ..; popd;
.
.
.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/john.debord/eos/ninja
.
.
.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/john.debord/eos/make ~/eos $ pushd ./; cd ninja; ninja; popd; pushd ./; cd make; make -j20; popd;
.
.
.
[437/601] Building CXX object libraries/chain/CMakeFiles/eosio_chain.dir/resource_limits.cpp.o
[438/601] Building CXX object libraries/chain/CMakeFiles/eosio_chain.dir/thread_utils.cpp.o
[439/601] Updating version metadata... <---
[441/601] Building CXX object libraries/wabt/CMakeFiles/wabt.dir/src/token.cc.o
[442/601] Building CXX object libraries/wabt/CMakeFiles/wabt.dir/src/opcode.cc.o
.
.
.
[ 6%] Building CXX object libraries/wabt/CMakeFiles/wabt.dir/src/prebuilt/wast-lexer-gen.cc.o
[ 5%] Linking C static library libbuiltins.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: Updating version metadata... <---
[ 5%] Built target appbase_version
[ 6%] Building CXX object libraries/wabt/CMakeFiles/wabt.dir/src/lexer-source.cc.o
.
.
. ~/eos $ ./ninja/bin/cleos version full; ./make/bin/cleos version full;
v1.9.0-develop-680b6bb50c2b41af59cec25a49afd9b2cb98de10
v1.9.0-develop-680b6bb50c2b41af59cec25a49afd9b2cb98de10 ~/eos $ echo "//yo" >> programs/cleos/main.cpp;
~/eos $ git status
On branch version-library
Your branch is ahead of 'origin/version-library' by 2 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: programs/cleos/main.cpp ~/eos $ pushd ./; cd ninja; ninja; popd; pushd ./; cd make; make -j20; popd;
.
.
. ~/eos $ ./ninja/bin/cleos version full; ./make/bin/cleos version full;
v1.9.0-develop-98f88862f3ba286ee3780dbb89175b5436432537
v1.9.0-develop-98f88862f3ba286ee3780dbb89175b5436432537-dirty ~/eos $ pushd ./; cd ninja; ninja; popd; pushd ./; cd make; make -j20; popd;
.
.
. ~/eos $ ./ninja/bin/cleos version full; ./make/bin/cleos version full;
v1.9.0-develop-98f88862f3ba286ee3780dbb89175b5436432537-dirty
v1.9.0-develop-98f88862f3ba286ee3780dbb89175b5436432537-dirty |
@spoonincode Fixed. Turns out that This is why the |
Change Description
In reference to Issue #7396 and previous Pull Request #7414, this PR alters the format of printing the
cleos
version in a more intuitive way by the addition of a new library in repositoryEOSIO/eos
—version
. This library is extensible enough to be included into other programs as well. Also, a newcleos
sub-command has been added as well;cleos version full
.Under The Hood:
We can see that when running
make
, the build system updates the version metadata if need be.This notable behavior can be found in file
/eos/libraries/version/CMakeLists.txt
.Examples:
~/eos/build/bin $ ./cleos version client 1.9.0-develop
~/eos/build/bin $ ./cleos version full v1.9.0-develop-cccfb5cd4a1d98b8b4392c2969713bd13b9eee8b
Walk-through:
Consensus Changes
API Changes
New
cleos version
sub-command:cleos version full
.Documentation Additions