Skip to content

Conversation

@nicu1989
Copy link

Notes for Reviewer

Pre-Review Checklist for the PR Author

  • Add sensible notes for the reviewer
  • PR title is short, expressive and meaningful
  • Consider switching the PR to a draft (Convert to draft)
    • as draft PR, the CI will be skipped for pushes
  • Relevant issues are linked in the References section
  • Every source code file has a copyright header with SPDX-License-Identifier: Apache-2.0 OR MIT
  • Branch follows the naming format (iox2-123-introduce-posix-ipc-example)
  • Commits messages are according to this guideline
  • Tests follow the best practice for testing
  • Changelog updated in the unreleased section including API breaking changes
  • Assign PR to reviewer
  • All checks have passed (except task-list-completed)

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Unit tests have been written for new behavior
  • Public API is documented
  • PR title describes the changes

Post-review Checklist for the PR Author

  • All open points are addressed and tracked via issues

References

Closes #

@dkroenke dkroenke self-requested a review November 12, 2025 12:05
add --noincompatible_disallow_empty_glob so empty globs dont error in bzlmod
export CARGO_HOME=/tmp/cargo so bindgen download succeed in sandbox

ensure the bindgen/cbindgen repos are imported
configure crate_universe using the crate module extension with the same manifest
as before so rust dependencies keep working under bzlmod

add bazel/extensions.bzl for bindgen and cbindgen.
This lets MODULE.bazel instantiate those components via use_extension.

update memory_mapping_tests.rs so that it works with sandboxed filesystem.

Signed-off-by: Nicolae Dicu <[email protected]>
Signed-off-by: Nicolae Dicu <[email protected]>
@nicu1989 nicu1989 marked this pull request as draft November 12, 2025 12:21
@nicu1989 nicu1989 force-pushed the nicu1989_enable_bzlmod_upstream branch from 0b50860 to a62e595 Compare November 12, 2025 12:22
@nicu1989 nicu1989 changed the title Nicu1989 enable bzlmod upstream Enable bzlmod upstream Nov 12, 2025
@nicu1989 nicu1989 marked this pull request as ready for review November 12, 2025 12:54
Copy link
Member

@dkroenke dkroenke left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! There are only minor remarks to do.
I will next review eclipse-iceoryx/iceoryx#2505 which needs to be merged first.

Comment on lines +1 to +12
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# ******************************************************************************* No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

To make the preflight-check pass:

Suggested change
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache Software License 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
# which is available at https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT

Comment on lines +1 to +12
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
Copy link
Member

Choose a reason for hiding this comment

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

To make the preflight-check pass:

Suggested change
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache Software License 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
# which is available at https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT

build --noincompatible_disallow_empty_glob

build --action_env=CARGO_BAZEL_REPIN=true
build --action_env=CARGO_HOME=/tmp/cargo
Copy link
Member

Choose a reason for hiding this comment

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

That is normally not needed.

Suggested change
build --action_env=CARGO_HOME=/tmp/cargo

Copy link
Member

Choose a reason for hiding this comment

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

Maybe this file should more express what is inside (definitions of dependencies for building iceoryx2).
What about naming it iceoryx2_deps.bzl?

###############################################################################
module(
name = "iceoryx2",
version = "0.1.0",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
version = "0.1.0",
version = "0.7.0",

Copy link
Member

Choose a reason for hiding this comment

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

The script to update the iceoryx2 version also needs to be adjusted.

Copy link
Member

Choose a reason for hiding this comment

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

We can add something like this to internal/scripts/update_versions.sh line 152:

sed -i -z 's/name = "iceoryx2",\n    version = "'"${OLD_VERSION}"'"/name = "iceoryx2",\n    version = "'"${NEW_VERSION}"'"/g' \
    MODULE.bazel

Comment on lines +33 to +37
git_override(
module_name = "iceoryx",
commit = "6760c0088c61e8bf68070e2d163a37caab7515b1",
remote = "https://github.com/qorix-group/iceoryx.git",
)
Copy link
Member

Choose a reason for hiding this comment

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

We need to change this to upstream once eclipse-iceoryx/iceoryx#2505 got merged

Copy link
Member

Choose a reason for hiding this comment

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

Once #301 is completed, likely in the next two weeks, this is superfluous and can be removed.

Comment on lines +20 to +41
def _iceoryx2_extra_deps():
maybe(
repo_rule = http_archive,
name = "bindgen",
sha256 = "b7e2321ee8c617f14ccc5b9f39b3a804db173ee217e924ad93ed16af6bc62b1d",
strip_prefix = "bindgen-cli-x86_64-unknown-linux-gnu",
urls = ["https://github.com/rust-lang/rust-bindgen/releases/download/v0.69.5/bindgen-cli-x86_64-unknown-linux-gnu.tar.xz"],
build_file_content = """
filegroup(
name = "bindgen-cli",
srcs = ["bindgen"],
visibility = ["//visibility:public"],
)
""",
)
maybe(
repo_rule = http_file,
name = "cbindgen",
sha256 = "521836d00863cb129283054e5090eb17563614e6328b7a1610e30949a05feaea",
urls = ["https://github.com/mozilla/cbindgen/releases/download/0.26.0/cbindgen"],
executable = True,
)
Copy link
Member

Choose a reason for hiding this comment

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

Optional: We could make the version numbers better configurable.

Suggested change
def _iceoryx2_extra_deps():
maybe(
repo_rule = http_archive,
name = "bindgen",
sha256 = "b7e2321ee8c617f14ccc5b9f39b3a804db173ee217e924ad93ed16af6bc62b1d",
strip_prefix = "bindgen-cli-x86_64-unknown-linux-gnu",
urls = ["https://github.com/rust-lang/rust-bindgen/releases/download/v0.69.5/bindgen-cli-x86_64-unknown-linux-gnu.tar.xz"],
build_file_content = """
filegroup(
name = "bindgen-cli",
srcs = ["bindgen"],
visibility = ["//visibility:public"],
)
""",
)
maybe(
repo_rule = http_file,
name = "cbindgen",
sha256 = "521836d00863cb129283054e5090eb17563614e6328b7a1610e30949a05feaea",
urls = ["https://github.com/mozilla/cbindgen/releases/download/0.26.0/cbindgen"],
executable = True,
)
BINDGEN_VERSION = "v0.69.5"
CBINDGEN_VERSION = "0.26.0"
def _iceoryx2_extra_deps():
maybe(
repo_rule = http_archive,
name = "bindgen",
sha256 = "b7e2321ee8c617f14ccc5b9f39b3a804db173ee217e924ad93ed16af6bc62b1d",
strip_prefix = "bindgen-cli-x86_64-unknown-linux-gnu",
urls = ["https://github.com/rust-lang/rust-bindgen/releases/download/{version}/bindgen-cli-x86_64-unknown-linux-gnu.tar.xz".format(version = BINDGEN_VERSION)],
build_file_content = """
filegroup(
name = "bindgen-cli",
srcs = ["bindgen"],
visibility = ["//visibility:public"],
)
""",
)
maybe(
repo_rule = http_file,
name = "cbindgen",
sha256 = "521836d00863cb129283054e5090eb17563614e6328b7a1610e30949a05feaea",
urls = ["https://github.com/mozilla/cbindgen/releases/download/{version}/cbindgen".format(version = CBINDGEN_VERSION)],
executable = True,
)

@dkroenke
Copy link
Member

Would you add an entry in doc/release-notes/iceoryx2-unreleased.md within the Features section that Bzlmod support for Bazel got enabled?

@nicu1989
Copy link
Author

Would you add an entry in doc/release-notes/iceoryx2-unreleased.md within the Features section that Bzlmod support for Bazel got enabled?

@dkroenke, thank you for all the points, they are helpful. I will start addressing them.

bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_rust", version = "0.58.0")
bazel_dep(name = "iceoryx", version = "2.95.7")
Copy link
Member

Choose a reason for hiding this comment

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

@nicu1989 We are currently in the process of copying the needed parts from iceoryx_hoofs to iceoryx2 so that this dependency can be omitted.
I would propose that we wait with this PR until it is done so that we do not need to merge eclipse-iceoryx/iceoryx#2505. Would this be feasible?

CC @elBoberido

Copy link
Member

Choose a reason for hiding this comment

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

See also #1179 (comment)

Choose a reason for hiding this comment

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

@dkroenke @elBoberido I think we can wait if it is only few weeks . But will reduce a lot of integration effort(with different os and versions) for us once we have it as early as possible.

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