Skip to content

refactor(autopack): extract inputs from config#108

Merged
kylewlacy merged 1 commit intomainfrom
extract-inputs-from-autopack-config
Mar 24, 2026
Merged

refactor(autopack): extract inputs from config#108
kylewlacy merged 1 commit intomainfrom
extract-inputs-from-autopack-config

Conversation

@jaudiger
Copy link
Copy Markdown
Contributor

@jaudiger jaudiger commented Jan 27, 2026

This PR refactors AutopackConfig to extract inputs field from the config. It has two advantages:

  • Reduce a bit the memory while doing the autopack since inputs lifecycle is no more constrained to the lifecycle of AutopackConfig (which has a longer lifetime here).
  • Prevent cloning the paths in AutopackInputs::Paths since we can now borrow the inputs.

Other side effect but from an API design view: having the inputs outside of AutopackConfig makes more sense since they are both independent, one of side we have the inputs of the function and on the other side we have the parameters.

@jaudiger jaudiger requested a review from kylewlacy January 27, 2026 07:38
@jaudiger jaudiger self-assigned this Jan 27, 2026
Signed-off-by: Jérémy Audiger <jeremy.audiger@icloud.com>
@jaudiger jaudiger force-pushed the extract-inputs-from-autopack-config branch from 5899146 to 8184cc7 Compare January 27, 2026 07:41
Copy link
Copy Markdown
Member

@kylewlacy kylewlacy left a comment

Choose a reason for hiding this comment

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

Makes sense to me 💯

@kylewlacy kylewlacy merged commit fb1c41c into main Mar 24, 2026
10 checks passed
@kylewlacy kylewlacy deleted the extract-inputs-from-autopack-config branch March 24, 2026 04:23
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.

2 participants