Skip to content

Show warning if Go 1.21.x is installed#3307

Merged
stevenengler merged 1 commit intoshadow:mainfrom
stevenengler:go-version-check
Mar 13, 2024
Merged

Show warning if Go 1.21.x is installed#3307
stevenengler merged 1 commit intoshadow:mainfrom
stevenengler:go-version-check

Conversation

@stevenengler
Copy link
Copy Markdown
Contributor

@stevenengler stevenengler commented Mar 12, 2024

This adds a CMake warning if Go 1.21.x is installed when building Shadow. I don't see a nice way of enabling this check only when the --extra flag is used, so we need to always perform this check even if the --extra flag isn't used. For this reason I've made it a warning rather than an error. For example:

$ ./setup build --test --extra
2024-03-12 23:39:35,595 [INFO] running 'cmake /shadow -DCMAKE_INSTALL_PREFIX=/root/.local -DCMAKE_BUILD_TYPE=Release -DSHADOW_TEST=ON -DCMAKE_PREFIX_PATH=' from '/shadow/build'
-- System name: Linux
-- System version: 5.15.0-91-generic
-- System processor: x86_64
-- CMAKE_MODULE_PATH = /shadow/cmake/
CMake Warning at CMakeLists.txt:82 (MESSAGE):
  Go version '1.21.7' is not supported.  Some extra tests will likely fail.
  See issue #3267.


-- SHADOW_VERSION_FULL=3.1.0
-- SHADOW_VERSION_MAJOR=3
-- SHADOW_VERSION_MINOR=1
-- SHADOW_VERSION_PATCH=0

This check is also fine if Go is not installed. In this case you won't see any message in the CMake output. For example:

$  ./setup build --test --extra
2024-03-12 23:38:36,345 [INFO] running 'cmake /shadow -DCMAKE_INSTALL_PREFIX=/root/.local -DCMAKE_BUILD_TYPE=Release -DSHADOW_TEST=ON -DCMAKE_PREFIX_PATH=' from '/shadow/build'
-- System name: Linux
-- System version: 5.15.0-91-generic
-- System processor: x86_64
-- CMAKE_MODULE_PATH = /shadow/cmake/
-- SHADOW_VERSION_FULL=3.1.0
-- SHADOW_VERSION_MAJOR=3
-- SHADOW_VERSION_MINOR=1
-- SHADOW_VERSION_PATCH=0

Closes #3267.

@github-actions github-actions bot added the Component: Build Build/install tools and dependencies label Mar 12, 2024
@stevenengler stevenengler changed the title Show warning if Go 1.21.x is used Show warning if Go 1.21.x is installed Mar 12, 2024
@stevenengler stevenengler requested a review from robgjansen March 12, 2024 23:54
@stevenengler stevenengler enabled auto-merge March 13, 2024 01:31
@stevenengler stevenengler merged commit 0c61dd8 into shadow:main Mar 13, 2024
@stevenengler stevenengler deleted the go-version-check branch March 13, 2024 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Build Build/install tools and dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Go tests segfault with Go 1.21 (Fedora 38 and 39)

2 participants