-
Notifications
You must be signed in to change notification settings - Fork 281
transpile: re-enable --reorganize-definitions
#1451
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
be2a985 to
3d9f762
Compare
fc57cd9 to
8e391d8
Compare
3d9f762 to
b1993e9
Compare
fw-immunant
approved these changes
Nov 10, 2025
Contributor
fw-immunant
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; thanks for figuring out the library issues. I didn't realize that they were part and parcel with making the nightly-dependent refactorer a dependency of the transpile tool.
The tweaks to CLI flag definition look good.
8e391d8 to
ed6ed73
Compare
kkysen
added a commit
that referenced
this pull request
Nov 11, 2025
This is split off from #1451, but doesn't enable `--reorganize-definitions` by default, so it shouldn't need the fixes in #1452 yet, of which the disabling caching of zero values needs to be fixed. Also, I'm not sure if we should enable `--reorganize-definitions` by default, since `c2rust-refactor` won't be installed by default.
ed6ed73 to
d4b5e97
Compare
Base automatically changed from
kkysen/reorganize-definitions-prereqs
to
master
November 20, 2025 21:29
computing these is impure because it can call `import_type`. ideally we would not disable this caching but instead cache both the initializer and its set of required imports.
Unfortunately, we have to bend over backwards to make this work without changing CLI behavior. This adds a new `--no-reorganize-definitions` flag to disable reorganizing definitions, because it would not be backwards-compatible to add an optional argument for the flag (it would eat a following argument that would previously be unassociated with the flag).
…=> unused}_reorganize_definitions` The latter is because the two fields are equal, so naming the second one `no` is misleading.
b1993e9 to
c191695
Compare
Contributor
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In contrast to #1414, which this supersedes, this doesn't add
c2rust-refactoras a dependency ofc2rust, which messes uplibrustc_driver*.sodynamic dependencies and makescargo install c2rustnot work by default (stable) anymore.