Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ jobs:
# Test all supported releases.
# See https://www.netbsd.org/releases/.
include:
- release: 9.4
capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0 -DKJ_USE_KQUEUE=0"'
- release: 10.1
# Due to a bug in Cap'n Proto, GCC compilers older

@ryanofsky ryanofsky Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In commit "ci: Switch to default compiler on NetBSD 9.4" (2d33b14)

It'd be nice if commit message said what motivation was for this change. It seems like this is switching to an older compiler and adding a workaround only needed in the older compiler. Unclear why this is better than just using the newer compiler.

EDIT: Looking at next commit, reason for doing this seems to be newer netbsd version added in next commit that maybe doesn't support GCC 14, or maybe defaults to a newer version that would be preferred for wider coverage?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I presume the rationale is that the default compiler is more likely used (by default), so documenting the workaround for it seems fine.

However, using GCC 14, or anything else, will work equally as a workaround and seems fine as well.

# than 14.x require `-DKJ_NO_EXCEPTIONS=0` when
# processing `capnproto/c++/src/kj/common.h`.
# See https://github.com/capnproto/capnproto/pull/2756/changes/28fa1a6753514d8de56875ec2222fa0e1c3a04f7.
- release: '10.1'
capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0"'
env_vars: 'CXXFLAGS="-DKJ_NO_EXCEPTIONS=0"'
- release: '11.0'
capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0"'
env_vars: 'CXXFLAGS="-DKJ_NO_EXCEPTIONS=0"'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In commit "ci: Switch to default compiler on NetBSD 9.4" (2d33b14)

I was confused by inconsistency here between CPPFLAGS and CXXFLAGS but apparently this is needed because cmake ignores uses CXXFLAGS and ignores CPPFLAGS

steps:
- uses: actions/checkout@v6

Expand Down Expand Up @@ -63,7 +69,7 @@ jobs:
- name: Run CI script
run: |
cd ${{ github.workspace }}
CI_CONFIG="ci/configs/netbsd.bash" bash ci/scripts/ci.sh
CI_CONFIG="ci/configs/netbsd.bash" ${{ matrix.env_vars }} bash ci/scripts/ci.sh

build-openbsd:
runs-on: ubuntu-latest
Expand Down
8 changes: 1 addition & 7 deletions ci/configs/netbsd.bash
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
CI_DESC="CI config for NetBSD"
CI_DIR=build-netbsd
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter"
# Hardcode GCC 14, since default GCC versions installed by NetBSD are older
# and may not be compatible with libmultiprocess. GCC 14 was chosen because
# it's the latest compiler available on all versions of NetBSD that we test.
# Note that the GCC version specified here must match the version specified
# in pkg_add in ci.yml.
export CXX="/usr/pkg/gcc14/bin/g++"
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter ${CXXFLAGS:-}"
CMAKE_ARGS=(-G Ninja)
BUILD_ARGS=(-k 0)
2 changes: 1 addition & 1 deletion include/mp/proxy-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ template <typename Accessor, typename... Args>
auto PassField(Priority<2>, Args&&... args) -> decltype(CustomPassField<Accessor>(std::forward<Args>(args)...))
{
return CustomPassField<Accessor>(std::forward<Args>(args)...);
};
}

template <int argc, typename Accessor, typename Parent>
struct ServerField : Parent
Expand Down
2 changes: 1 addition & 1 deletion include/mp/type-function.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ decltype(auto) CustomReadField(TypeList<std::function<FnR(FnParams...)>> types,
return read_dest.construct(ProxyCallFn<decltype(client)>{std::move(client)});
}
return read_dest.construct();
};
}
} // namespace mp

#endif // MP_PROXY_TYPE_FUNCTION_H
Loading