Skip to content
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

Introduce a FromfileExpander struct #20811

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Conversation

benjyw
Copy link
Contributor

@benjyw benjyw commented Apr 18, 2024

As with #20807, this is another preliminary change to support
fromfile paths being relative to the buildroot.

This change introduces a FromfileExpander struct, and moves
the expansion logic from free functions to struct methods.
The free functions are then reimplemented as calls into
these methods, to avoid perturbing calling code.

A followup change will plumb instances of this struct
wherever needed, and remove the free functions.

Another followup change will introduce the buildroot
context to this struct, to finally achieve the underlying
functionality change.

This change is just a refactoring, to make the subsequent
changes easier to grok.

@benjyw benjyw added the category:internal CI, fixes for not-yet-released features, etc. label Apr 18, 2024
@benjyw benjyw requested review from huonw and tgolsson April 18, 2024 18:08
@benjyw
Copy link
Contributor Author

benjyw commented Apr 18, 2024

I have the full change working in a branch, but I've split it up into these standalone changes to make things easier to read both before and after merging.

Copy link
Contributor

@huonw huonw left a comment

Choose a reason for hiding this comment

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

Thanks for the breakdown like this!

@benjyw
Copy link
Contributor Author

benjyw commented Apr 18, 2024

Thanks for the breakdown like this!

I looked at the diff of the entire change and it was incomprehensible!

@benjyw benjyw merged commit 0afdd65 into pantsbuild:main Apr 18, 2024
24 checks passed
@benjyw benjyw deleted the fromfile_expander branch April 18, 2024 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:internal CI, fixes for not-yet-released features, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants