diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index b562933..127d70c 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -33,6 +33,12 @@ jobs: with: path: "/home/runner/.cache/bazel" key: ${{ hashFiles('.bazelrc', '.bazelversion', 'WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel') }} + - name: Install buildifier + run: | + curl -f -s -L -o /usr/local/bin/buildifier https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-linux-$(arch | sed 's/aarch64/arm64/;s/x86_64/amd64/') + chmod a+x /usr/local/bin/buildifier + - name: Run buildifier + run: buildifier -mode check -r . - name: Build # TODO(evan.flynn): uncomment once the rules are properly fixed # run: bazel build //... diff --git a/README.md b/README.md index a6ff840..5fc8e01 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,8 @@ Here is a short list of major restrictions: ### Prerequisites -Bazel needs to be available. We recommend using [bazelisk](https://github.com/bazelbuild/bazelisk) -as a launch tool for Bazel. +Bazel needs to be available. It is recommended to use [bazelisk](https://github.com/bazelbuild/bazelisk) +as the launch tool for Bazel. ### Workspace setup @@ -44,14 +44,14 @@ Create an empty folder and add the following files to it: * `WORKSPACE` file: ```python - workspace(name = "my_first_bazel_ros_workspace") # choose your workspace name here + workspace(name = "my_first_bazel_ros_workspace") # choose a workspace name here # load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - RULES_ROS_VERSION = "xxx" # TODO: where to find the right version + RULES_ROS_VERSION = "xxx" # TODO: where to find the right version RUIES_ROS_SHA = "xxx" - # until we have a first release, please use this: + # until there is an initial release, use the following: git_repository( name = "rules_ros", remote = "https://github.com/ApexAI/rules_ros.git", @@ -67,7 +67,7 @@ Create an empty folder and add the following files to it: #) load("@rules_ros//repos/config:defs.bzl", "configure_ros2") - configure_ros2(distro = "humble") # currently only Humble is supported + configure_ros2(distro = "humble") # currently only Humble is supported load("@ros2_config//:setup.bzl", "setup") setup() @@ -87,7 +87,7 @@ Create an empty folder and add the following files to it: * `.bazelrc` file: - ```bash + ```shell # enable incompatible Python init mode build --incompatible_default_to_explicit_init_py @@ -99,41 +99,44 @@ Create an empty folder and add the following files to it: build --host_cxxopt="-std=c++17" ``` -* `.bazelversion` file (in case you are using bazelisk): +* `.bazelversion` file (if `bazelisk` is being used): -```text -6.5.0 -``` + ```text + 6.5.0 + ``` ### Run Bazel example To **build** an example delivered in the `rules_ros` repository run, e.g. -```bash +```shell bazel build @rules_ros//examples/hello_world ``` -from anywhere within your workspace. + +from anywhere within the workspace. **Executing** the example can be done by calling -```bash +```shell bazel run @rules_ros//examples/hello_world ``` Note that no sourcing is necessary. Bazel will take care of all the dependencies. **Deploying** a package archive to an install folder can be done by -```bash +```shell bazel run @rules_ros//examples:rules_ros_examples.install ``` -Now we are back to working with ROS as usual. Source the package as usual: -```bash +Now the environment is ready to work with ROS as usual. Source the package as usual with: + +```shell source /setup.bash ``` + and run an executable with -```bash +```shell ros2 run hello_world hello_world ``` @@ -143,11 +146,12 @@ ros2 run hello_world hello_world In this setup, a hermetic Python interpreter is included. The version is specified in `thirdparty/python/repositories.bzl`. Python packages specified in -`thirdparty/python/requirements_lock.in` are available for use. If you need to add a package, -you must run -```console +`thirdparty/python/requirements_lock.in` are available for use. If a package needs to be added, run + +```shell bazel run @rules_ros//thirdparty/python:requirements_lock.update ``` + to pin specific versions of the dependencies. In the future there will be a possibility to inject a customization in the WORKSPACE file. @@ -159,12 +163,14 @@ will be available as `@ros2.rclcpp` with all targets specified in the BUILD file `repos/config/ros2.rclcpp.BUILD`. The precise location where the build files will be injected into the `rclcpp` repo is specified in the index file `repos/config/bazel.repos`. -Therefore, if you need to depend on `rclcpp` in you code, you need to add `"@ros2.rclcpp//rclcpp"` -as a dependency in your `cc_binary` or `cc_library` target. +Therefore, if there is a dependency on `rclcpp`, `"@ros2.rclcpp//rclcpp"` needs to be added +as a dependency in the `cc_binary` or `cc_library` target. The exact version of a ROS 2 repository is pinned in the file `repos/config/ros2_.lock`. This file can be updated for the configured distro by running: -```console + +```shell bazel run @rules_ros//repos/config:repos_lock.update ``` + In the future there will be a possibility to inject any customization in the WORKSPACE file. diff --git a/examples/hello_world/BUILD.bazel b/examples/hello_world/BUILD.bazel index 23f4011..eb28c66 100644 --- a/examples/hello_world/BUILD.bazel +++ b/examples/hello_world/BUILD.bazel @@ -29,4 +29,4 @@ ros_pkg( pkg_name = "hello_world", version = "1.0.0", visibility = ["//visibility:public"], -) \ No newline at end of file +) diff --git a/pkg/defs.bzl b/pkg/defs.bzl index e94254d..ae6e1ef 100644 --- a/pkg/defs.bzl +++ b/pkg/defs.bzl @@ -13,16 +13,16 @@ # limitations under the License. load("@rules_pkg//pkg:tar.bzl", _pkg_tar = "pkg_tar") -load( - "@rules_ros//pkg/detail:ros_pkg.bzl", - _ros_pkg = "ros_pkg", - _ros_pkg_set = "ros_pkg_set", -) load( "@rules_ros//pkg/detail:ros_archive.bzl", _ros_archive_install_command = "ros_archive_install_command", _ros_archive_pkg_files = "ros_archive_pkg_files", ) +load( + "@rules_ros//pkg/detail:ros_pkg.bzl", + _ros_pkg = "ros_pkg", + _ros_pkg_set = "ros_pkg_set", +) ros_pkg = _ros_pkg ros_pkg_set = _ros_pkg_set diff --git a/pkg/detail/BUILD b/pkg/detail/BUILD index ee4c2f0..ffd03df 100644 --- a/pkg/detail/BUILD +++ b/pkg/detail/BUILD @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@rules_python//python:defs.bzl", "py_binary") load("@python_deps//:requirements.bzl", "requirement") +load("@rules_python//python:defs.bzl", "py_binary") exports_files(["templates/install.template"]) diff --git a/pkg/detail/ros_archive.bzl b/pkg/detail/ros_archive.bzl index 2b2525c..d9b9172 100644 --- a/pkg/detail/ros_archive.bzl +++ b/pkg/detail/ros_archive.bzl @@ -13,6 +13,7 @@ # limitations under the License. load("@rules_pkg//pkg:providers.bzl", "PackageFilegroupInfo", "PackageFilesInfo") +load("@rules_ros//pkg:providers.bzl", _RosPkgInfo = "RosPkgInfo") load( ":utils.bzl", _add_filegroup = "add_filegroup", @@ -21,7 +22,6 @@ load( _create_ros_pkg_set_info = "create_ros_pkg_set_info", _unique_pkg_names_or_fail = "unique_pkg_names_or_fail", ) -load("@rules_ros//pkg:providers.bzl", _RosPkgInfo = "RosPkgInfo") def _build_setup_bash(ctx): output = ctx.actions.declare_file("/".join([ctx.label.name, "setup.bash"])) diff --git a/pkg/detail/ros_pkg.bzl b/pkg/detail/ros_pkg.bzl index 7ccda91..9f5aeef 100644 --- a/pkg/detail/ros_pkg.bzl +++ b/pkg/detail/ros_pkg.bzl @@ -14,6 +14,7 @@ load("@rules_pkg//pkg:providers.bzl", "PackageFilegroupInfo", "PackageFilesInfo") load("@rules_python//python:packaging.bzl", "PyWheelInfo") +load("@rules_ros//pkg:providers.bzl", _RosPkgInfo = "RosPkgInfo") load( ":utils.bzl", _add_filegroup = "add_filegroup", @@ -23,7 +24,6 @@ load( _create_ros_pkg_set_info = "create_ros_pkg_set_info", _unique_pkg_names_or_fail = "unique_pkg_names_or_fail", ) -load("@rules_ros//pkg:providers.bzl", _RosPkgInfo = "RosPkgInfo") RESOURCE_PATH_PREFIX = "share/bazel-bin/" LIBRARY_PATH = "lib/{pkg_name}/" diff --git a/repos/config/defs.bzl b/repos/config/defs.bzl index ed10d70..d6288a4 100644 --- a/repos/config/defs.bzl +++ b/repos/config/defs.bzl @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@rules_ros//repos/config/detail:ros2_config.bzl", "ros2_config") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@rules_ros//repos/config:distros.bzl", "DISTROS") +load("@rules_ros//repos/config/detail:ros2_config.bzl", "ros2_config") def _configure_ros2(*, name, distro_src, repos_index_overlays): distro_src_wo_setup_file = {k: v for k, v in distro_src.items() if k != "setup_file"} diff --git a/repos/config/detail/BUILD.bazel b/repos/config/detail/BUILD.bazel index 498ad90..00ef1e9 100644 --- a/repos/config/detail/BUILD.bazel +++ b/repos/config/detail/BUILD.bazel @@ -20,13 +20,19 @@ load("@rules_python//python:defs.bzl", "py_binary") py_binary( name = "repos_lock.update", - srcs = ["lock_repos.py", "generate_ros2_config.py"], - main = "lock_repos.py", - data = [REPOS_INDEX_FILE, REPOS_SETUP_FILE] + REPOS_OVERLAY_FILES, + srcs = [ + "generate_ros2_config.py", + "lock_repos.py", + ], args = [ "$(execpath {})".format(REPOS_INDEX_FILE), "$(execpath {})".format(REPOS_SETUP_FILE), ] + ["$(execpath {})".format(f) for f in REPOS_OVERLAY_FILES], - deps = [requirement("pyyaml")], + data = [ + REPOS_INDEX_FILE, + REPOS_SETUP_FILE, + ] + REPOS_OVERLAY_FILES, + main = "lock_repos.py", visibility = ["//visibility:public"], + deps = [requirement("pyyaml")], ) diff --git a/repos/config/detail/generate_ros2_config.py b/repos/config/detail/generate_ros2_config.py index 184315b..fe79f62 100755 --- a/repos/config/detail/generate_ros2_config.py +++ b/repos/config/detail/generate_ros2_config.py @@ -33,9 +33,13 @@ def setup(): def print_setup(repos, output_file): print(HEADER, file=output_file) + printed_first_load = False for repo, spec in repos.items(): if spec.get("bazel") is not None: - print(build_load_command(repo, spec), file=output_file) + if printed_first_load: + output_file.write("\n") + output_file.write(build_load_command(repo, spec)) + printed_first_load = True def build_load_command(repo, spec): @@ -45,7 +49,7 @@ def build_load_command(repo, spec): "local": build_local_load_command, } if spec.get('type') not in builder.keys(): - return f""" + return f"""\ print("WARNING: Unknown repo type {spec.get('type')} for repo @{repo.replace('/', '.')}") """ return builder[spec.get('type')](repo, spec) @@ -54,7 +58,7 @@ def build_load_command(repo, spec): def build_build_files_attr(build_files): if not build_files: return "" - content = '\n'.join(f" '{k}': '{v}'," for k,v in build_files.items()) + content = '\n'.join(f' "{k}": "{v}",' for k,v in build_files.items()) return f"""build_files = {{ {content} }},""" diff --git a/repos/config/detail/lock_repos.py b/repos/config/detail/lock_repos.py index 2ec2c74..39a2525 100755 --- a/repos/config/detail/lock_repos.py +++ b/repos/config/detail/lock_repos.py @@ -104,7 +104,7 @@ def extract_archive_root_folder(path, origin): def fetch_git_details(url, version, **kwargs): cwd = os.getcwd() - max_retries = 2 + max_retries = 4 for i in range(max_retries + 1): with tempfile.TemporaryDirectory() as tempdir: try: @@ -113,7 +113,7 @@ def fetch_git_details(url, version, **kwargs): "--branch", version, "--bare", "-q"], capture_output = True, encoding='utf8', - timeout=20 + timeout=5 ) if result.returncode != 0: if max_retries == i: diff --git a/repos/config/detail/ros2_config.bzl b/repos/config/detail/ros2_config.bzl index 0e9102c..78741b4 100644 --- a/repos/config/detail/ros2_config.bzl +++ b/repos/config/detail/ros2_config.bzl @@ -32,7 +32,7 @@ _archive_attrs = { def _ros2_config_impl(ctx): ctx.file("repos_index_file.bzl", content = "REPOS_INDEX_FILE = '{}'".format(ctx.attr.repos_index)) - ctx.file("repos_overlay_files.bzl", content = "REPOS_OVERLAY_FILES = {}".format(["{}".format(l) for l in ctx.attr.repos_index_overlays])) + ctx.file("repos_overlay_files.bzl", content = "REPOS_OVERLAY_FILES = {}".format(["{}".format(i) for i in ctx.attr.repos_index_overlays])) ctx.file("repos_setup_file.bzl", content = "REPOS_SETUP_FILE = '{}'".format(ctx.attr.setup_file)) ctx.symlink(ctx.attr.setup_file, "setup.bzl") ctx.file("WORKSPACE", content = "workspace(name = {})".format(ctx.name), executable = False) diff --git a/repos/config/distros.bzl b/repos/config/distros.bzl index 77be98c..108ad90 100644 --- a/repos/config/distros.bzl +++ b/repos/config/distros.bzl @@ -4,10 +4,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") ROS_PROJECT = "https://github.com/ros2/ros2.git" _VERSIONS = [ - ("humble", "20230925", "57495eab51338591a0117b6763827607808e26344d134d6666ded66e479bdf8b"), ("iron", "20230912", "fd40b4d80eb9c27f57b2b59ad8a947cd5f7f34fc67c8df1d7cc0a659127fc9f7"), - ("foxy", "20230620", "2cf7e3f9c5b01b7de2ec3c80097837758f3554e4f5c99a2aeca2bd7f4eb0bc1f"), + ("humble", "20230925", "57495eab51338591a0117b6763827607808e26344d134d6666ded66e479bdf8b"), ("galactic", "20221209", "fd251be0e1d16c1f943a8f083dce7b75c60fc2095404c5834209a68846be48c7"), + ("foxy", "20230620", "2cf7e3f9c5b01b7de2ec3c80097837758f3554e4f5c99a2aeca2bd7f4eb0bc1f"), ("eloquent", "2020-1212", "76f4b08bc4ecc6b126d2bdf5e8b86fa3d4b6d5101c122f7d0fd973aa77ef819a"), ("dashing", "20210610", "f0e00b81e93f764bef7591b0d9e3b89d73660696764663f18f926cd9795028c9"), ] diff --git a/repos/config/setup_dashing.lock.bzl b/repos/config/setup_dashing.lock.bzl index 32b64f3..bc3a952 100644 --- a/repos/config/setup_dashing.lock.bzl +++ b/repos/config/setup_dashing.lock.bzl @@ -5,14 +5,13 @@ # load("@bazel_tools//tools/build_defs/repo:utils.bzl", _maybe = "maybe") -load("@rules_ros//repos/config/detail:git_repository.bzl", _git_repository = "git_repository") +load("@rules_ros//repos/config/detail:git_repository.bzl", "git_repository") load("@rules_ros//repos/config/detail:http_archive.bzl", "http_archive") -load("@rules_ros//repos/config/detail:new_local_repository.bzl", _new_local_repository = "new_local_repository") +load("@rules_ros//repos/config/detail:new_local_repository.bzl", "new_local_repository") def setup(): pass - _maybe( name = "ament.ament_index", branch = "0.7.2", @@ -22,24 +21,10 @@ def setup(): }, commit = "9d42ba13d7694ad8da5b1622e433e691996c4502", remote = "https://github.com/ament/ament_index.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1571244457 -0700", ) - - _maybe( - name = "eProsima.Fast-CDR", - branch = "v1.0.13", - build_files = { - "@rules_ros//repos:default.BUILD": "BUILD.bazel", - }, - commit = "174f6ff1d3a227c5c900a4587ee32fa888267f5e", - remote = "https://github.com/eProsima/Fast-CDR.git", - repo_rule = _git_repository, - shallow_since = "1585310200 +0100", - ) - - _maybe( name = "eclipse-cyclonedds.cyclonedds", branch = "0.7.0", @@ -48,10 +33,21 @@ def setup(): }, commit = "c261053186c455abc63ca5ac7d56c0808a59c364", remote = "https://github.com/eclipse-cyclonedds/cyclonedds.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1596471565 +0200", ) + _maybe( + name = "eProsima.Fast-CDR", + branch = "v1.0.13", + build_files = { + "@rules_ros//repos:default.BUILD": "BUILD.bazel", + }, + commit = "174f6ff1d3a227c5c900a4587ee32fa888267f5e", + remote = "https://github.com/eProsima/Fast-CDR.git", + repo_rule = git_repository, + shallow_since = "1585310200 +0100", + ) _maybe( name = "ros2.common_interfaces", @@ -61,11 +57,10 @@ def setup(): }, commit = "30dbc60b45e22f2c88a4c46493388fdad3916845", remote = "https://github.com/ros2/common_interfaces.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1621610616 -0700", ) - _maybe( name = "ros2.rcl", branch = "0.7.10", @@ -75,11 +70,10 @@ def setup(): }, commit = "f28fd0d5ee8e13a4955dbe84bd336eeee7e2be5d", remote = "https://github.com/ros2/rcl.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1621608437 -0700", ) - _maybe( name = "ros2.rcl_interfaces", branch = "0.7.4", @@ -91,11 +85,10 @@ def setup(): }, commit = "bfa9c43dd7d8cfc5c6fcba8a164d8ef317a386d7", remote = "https://github.com/ros2/rcl_interfaces.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1559174983 -0700", ) - _maybe( name = "ros2.rcl_logging", branch = "0.2.1", @@ -104,11 +97,10 @@ def setup(): }, commit = "6b1880038fed2893557c931a202c16b974637e42", remote = "https://github.com/ros2/rcl_logging.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1557360130 -0500", ) - _maybe( name = "ros2.rclcpp", branch = "0.7.16", @@ -118,11 +110,10 @@ def setup(): }, commit = "403aac966271132feadffca93dcfb24f6ab90efb", remote = "https://github.com/ros2/rclcpp.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1621608557 -0700", ) - _maybe( name = "ros2.rcpputils", branch = "0.1.1", @@ -131,11 +122,10 @@ def setup(): }, commit = "f8e638eb72bfbacea18ca1cf67c4f7d48561d9b2", remote = "https://github.com/ros2/rcpputils.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1564532092 -0700", ) - _maybe( name = "ros2.rcutils", branch = "0.7.6", @@ -145,11 +135,10 @@ def setup(): }, commit = "f868e5cb0eaeb9ae9fc984f6783922f375411007", remote = "https://github.com/ros2/rcutils.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1606260966 -0800", ) - _maybe( name = "ros2.rmw", branch = "0.7.2", @@ -158,11 +147,10 @@ def setup(): }, commit = "8652949435267cdf0fd65368f621146dea9a85eb", remote = "https://github.com/ros2/rmw.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1560370615 +0000", ) - _maybe( name = "ros2.ros2cli", branch = "0.7.11", @@ -173,11 +161,10 @@ def setup(): }, commit = "8ff79e6cfc88a8d973c854a6709404eed6db47e0", remote = "https://github.com/ros2/ros2cli.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1594441053 -0400", ) - _maybe( name = "ros2.rosidl", branch = "0.7.10", @@ -194,11 +181,10 @@ def setup(): }, commit = "407b652ac8ca23beea2f1f24575dd57f0c9b4401", remote = "https://github.com/ros2/rosidl.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1606259638 -0800", ) - _maybe( name = "ros2.rosidl_dds", branch = "0.7.1", @@ -207,11 +193,10 @@ def setup(): }, commit = "e88b1d0e62a2dca0788142cf1fb266a3a3c3d7dc", remote = "https://github.com/ros2/rosidl_dds.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1557357026 -0500", ) - _maybe( name = "ros2.rosidl_typesupport", branch = "0.7.1", @@ -220,22 +205,16 @@ def setup(): }, commit = "38eb801f1f856a503676bb79875786b3a3b6d92d", remote = "https://github.com/ros2/rosidl_typesupport.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1557357026 -0700", ) - print("WARNING: Unknown repo type None for repo @eProsima.Fast-DDS") - print("WARNING: Unknown repo type None for repo @eProsima.foonathan_memory_vendor") - print("WARNING: Unknown repo type None for repo @eclipse-iceoryx.iceoryx") - print("WARNING: Unknown repo type None for repo @ros-tooling.libstatistics_collector") - print("WARNING: Unknown repo type None for repo @ros2.ros2_tracing") - diff --git a/repos/config/setup_eloquent.lock.bzl b/repos/config/setup_eloquent.lock.bzl index 65ea6b0..d990330 100644 --- a/repos/config/setup_eloquent.lock.bzl +++ b/repos/config/setup_eloquent.lock.bzl @@ -5,14 +5,13 @@ # load("@bazel_tools//tools/build_defs/repo:utils.bzl", _maybe = "maybe") -load("@rules_ros//repos/config/detail:git_repository.bzl", _git_repository = "git_repository") +load("@rules_ros//repos/config/detail:git_repository.bzl", "git_repository") load("@rules_ros//repos/config/detail:http_archive.bzl", "http_archive") -load("@rules_ros//repos/config/detail:new_local_repository.bzl", _new_local_repository = "new_local_repository") +load("@rules_ros//repos/config/detail:new_local_repository.bzl", "new_local_repository") def setup(): pass - _maybe( name = "ament.ament_index", branch = "0.7.2", @@ -22,10 +21,21 @@ def setup(): }, commit = "9d42ba13d7694ad8da5b1622e433e691996c4502", remote = "https://github.com/ament/ament_index.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1571244457 -0700", ) + _maybe( + name = "eclipse-cyclonedds.cyclonedds", + branch = "0.7.0", + build_files = { + "@rules_ros//repos:default.BUILD": "BUILD.bazel", + }, + commit = "c261053186c455abc63ca5ac7d56c0808a59c364", + remote = "https://github.com/eclipse-cyclonedds/cyclonedds.git", + repo_rule = git_repository, + shallow_since = "1596471565 +0200", + ) _maybe( name = "eProsima.Fast-CDR", @@ -35,11 +45,10 @@ def setup(): }, commit = "cc27c2490b694e97ca1bbcc169172fd63209bb90", remote = "https://github.com/eProsima/Fast-CDR.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1566903518 +0200", ) - _maybe( name = "eProsima.Fast-DDS", branch = "v1.9.3", @@ -48,11 +57,10 @@ def setup(): }, commit = "b5ae9e9c9ea7ce49c64c0ef3f6c96a3dc563b16f", remote = "https://github.com/eProsima/Fast-DDS.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1573725955 +0100", ) - _maybe( name = "eProsima.foonathan_memory_vendor", branch = "v0.3.0", @@ -61,24 +69,10 @@ def setup(): }, commit = "017ff0bdfd2c93930bf525a01f8663a032337a14", remote = "https://github.com/eProsima/foonathan_memory_vendor.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1569302929 +0200", ) - - _maybe( - name = "eclipse-cyclonedds.cyclonedds", - branch = "0.7.0", - build_files = { - "@rules_ros//repos:default.BUILD": "BUILD.bazel", - }, - commit = "c261053186c455abc63ca5ac7d56c0808a59c364", - remote = "https://github.com/eclipse-cyclonedds/cyclonedds.git", - repo_rule = _git_repository, - shallow_since = "1596471565 +0200", - ) - - _maybe( name = "ros2.common_interfaces", branch = "0.8.1", @@ -87,11 +81,10 @@ def setup(): }, commit = "81663c07b93889c3d0afda9b99cd5f1c7c98c1f2", remote = "https://github.com/ros2/common_interfaces.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1571867898 -0700", ) - _maybe( name = "ros2.rcl", branch = "0.8.5", @@ -101,11 +94,10 @@ def setup(): }, commit = "f5c01e4e2eb5d8f7fb16321f81815cd4b6b200bd", remote = "https://github.com/ros2/rcl.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1607116198 -0600", ) - _maybe( name = "ros2.rcl_interfaces", branch = "0.8.0", @@ -117,11 +109,10 @@ def setup(): }, commit = "93cedce2dacd25fa4f2969d022ccbe3f2903e3fe", remote = "https://github.com/ros2/rcl_interfaces.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1569518728 -0500", ) - _maybe( name = "ros2.rcl_logging", branch = "0.3.3", @@ -130,11 +121,10 @@ def setup(): }, commit = "3955fc4fc37e46dc397c52cebd3e40732db1157d", remote = "https://github.com/ros2/rcl_logging.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1571871211 +0000", ) - _maybe( name = "ros2.rclcpp", branch = "0.8.5", @@ -144,11 +134,10 @@ def setup(): }, commit = "82202ae71f14fed3a487da90d8f4f74c07c7d1f7", remote = "https://github.com/ros2/rclcpp.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1607116009 -0600", ) - _maybe( name = "ros2.rcpputils", branch = "0.2.1", @@ -157,11 +146,10 @@ def setup(): }, commit = "33e2edb1dafd9dc1952e7f219c9ceee58905b831", remote = "https://github.com/ros2/rcpputils.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1573612278 -0800", ) - _maybe( name = "ros2.rcutils", branch = "0.8.5", @@ -171,11 +159,10 @@ def setup(): }, commit = "ef201364d5af13f74a9c368f271c762326d838be", remote = "https://github.com/ros2/rcutils.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1607117730 -0600", ) - _maybe( name = "ros2.rmw", branch = "0.8.1", @@ -184,11 +171,10 @@ def setup(): }, commit = "813b94ddd5650444b312304ad156f3b5d9f05e39", remote = "https://github.com/ros2/rmw.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1571879357 -0700", ) - _maybe( name = "ros2.ros2cli", branch = "0.8.8", @@ -199,11 +185,10 @@ def setup(): }, commit = "5d5b855369085d02631bc5bdd6ffb7fae680eb5b", remote = "https://github.com/ros2/ros2cli.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1607117614 -0600", ) - _maybe( name = "ros2.rosidl", branch = "0.8.3", @@ -220,11 +205,10 @@ def setup(): }, commit = "5f79cdcb7830999b527c2370b4397a3cc587374a", remote = "https://github.com/ros2/rosidl.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1607117948 -0600", ) - _maybe( name = "ros2.rosidl_dds", branch = "0.7.1", @@ -233,11 +217,10 @@ def setup(): }, commit = "e88b1d0e62a2dca0788142cf1fb266a3a3c3d7dc", remote = "https://github.com/ros2/rosidl_dds.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1557357026 -0500", ) - _maybe( name = "ros2.rosidl_typesupport", branch = "0.8.1", @@ -246,16 +229,12 @@ def setup(): }, commit = "b51759ea94bfdc58afc8831d4c847c5891d14bc3", remote = "https://github.com/ros2/rosidl_typesupport.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1607118075 -0600", ) - print("WARNING: Unknown repo type None for repo @eclipse-iceoryx.iceoryx") - print("WARNING: Unknown repo type None for repo @ros-tooling.libstatistics_collector") - print("WARNING: Unknown repo type None for repo @ros2.ros2_tracing") - diff --git a/repos/config/setup_foxy.lock.bzl b/repos/config/setup_foxy.lock.bzl index c4de1a3..4b19698 100644 --- a/repos/config/setup_foxy.lock.bzl +++ b/repos/config/setup_foxy.lock.bzl @@ -5,14 +5,13 @@ # load("@bazel_tools//tools/build_defs/repo:utils.bzl", _maybe = "maybe") -load("@rules_ros//repos/config/detail:git_repository.bzl", _git_repository = "git_repository") +load("@rules_ros//repos/config/detail:git_repository.bzl", "git_repository") load("@rules_ros//repos/config/detail:http_archive.bzl", "http_archive") -load("@rules_ros//repos/config/detail:new_local_repository.bzl", _new_local_repository = "new_local_repository") +load("@rules_ros//repos/config/detail:new_local_repository.bzl", "new_local_repository") def setup(): pass - _maybe( name = "ament.ament_index", branch = "1.1.0", @@ -22,11 +21,10 @@ def setup(): }, commit = "07492c3ada0f835464ef55178080f3df93c22292", remote = "https://github.com/ament/ament_index.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1625088023 -0700", ) - _maybe( name = "eProsima.Fast-CDR", branch = "v1.0.13", @@ -35,11 +33,10 @@ def setup(): }, commit = "174f6ff1d3a227c5c900a4587ee32fa888267f5e", remote = "https://github.com/eProsima/Fast-CDR.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1585310200 +0100", ) - _maybe( name = "eProsima.Fast-DDS", branch = "v2.1.3", @@ -48,11 +45,10 @@ def setup(): }, commit = "680cb71c7f3a9fb4b7e348d7d68ee2dbf4dd6d8d", remote = "https://github.com/eProsima/Fast-DDS.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1674805970 +0100", ) - _maybe( name = "eProsima.foonathan_memory_vendor", branch = "v1.2.0", @@ -61,11 +57,10 @@ def setup(): }, commit = "da062db05975d24a4b53de5a4122b47f6824997f", remote = "https://github.com/eProsima/foonathan_memory_vendor.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1637848987 +0100", ) - _maybe( name = "eclipse-cyclonedds.cyclonedds", branch = "0.7.0", @@ -74,11 +69,10 @@ def setup(): }, commit = "c261053186c455abc63ca5ac7d56c0808a59c364", remote = "https://github.com/eclipse-cyclonedds/cyclonedds.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1596471565 +0200", ) - _maybe( name = "ros-tooling.libstatistics_collector", branch = "1.0.2", @@ -87,11 +81,10 @@ def setup(): }, commit = "28e3c4634dc106b1e5209a776e9a56325f16c84a", remote = "https://github.com/ros-tooling/libstatistics_collector.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1678980793 -0400", ) - _maybe( name = "ros2.common_interfaces", branch = "2.0.5", @@ -100,11 +93,10 @@ def setup(): }, commit = "6356bc82f3a034f5d2c61c6760df0007a6cadfb0", remote = "https://github.com/ros2/common_interfaces.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1640218063 +0000", ) - _maybe( name = "ros2.rcl", branch = "1.1.14", @@ -114,11 +106,10 @@ def setup(): }, commit = "287ccd9ed06ff5bdded4dfb1130920d592a71bb7", remote = "https://github.com/ros2/rcl.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1658776609 -0700", ) - _maybe( name = "ros2.rcl_interfaces", branch = "1.0.0", @@ -130,11 +121,10 @@ def setup(): }, commit = "48cb91129051a494f3b4b097dccd6c921bb50552", remote = "https://github.com/ros2/rcl_interfaces.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1590522301 +0000", ) - _maybe( name = "ros2.rcl_logging", branch = "1.1.0", @@ -143,11 +133,10 @@ def setup(): }, commit = "d22a6630f039bee97c6667394def926a5426a673", remote = "https://github.com/ros2/rcl_logging.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1618435530 -0700", ) - _maybe( name = "ros2.rclcpp", branch = "2.4.3", @@ -157,11 +146,10 @@ def setup(): }, commit = "b0c25d5f22237d42e2cedad05dbb2e5cc31a3cf4", remote = "https://github.com/ros2/rclcpp.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1685154213 +0000", ) - _maybe( name = "ros2.rcpputils", branch = "1.3.2", @@ -170,11 +158,10 @@ def setup(): }, commit = "f4ce24de0b9b6b2c0c3807d6ce43418d4e1db331", remote = "https://github.com/ros2/rcpputils.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1630457027 -0700", ) - _maybe( name = "ros2.rcutils", branch = "1.1.5", @@ -184,11 +171,10 @@ def setup(): }, commit = "7cc5a47ee5d85d605d2291c1b04ac570a4c0faf6", remote = "https://github.com/ros2/rcutils.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1678961835 +0000", ) - _maybe( name = "ros2.rmw", branch = "1.0.4", @@ -197,11 +183,10 @@ def setup(): }, commit = "7fa45cb0d86fef00488e707b9ef37914d7ff0369", remote = "https://github.com/ros2/rmw.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1678961864 +0000", ) - _maybe( name = "ros2.ros2_tracing", branch = "1.0.5", @@ -210,11 +195,10 @@ def setup(): }, commit = "f10fb2c13775fa0220833c5fa4ff82660640362a", remote = "https://github.com/ros2/ros2_tracing.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1608651744 -0500", ) - _maybe( name = "ros2.ros2cli", branch = "0.9.13", @@ -225,11 +209,10 @@ def setup(): }, commit = "26715cbb0948258d6f04b94c909d035c5130456a", remote = "https://github.com/ros2/ros2cli.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1678961891 +0000", ) - _maybe( name = "ros2.rosidl", branch = "1.3.1", @@ -246,11 +229,10 @@ def setup(): }, commit = "62bc7072d9078cfd7c63ebb1d12ca6e9732491b4", remote = "https://github.com/ros2/rosidl.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1685154334 +0000", ) - _maybe( name = "ros2.rosidl_dds", branch = "0.7.1", @@ -259,11 +241,10 @@ def setup(): }, commit = "e88b1d0e62a2dca0788142cf1fb266a3a3c3d7dc", remote = "https://github.com/ros2/rosidl_dds.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1557357026 -0500", ) - _maybe( name = "ros2.rosidl_typesupport", branch = "1.0.3", @@ -272,10 +253,8 @@ def setup(): }, commit = "08bec09e39f68a29ca15d8177f084118a47eaa92", remote = "https://github.com/ros2/rosidl_typesupport.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1685154344 +0000", ) - print("WARNING: Unknown repo type None for repo @eclipse-iceoryx.iceoryx") - diff --git a/repos/config/setup_humble.lock.bzl b/repos/config/setup_humble.lock.bzl index 0d0b402..5a43cbc 100644 --- a/repos/config/setup_humble.lock.bzl +++ b/repos/config/setup_humble.lock.bzl @@ -5,14 +5,13 @@ # load("@bazel_tools//tools/build_defs/repo:utils.bzl", _maybe = "maybe") -load("@rules_ros//repos/config/detail:git_repository.bzl", _git_repository = "git_repository") +load("@rules_ros//repos/config/detail:git_repository.bzl", "git_repository") load("@rules_ros//repos/config/detail:http_archive.bzl", "http_archive") -load("@rules_ros//repos/config/detail:new_local_repository.bzl", _new_local_repository = "new_local_repository") +load("@rules_ros//repos/config/detail:new_local_repository.bzl", "new_local_repository") def setup(): pass - _maybe( name = "ament.ament_index", branch = "1.4.0", @@ -22,11 +21,10 @@ def setup(): }, commit = "f019d6c40991799a13b18c9c3dcc583e3fde0381", remote = "https://github.com/ament/ament_index.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1646168510 +0000", ) - _maybe( name = "eProsima.Fast-CDR", branch = "v1.0.24", @@ -35,11 +33,10 @@ def setup(): }, commit = "da2987299ee3104bb0393cf0afc8aad6fb848dc1", remote = "https://github.com/eProsima/Fast-CDR.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1647345218 +0100", ) - _maybe( name = "eProsima.Fast-DDS", branch = "v2.6.6", @@ -48,11 +45,10 @@ def setup(): }, commit = "cffaa679ec8cd9c84b4d5b3fe1e3c22974d63be0", remote = "https://github.com/eProsima/Fast-DDS.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1691144938 +0200", ) - _maybe( name = "eProsima.foonathan_memory_vendor", branch = "v1.3.1", @@ -61,11 +57,10 @@ def setup(): }, commit = "e91681a25711c1811b2eaf2ba1e6996e0d9ecc84", remote = "https://github.com/eProsima/foonathan_memory_vendor.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1683727792 +0200", ) - _maybe( name = "eclipse-cyclonedds.cyclonedds", branch = "0.10.3", @@ -74,11 +69,10 @@ def setup(): }, commit = "63b6eab0e0660009eaf5e54d10509ea587ce199e", remote = "https://github.com/eclipse-cyclonedds/cyclonedds.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1679487279 +0100", ) - _maybe( name = "eclipse-iceoryx.iceoryx", branch = "v2.0.3", @@ -87,11 +81,10 @@ def setup(): }, commit = "40ef24e9515940564af63987234d51dc7f02f6b3", remote = "https://github.com/eclipse-iceoryx/iceoryx.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1675094707 +0100", ) - _maybe( name = "ros-tooling.libstatistics_collector", branch = "1.3.1", @@ -100,11 +93,10 @@ def setup(): }, commit = "6d473eb7533a3db385512d5721e3a46ceb06f96f", remote = "https://github.com/ros-tooling/libstatistics_collector.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1677042096 -0800", ) - _maybe( name = "ros2.common_interfaces", branch = "4.2.3", @@ -113,11 +105,10 @@ def setup(): }, commit = "f4eac72f0bbd70f7955a5f709d4a6705eb6ca7e8", remote = "https://github.com/ros2/common_interfaces.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1673281597 -0600", ) - _maybe( name = "ros2.rcl", branch = "5.3.5", @@ -127,11 +118,10 @@ def setup(): }, commit = "3804c35f6dd31d5ac54a1acb426bff253cce8272", remote = "https://github.com/ros2/rcl.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1695130701 +0000", ) - _maybe( name = "ros2.rcl_interfaces", branch = "1.2.1", @@ -143,11 +133,10 @@ def setup(): }, commit = "5e01a28f9866a564491480e12d8659a134678741", remote = "https://github.com/ros2/rcl_interfaces.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1667833699 -0600", ) - _maybe( name = "ros2.rcl_logging", branch = "2.3.1", @@ -156,11 +145,10 @@ def setup(): }, commit = "1b7a4e34884005f28eeb04065b5d94565c67b11d", remote = "https://github.com/ros2/rcl_logging.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1667833800 -0600", ) - _maybe( name = "ros2.rclcpp", branch = "16.0.6", @@ -170,11 +158,10 @@ def setup(): }, commit = "0f6b5449f66f131735a423be4a84d6f14751d3b2", remote = "https://github.com/ros2/rclcpp.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1695130763 +0000", ) - _maybe( name = "ros2.rcpputils", branch = "2.4.1", @@ -183,11 +170,10 @@ def setup(): }, commit = "3eb281afdc891855b5feb367c79ede1e2fbb0acb", remote = "https://github.com/ros2/rcpputils.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1682457603 +0000", ) - _maybe( name = "ros2.rcutils", branch = "5.1.3", @@ -197,11 +183,10 @@ def setup(): }, commit = "2d9d74e72ecd1eea240412be3dacd413dcb5f680", remote = "https://github.com/ros2/rcutils.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1682457695 +0000", ) - _maybe( name = "ros2.rmw", branch = "6.1.1", @@ -210,11 +195,10 @@ def setup(): }, commit = "2a4ee718d0da004d5629f50afd2896fbd1f4aedd", remote = "https://github.com/ros2/rmw.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1667834517 -0600", ) - _maybe( name = "ros2.ros2_tracing", branch = "4.1.1", @@ -223,11 +207,10 @@ def setup(): }, commit = "548634dd2837d65c043436c8186614e924be5c6c", remote = "https://github.com/ros2/ros2_tracing.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1667834775 -0600", ) - _maybe( name = "ros2.ros2cli", branch = "0.18.7", @@ -238,11 +221,10 @@ def setup(): }, commit = "38d4fa97fa8091e211e190d70e9fa0b0e817689d", remote = "https://github.com/ros2/ros2cli.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1689700836 +0000", ) - _maybe( name = "ros2.rosidl", branch = "3.1.5", @@ -259,11 +241,10 @@ def setup(): }, commit = "cf3b637605c8c1dc0b1266ca0090963e9186c7dd", remote = "https://github.com/ros2/rosidl.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1689702714 +0000", ) - _maybe( name = "ros2.rosidl_dds", branch = "0.8.1", @@ -272,11 +253,10 @@ def setup(): }, commit = "ab8497770c652edb40d6b1591118198cbcf14237", remote = "https://github.com/ros2/rosidl_dds.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1648665003 -0700", ) - _maybe( name = "ros2.rosidl_typesupport", branch = "2.0.1", @@ -285,7 +265,6 @@ def setup(): }, commit = "aa522c4bf1a1b6c10766b84ca6625a8c494c0928", remote = "https://github.com/ros2/rosidl_typesupport.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1689702809 +0000", ) - diff --git a/repos/config/setup_iron.lock.bzl b/repos/config/setup_iron.lock.bzl index a381b54..1390389 100644 --- a/repos/config/setup_iron.lock.bzl +++ b/repos/config/setup_iron.lock.bzl @@ -5,14 +5,13 @@ # load("@bazel_tools//tools/build_defs/repo:utils.bzl", _maybe = "maybe") -load("@rules_ros//repos/config/detail:git_repository.bzl", _git_repository = "git_repository") +load("@rules_ros//repos/config/detail:git_repository.bzl", "git_repository") load("@rules_ros//repos/config/detail:http_archive.bzl", "http_archive") -load("@rules_ros//repos/config/detail:new_local_repository.bzl", _new_local_repository = "new_local_repository") +load("@rules_ros//repos/config/detail:new_local_repository.bzl", "new_local_repository") def setup(): pass - _maybe( name = "ament.ament_index", branch = "1.5.2", @@ -22,11 +21,10 @@ def setup(): }, commit = "ba818db036e82d5f752d17e3e6fe6e3efd583bfb", remote = "https://github.com/ament/ament_index.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1676390119 +0000", ) - _maybe( name = "eProsima.Fast-CDR", branch = "v1.0.27", @@ -35,11 +33,10 @@ def setup(): }, commit = "5d782877435b569e0ed38541f362e212c9123dd4", remote = "https://github.com/eProsima/Fast-CDR.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1679466588 +0100", ) - _maybe( name = "eProsima.Fast-DDS", branch = "2.10.2", @@ -48,11 +45,10 @@ def setup(): }, commit = "2be7879185bfa2b67d5a9777ddee0a7e637776f3", remote = "https://github.com/eProsima/Fast-DDS.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1692360029 +0200", ) - _maybe( name = "eProsima.foonathan_memory_vendor", branch = "v1.3.0", @@ -61,11 +57,10 @@ def setup(): }, commit = "8db2afc097db4cebe414ae27cdb3af1480ae46e7", remote = "https://github.com/eProsima/foonathan_memory_vendor.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1676364830 +0100", ) - _maybe( name = "eclipse-cyclonedds.cyclonedds", branch = "0.10.3", @@ -74,11 +69,10 @@ def setup(): }, commit = "63b6eab0e0660009eaf5e54d10509ea587ce199e", remote = "https://github.com/eclipse-cyclonedds/cyclonedds.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1679487279 +0100", ) - _maybe( name = "eclipse-iceoryx.iceoryx", branch = "v2.0.3", @@ -87,11 +81,10 @@ def setup(): }, commit = "40ef24e9515940564af63987234d51dc7f02f6b3", remote = "https://github.com/eclipse-iceoryx/iceoryx.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1675094707 +0100", ) - _maybe( name = "ros-tooling.libstatistics_collector", branch = "1.5.1", @@ -100,11 +93,10 @@ def setup(): }, commit = "00b9371c15fdc9b3f42faee3cb718214b787eb13", remote = "https://github.com/ros-tooling/libstatistics_collector.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1681306122 +0000", ) - _maybe( name = "ros2.common_interfaces", branch = "5.0.0", @@ -113,11 +105,10 @@ def setup(): }, commit = "86801a504b97f25a3b6e1c36e42a445500c98f79", remote = "https://github.com/ros2/common_interfaces.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1681224748 +0000", ) - _maybe( name = "ros2.rcl", branch = "6.0.3", @@ -127,11 +118,10 @@ def setup(): }, commit = "71ecc97db05490981f3e37ced27c66f8905879e8", remote = "https://github.com/ros2/rcl.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1694151357 +0800", ) - _maybe( name = "ros2.rcl_interfaces", branch = "1.6.0", @@ -143,11 +133,10 @@ def setup(): }, commit = "6d28b16a6f74485af03a2c4f043dd568e576c25e", remote = "https://github.com/ros2/rcl_interfaces.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1681820432 +0000", ) - _maybe( name = "ros2.rcl_logging", branch = "2.5.1", @@ -156,11 +145,10 @@ def setup(): }, commit = "2bc49ab7ff557a45d4fa152e2f400e9ad2bb6a68", remote = "https://github.com/ros2/rcl_logging.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1681252296 -0700", ) - _maybe( name = "ros2.rclcpp", branch = "21.0.3", @@ -170,11 +158,10 @@ def setup(): }, commit = "45df3555d2daee48332f7dad1e6dabc7e4a7fd60", remote = "https://github.com/ros2/rclcpp.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1694151852 +0800", ) - _maybe( name = "ros2.rcpputils", branch = "2.6.1", @@ -183,11 +170,10 @@ def setup(): }, commit = "39b20134e571ba74baa7c77750eab586da90b7a5", remote = "https://github.com/ros2/rcpputils.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1676322161 +0000", ) - _maybe( name = "ros2.rcutils", branch = "6.2.1", @@ -197,11 +183,10 @@ def setup(): }, commit = "04aa9804feb46403f0058f4b089134a6985e19d3", remote = "https://github.com/ros2/rcutils.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1681305660 +0000", ) - _maybe( name = "ros2.rmw", branch = "7.1.0", @@ -210,11 +195,10 @@ def setup(): }, commit = "17e3a94e447cd043dc20aec7dd620b5eb26241c6", remote = "https://github.com/ros2/rmw.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1681312425 +0000", ) - _maybe( name = "ros2.ros2_tracing", branch = "6.3.1", @@ -223,11 +207,10 @@ def setup(): }, commit = "fb240709fda0e0cc6c08f12ae8052d3a32221d29", remote = "https://github.com/ros2/ros2_tracing.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1683805768 +0800", ) - _maybe( name = "ros2.ros2cli", branch = "0.25.3", @@ -238,11 +221,10 @@ def setup(): }, commit = "4d92fa27ca0d7796c1f792864fd98dd3b7437f8f", remote = "https://github.com/ros2/ros2cli.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1694153559 +0800", ) - _maybe( name = "ros2.rosidl", branch = "4.0.1", @@ -259,11 +241,10 @@ def setup(): }, commit = "995917e9ce14d17821c04bf28d5a092111537842", remote = "https://github.com/ros2/rosidl.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1689270954 +0800", ) - _maybe( name = "ros2.rosidl_dds", branch = "0.10.1", @@ -272,11 +253,10 @@ def setup(): }, commit = "f074b295c316e9bbb9845344cc6ab882339e9305", remote = "https://github.com/ros2/rosidl_dds.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1676323645 +0000", ) - _maybe( name = "ros2.rosidl_typesupport", branch = "3.0.1", @@ -285,7 +265,6 @@ def setup(): }, commit = "7cadef85a4f4e633d8598210ce99d47a3dde52a9", remote = "https://github.com/ros2/rosidl_typesupport.git", - repo_rule = _git_repository, + repo_rule = git_repository, shallow_since = "1689271321 +0800", ) - diff --git a/rosidl/defs.bzl b/rosidl/defs.bzl index 3e5e6de..3a4804e 100644 --- a/rosidl/defs.bzl +++ b/rosidl/defs.bzl @@ -12,11 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +load(":detail/cc_library_with_msgs_provider.bzl", _msgs_library_with_cc = "msgs_library_with_cc") load(":detail/rosidl_adapter.bzl", _rosidl_adapter = "rosidl_adapter") load(":detail/rosidl_generator_c.bzl", _cc_rosidl_generator_c_library = "cc_rosidl_generator_c_library") load(":detail/rosidl_generator_cpp.bzl", _cc_rosidl_generator_cpp_library = "cc_rosidl_generator_cpp_library") load(":detail/rosidl_typesupport_c.bzl", _cc_rosidl_typesupport_c_library = "cc_rosidl_typesupport_c_library") -load(":detail/cc_library_with_msgs_provider.bzl", _msgs_library_with_cc ="msgs_library_with_cc") raw_msgs_library = _rosidl_adapter @@ -90,13 +90,9 @@ def msgs_library( ] + deps, ) - _msgs_library_with_cc( name = name, deps = cc_libs + deps, msgs = ":" + name_raw, visibility = visibility, ) - - - diff --git a/rosidl/detail/rosidl_generator_c.bzl b/rosidl/detail/rosidl_generator_c.bzl index 34686e3..d260c7e 100644 --- a/rosidl/detail/rosidl_generator_c.bzl +++ b/rosidl/detail/rosidl_generator_c.bzl @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -load(":detail/misc_support.bzl", "extract_single_dirname", "to_snake_case_with_exceptions") +load(":detail/cc_library_with_hdrs_extracted_from_srcs.bzl", "cc_library_with_hdrs_extracted_from_srcs") load(":detail/common_config.bzl", "create_common_config") +load(":detail/misc_support.bzl", "extract_single_dirname", "to_snake_case_with_exceptions") load(":detail/visiability_control.bzl", "create_visibility_control_h") -load(":detail/cc_library_with_hdrs_extracted_from_srcs.bzl", "cc_library_with_hdrs_extracted_from_srcs") load(":providers.bzl", "MsgsInfo") _default_attrs = { @@ -31,10 +31,10 @@ _default_attrs = { ], cfg = "exec", ), - "_visibility_control_h_in": attr.label( - default = "@ros2.rosidl//rosidl_generator_c:resource/rosidl_generator_c__visibility_control.h.in", - allow_single_file = True, - ), + "_visibility_control_h_in": attr.label( + default = "@ros2.rosidl//rosidl_generator_c:resource/rosidl_generator_c__visibility_control.h.in", + allow_single_file = True, + ), } def _dict_union(x, y): diff --git a/rosidl/detail/rosidl_generator_cpp.bzl b/rosidl/detail/rosidl_generator_cpp.bzl index 80d5bed..846cfae 100644 --- a/rosidl/detail/rosidl_generator_cpp.bzl +++ b/rosidl/detail/rosidl_generator_cpp.bzl @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -load(":detail/misc_support.bzl", "extract_single_dirname", "to_snake_case_with_exceptions") -load(":detail/common_config.bzl", "create_common_config") -load(":detail/cc_library_with_hdrs_extracted_from_srcs.bzl", "cc_library_with_hdrs_extracted_from_srcs") load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo") +load(":detail/cc_library_with_hdrs_extracted_from_srcs.bzl", "cc_library_with_hdrs_extracted_from_srcs") +load(":detail/common_config.bzl", "create_common_config") +load(":detail/misc_support.bzl", "extract_single_dirname", "to_snake_case_with_exceptions") def output_files_create(name): snake_case_name = to_snake_case_with_exceptions(name) diff --git a/rosidl/detail/rosidl_generator_dds_idl.bzl b/rosidl/detail/rosidl_generator_dds_idl.bzl index c8e9bf8..6793e37 100644 --- a/rosidl/detail/rosidl_generator_dds_idl.bzl +++ b/rosidl/detail/rosidl_generator_dds_idl.bzl @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -load(":detail/misc_support.bzl", "extract_single_dirname") load(":detail/common_config.bzl", "create_common_config_for_dds_idl_generator") +load(":detail/misc_support.bzl", "extract_single_dirname") load(":providers.bzl", "MsgsInfo") _default_attrs = { @@ -73,6 +73,7 @@ def _build_dds_idl_files(ctx, srcs): args = ctx.actions.args() args.add("--generator-arguments-file", arguments_json_file.path) + # args.add("--subfolders", "apex_middleware_typefiles") # args.add("--extension", "apex_middleware_typefiles_generator.rosidl_generator_dds_idl_extension") if ctx.attr._additional_service_templates: diff --git a/rosidl/detail/rosidl_typesupport_c.bzl b/rosidl/detail/rosidl_typesupport_c.bzl index 6d4ab04..18cfddf 100644 --- a/rosidl/detail/rosidl_typesupport_c.bzl +++ b/rosidl/detail/rosidl_typesupport_c.bzl @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -load(":detail/misc_support.bzl", "extract_single_dirname", "to_snake_case_with_exceptions") +load(":detail/cc_library_with_hdrs_extracted_from_srcs.bzl", "cc_library_with_hdrs_extracted_from_srcs") load(":detail/common_config.bzl", "create_common_config") +load(":detail/misc_support.bzl", "extract_single_dirname", "to_snake_case_with_exceptions") load(":detail/visiability_control.bzl", "create_visibility_control_h") -load(":detail/cc_library_with_hdrs_extracted_from_srcs.bzl", "cc_library_with_hdrs_extracted_from_srcs") def output_files_create(name): snake_case_name = to_snake_case_with_exceptions(name) diff --git a/thirdparty/setup_01.bzl b/thirdparty/setup_01.bzl index d25cde4..4783c6b 100644 --- a/thirdparty/setup_01.bzl +++ b/thirdparty/setup_01.bzl @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@rules_ros//thirdparty/python:repositories.bzl", "load_rules_python_repositories") -load("@rules_ros//thirdparty/libyaml:repositories.bzl", "load_libyaml_repositories") load("@rules_ros//thirdparty/bazel_skylib:repositories.bzl", "load_bazel_skylib_repositories") +load("@rules_ros//thirdparty/libyaml:repositories.bzl", "load_libyaml_repositories") +load("@rules_ros//thirdparty/python:repositories.bzl", "load_rules_python_repositories") load("@rules_ros//thirdparty/rules_pkg:repositories.bzl", "load_rules_pkg_repositories") def setup_01(): diff --git a/thirdparty/setup_02.bzl b/thirdparty/setup_02.bzl index 81223a7..0344504 100644 --- a/thirdparty/setup_02.bzl +++ b/thirdparty/setup_02.bzl @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@rules_ros//thirdparty/python:setup_toolchain.bzl", "register_python_toolchain") load("@rules_ros//thirdparty/bazel_skylib:setup.bzl", "setup_bazel_skylib_repositories") +load("@rules_ros//thirdparty/python:setup_toolchain.bzl", "register_python_toolchain") load("@rules_ros//thirdparty/rules_pkg:setup.bzl", "setup_rules_pkg_repositories") def setup_02(): diff --git a/utils/template_expansion.bzl b/utils/template_expansion.bzl index 4657a5e..965abd5 100644 --- a/utils/template_expansion.bzl +++ b/utils/template_expansion.bzl @@ -18,16 +18,14 @@ def _expand_template_impl(ctx): template_file = ctx.file.template if not template_file.basename.endswith(".em"): fail("The template file must end with '.em'") - if len(ctx.attr.variables)>1: + if len(ctx.attr.variables) > 1: fail("More than one variable definition not implemented.") variable = ctx.attr.variables.keys()[0] if len(ctx.attr.variables) != 0 else None values = ctx.attr.variables[variable] if variable != None else [None] outputs = [] for value in values: - out_file_basename = ctx.attr.output_pattern.format(**{variable:value}) \ - if ctx.attr.output_pattern != "" \ - else template_file.basename.rsplit(".", 1)[0] + out_file_basename = ctx.attr.output_pattern.format(**{variable: value}) if ctx.attr.output_pattern != "" else template_file.basename.rsplit(".", 1)[0] output_file = ctx.actions.declare_file( "include/{package_name}/{file_name}".format( package_name = package_name,