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

chore: Add version check for toxcore. #147

Merged
merged 1 commit into from
Nov 24, 2024
Merged

Conversation

Chiitoo
Copy link

@Chiitoo Chiitoo commented Nov 24, 2024

Not sure if something like this will be wanted, and not sure if it catches all the platforms and such (also the formatting gets a bit wide-like), but at this time, the build fails as follows with toxcore version less than 0.2.20:

FAILED: util/CMakeFiles/util_library.dir/src/toxcoreerrorparser.cpp.o
/usr/bin/x86_64-pc-linux-gnu-g++ -DCMAKE_BUILD -DDESKTOP_NOTIFICATIONS=0 -DGIT_DESCRIBE=\"nightly\" -DGIT_DESCRIBE_EXACT=\"nightly\" -DGIT_VERSION=\"9270753a8686706a33adeecea90eb138d789f466\" -DLOG_TO_FILE=1 -DQTOX_PLATFORM_EXT -DQT_CORE_LIB -DQT_MESSAGELOGCONTEXT=1 -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_RESTRICTED_CAST_FROM_ASCII -DSPELL_CHECKING -I/mnt/lprup/portage-build/portage/net-im/qtox-9999/work/qtox-9999_build/util/util_library_autogen/include -I/mnt/lprup/portage-build/portage/net-im/qtox-9999/work/qtox-9999_build -I/mnt/lprup/portage-build/portage/net-im/qtox-9999/work/qtox-9999 -I/usr/include/libexif -I/usr/include/sqlcipher -I/usr/include/opus -I/usr/include/AL -I/mnt/lprup/portage-build/portage/net-im/qtox-9999/work/qtox-9999/util/include -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib64/qt6/mkspecs/linux-g++  -march=znver4 -O2 -fomit-frame-pointer -pipe -mindirect-branch=thunk -std=c++20 -fno-exceptions -fno-rtti -fstack-protector-all -fPIC -fno-common -fstrict-overflow -ftrapv -pedantic-errors -Wall -Wcast-align -Wdouble-promotion -Wextra -Wformat=2 -Wmissing-declarations -Wnon-virtual-dtor -Wnull-dereference -Wold-style-cast -Woverloaded-virtual -Wshadow -Wsign-compare -Wundef -Wduplicated-cond -Wlogical-op -Wdate-time -Wstack-protector -MD -MT util/CMakeFiles/util_library.dir/src/toxcoreerrorparser.cpp.o -MF util/CMakeFiles/util_library.dir/src/toxcoreerrorparser.cpp.o.d -o util/CMakeFiles/util_library.dir/src/toxcoreerrorparser.cpp.o -c /mnt/lprup/portage-build/portage/net-im/qtox-9999/work/qtox-9999/util/src/toxcoreerrorparser.cpp
/mnt/lprup/portage-build/portage/net-im/qtox-9999/work/qtox-9999/util/src/toxcoreerrorparser.cpp: In function ‘bool ToxcoreErrorParser::parseErr(Tox_Err_Conference_Join, const char*, int, const char*)’:
/mnt/lprup/portage-build/portage/net-im/qtox-9999/work/qtox-9999/util/src/toxcoreerrorparser.cpp:154:10: error: ‘TOX_ERR_CONFERENCE_JOIN_NULL’ was not declared in this scope; did you mean ‘TOX_ERR_CONFERENCE_JOIN_OK’?
  154 |     case TOX_ERR_CONFERENCE_JOIN_NULL:
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |          TOX_ERR_CONFERENCE_JOIN_OK
ninja: build stopped: subcommand failed.

This change is Reviewable

At this time, the build fails with toxcore version less than 0.2.20.
@github-actions github-actions bot added the chore Updating grunt tasks etc; no production code change label Nov 24, 2024
@iphydf
Copy link
Member

iphydf commented Nov 24, 2024

LGTM. The alternative would have been to put a version check into the code with #if, but I'm happy to mandate 0.2.20 at the moment.

@iphydf iphydf added this to the v1.18.0 milestone Nov 24, 2024
@iphydf iphydf merged commit bb1324e into TokTok:master Nov 24, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Updating grunt tasks etc; no production code change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants