Skip to content

Conversation

@kamilsa
Copy link
Collaborator

@kamilsa kamilsa commented Sep 10, 2025

Fix linux build:

  • Remove append_range usages (not yet supported by linux compilers)
  • add break under default:
  • some cmake fixes

Add CI:

  • Macos 15 build
  • ubuntu 24 with gcc-14 build

Copilot AI review requested due to automatic review settings September 10, 2025 11:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes Linux compatibility issues and adds CI automation to the project. The main focus is replacing C++23 append_range calls with compatible insert operations and establishing build infrastructure.

  • Replaces append_range with insert operations for Linux compatibility
  • Adds comprehensive CI/CD workflow with GitHub Actions
  • Implements cross-platform build system with Makefile and initialization scripts

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/protocol/gossip/gossip.cpp Replaces append_range calls with insert operations for Linux compatibility
src/multi/content_identifier_codec.cpp Replaces append_range calls with insert operations for Linux compatibility
include/libp2p/transport/tcp/tcp_util.hpp Adds missing break statement in switch case
include/libp2p/coro/channel.hpp Refactors coroutine return statement for better compatibility
scripts/get_version.sh Adds Git-based version string generator script
scripts/check_python.sh Adds Python 3.12+ version check and installation script
scripts/README.md Documents Python installation script usage and features
Makefile Adds build automation with targets for initialization, configuration, and testing
CMakeLists.txt Adds CMAKE_POSITION_INDEPENDENT_CODE setting
.github/workflows/build_and_test.yaml Implements GitHub Actions CI workflow for Ubuntu and macOS
.ci/scripts/*.sh Adds initialization scripts for dependencies and OS detection
.ci/.env Defines package dependencies for different operating systems

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

return dns;
}
default:
break;
Copy link

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Adding a break statement in the default case of a switch where all other cases return is unnecessary. The break statement serves no purpose here since the function will return immediately after the switch block anyway.

Suggested change
break;
// no-op

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was needed to fix gcc-14 build

@kamilsa kamilsa merged commit 9dcfed6 into main Sep 12, 2025
2 checks passed
@kamilsa kamilsa deleted the feature/fix-linux branch September 12, 2025 09:12
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.

4 participants