Skip to content

Conversation

@kkysen
Copy link
Contributor

@kkysen kkysen commented Nov 10, 2025

In contrast to #1414, which this supersedes, this doesn't add c2rust-refactor as a dependency of c2rust, which messes up librustc_driver*.so dynamic dependencies and makes cargo install c2rust not work by default (stable) anymore.

@kkysen kkysen force-pushed the kkysen/reorganize-definitions-enable branch from be2a985 to 3d9f762 Compare November 10, 2025 17:13
@kkysen kkysen force-pushed the kkysen/reorganize-definitions-prereqs branch from fc57cd9 to 8e391d8 Compare November 10, 2025 17:45
@kkysen kkysen force-pushed the kkysen/reorganize-definitions-enable branch from 3d9f762 to b1993e9 Compare November 10, 2025 17:45
@kkysen kkysen requested a review from fw-immunant November 10, 2025 18:34
Copy link
Contributor

@fw-immunant fw-immunant left a 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.

@kkysen kkysen force-pushed the kkysen/reorganize-definitions-prereqs branch from 8e391d8 to ed6ed73 Compare November 11, 2025 00:05
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.
@kkysen kkysen force-pushed the kkysen/reorganize-definitions-prereqs branch from ed6ed73 to d4b5e97 Compare November 16, 2025 02:25
kkysen added a commit that referenced this pull request Nov 20, 2025
Most of the changes from #1414 with #1451 split out. In combination with
#1451, supersedes #1414.
Base automatically changed from kkysen/reorganize-definitions-prereqs to master November 20, 2025 21:29
fw-immunant and others added 3 commits November 20, 2025 13: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.
@kkysen
Copy link
Contributor Author

kkysen commented Nov 24, 2025

@kkysen kkysen closed this Nov 24, 2025
@kkysen kkysen deleted the kkysen/reorganize-definitions-enable branch November 24, 2025 09:05
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.

3 participants