-
Notifications
You must be signed in to change notification settings - Fork 261
Split c2rust-transpile
(and deps) and c2rust-analyze
(and deps) into two separate workspaces
#1220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@folkertdev, @chrysn, @nyurik, @Lysarina, @bungcip, @GPHemsley, @domenukk, @langston-barrett, if we do this, this should hopefully reduce some of the issues you've had using and contributing to @bungcip, could your fork bungcip/rustification@df0cdaf be upstreamed if we did this? Upgrading to |
hi @kkysen, happy to upstreamed my changes if we can use stable compiler version |
This is a prelude to immunant#1220 . In the future, these crates can be split into their own workspace, in order to build them with nightly. In the meantime, exclude them, move the rust-toolchain.toml files into them, remove it from the top level, and start building the rest of the c2rust workspace with stable Rust instead. This will unblock further changes, such as migrating c2rust to current dependencies.
This is a prelude to immunant#1220 . In the future, these crates can be split into their own workspace, in order to build them with nightly. In the meantime, exclude them, move the rust-toolchain.toml files into them, remove it from the top level, and start building the rest of the c2rust workspace with stable Rust instead. This will unblock further changes, such as migrating c2rust to current dependencies. Likewise, make CI scripts provision stable.
Right now,
c2rust-transpile
and its dependencies can all build onstable
, whilec2rust-analyze
and its dependencies all require a pinnednightly-2022-08-08
. However, only onerust-toolchain.toml
is allowed per directory (and thus workspace), so even the stable crates likec2rust-transpile
are forced to be compiled with the old nightly. This presents numerous problems that interfere with development and maintenance.The majority of external contributions we get are for the transpiler, and they often get mired in this issue. This includes both PRs we've received, as well as others I've discussed
c2rust
with in-person who wanted to usec2rust transpile
and contribute, but the old nightly and the issues caused by it dissuaded them.The same goes for ongoing maintenance. We only release
c2rust-transpile
and its dependencies (and the simplec2rust
binary), and the old nightly significantly interferes with releasing newc2rust
versions and maintaining things as is. For example, we can no longercargo publish
, as the pinned nightly'scargo
has a bug (rust-lang/cargo#11148), which has been fixed (rust-lang/cargo#11477), but in1.68.0
, so we can't use it. Thus, we have tocargo +stable publish -p ${stable-c2rust-crate}
(#1116 (comment)). We also can'tcargo update
(#1116), as that updates to newer versions that don't support our old nightly (which also presents frustrating problems in incrementally updating our nightly). Newercargo
versions can use MSRV-aware resolution, but we're stuck on an oldcargo
. Thus,cargo install c2rust
is more fragile and needs--locked
. We also need to pin certain dependencies likeonce_cell
(#1219) due to their interaction with therustc
version andstd
.Upgrading from our increasingly ancient nightly also grows harder every day. Keeping up with the latest nightly is difficult enough on its own when we are close behind, as each nightly can break internal APIs we use, but the farther we get behind, we also face issues in dependencies (
once_cell
,syn
, and Rust tooling likecargo publish
). #811 is old work trying to update to a newer nightly, but it was never merged, and now there are more issues with it (merge conflicts, but also issues with dependencies not allowing incremental updates to the nightly version, and forcing larger all-at-once updates to the next Rust version).Thus, it seems like the simplest and most permanent solution is to split the current single workspace into two: one for stable crates like
c2rust-transpile
and one for unstable crates likec2rust-analyze
. Thenc2rust-transpile
can evolve on its own unencumbered.Splitting the workspaces shouldn't be too complex I don't think.
c2rust-transpile
andc2rust-analyze
have different dependency trees, and onlyc2rust-build-paths
is shared between them, but actually not all of that is even needed anymore ifc2rust-transpile
usesstable
, as rust-lang/rust#103660 means we don't have to manually set the--sysroot
anymore (#1205). Thec2rust
binary is slightly trickier, as it's meant to also invoke tools likec2rust-analyze
, but we removed the direct dependencies on the tools already, besides the stablec2rust-transpile
.The text was updated successfully, but these errors were encountered: