Skip to content

Comments

build!: require rustc 1.85#566

Merged
esteve merged 6 commits intoros2-rust:mainfrom
esteve:use-rustc-1.85
Jan 14, 2026
Merged

build!: require rustc 1.85#566
esteve merged 6 commits intoros2-rust:mainfrom
esteve:use-rustc-1.85

Conversation

@esteve
Copy link
Collaborator

@esteve esteve commented Jan 7, 2026

This PR updates the requirement for the rustc compiler to 1.85.

@esteve esteve force-pushed the use-rustc-1.85 branch 4 times, most recently from 570214e to 2baa4a8 Compare January 7, 2026 12:34
@luca-della-vedova
Copy link
Collaborator

Somewhat tangential to the 1.85 or no 1.85 decision, but this PR and its almost 4000 diff mostly due to format changes will really wreak havoc of merge conflicts in all the PRs that are currently open.

In an ideal world we would get through some of the review backlog and review / merge open PRs first.
Iin a less ideal world we would configure rustfmt to use the previous rust edition and undo format changes here.
In an even less ideal world we would merge this and commit to solve merge conflicts for all open PRs to make contributor's life easier.
In the worst world I can imagine this gets merged as is and now all contributors with long open PRs need to navigate large scale merge conflicts.

@esteve
Copy link
Collaborator Author

esteve commented Jan 8, 2026

@luca-della-vedova yeah, I agree, it's not an ideal situation. I've kept the formatting changes in a separate commit so they can be easily reverted/removed. I'd rather keep the 1.85 requirement given that requiring 1.75 is not providing any benefit and in fact, it's causing issues with some of the dependencies. We could postpone the switch to the 2024 edition, though still keep the code changes (i.e. unsafe blocks).

For the next release of rclrs I want to include at least, your PR with the dynamic publishers/subscribers, the switch to 1.85 and some of the smaller PRs (warnings, QoS, etc). After all those PRs are merged, it'd be a good moment to switch to Rust 2024 and reformat the source code.

However, formatting changes seem to be mostly related to the ordering of the imports, and not much else.

@esteve esteve force-pushed the use-rustc-1.85 branch 2 times, most recently from 52eee9a to 724497e Compare January 13, 2026 10:55
@esteve esteve changed the title build!: require rustc 1.85 and Rust 2024 edition build!: require rustc 1.85 Jan 13, 2026
@esteve esteve requested review from jhdcs and maspe36 January 13, 2026 11:07
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
@esteve
Copy link
Collaborator Author

esteve commented Jan 13, 2026

@knmcguire windows is not building because somewhere rustc 1.75 is still being used. I submitted ros2/ros2#1785, but as per your comment https://openrobotics.zulipchat.com/#narrow/channel/526027-ROS-General/topic/rustc.20to.201.2E85.3F/near/567766572, the version of compiler seems to be set somewhere else. Do you know where?

@knmcguire
Copy link
Contributor

Ah that was just a comment for if someone would test your PR in CI before merge, CI will still get the default pixi.toml that is on the rolling branch on ros2 and not from your branch on which your PR is based.

See this part in the CI: https://github.com/ros2/ci/blob/19617b2e6cbdd232c5b5d700f0aa6b8dabbb0328/windows_docker_resources/Dockerfile#L53

So... that is for sure a problem, because if the CI builds it won't be based on your change, also for anyone that will update the pixi.toml in the future and something the infra team would need to look at.

@knmcguire
Copy link
Contributor

How about making our lives easier, and just add the following right after this line in github actions

pixi remove rust  --manifest-path C:\pixi_ws\pixi.toml
pixi add "rust==1.85.0"  --manifest-path C:\pixi_ws\pixi.toml

Either I can make a PR or you can add it as a commit here and directly see the ci.

We just have to remember to at one point make sure that the ci is closer to what ROS2 is doing but let's hope our collective memory will be working ;)

Signed-off-by: Esteve Fernandez <esteve@apache.org>
@esteve
Copy link
Collaborator Author

esteve commented Jan 13, 2026

@knmcguire thanks for the idea. I've pushed the fix in 4bbb643

@knmcguire
Copy link
Contributor

so far so good ;) seems to be building

Signed-off-by: Esteve Fernandez <esteve@apache.org>
Copy link
Collaborator

@maspe36 maspe36 left a comment

Choose a reason for hiding this comment

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

LGTM

@esteve esteve merged commit 3312f49 into ros2-rust:main Jan 14, 2026
15 of 25 checks passed
@esteve esteve deleted the use-rustc-1.85 branch January 14, 2026 17:43
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