Skip to content

Conversation

@dcbaker
Copy link
Member

@dcbaker dcbaker commented Oct 30, 2025

This gets us to the point that the build layer can assume it's getting valid inputs.

@dcbaker dcbaker requested a review from jpakkane as a code owner October 30, 2025 18:23
@dcbaker dcbaker force-pushed the submit/move-extra-files-validation-to-interpreter branch from a9c70d1 to 868c0cf Compare October 30, 2025 19:29
@dcbaker
Copy link
Member Author

dcbaker commented Nov 3, 2025

@bonzini are you happy with this version?

@bonzini
Copy link
Collaborator

bonzini commented Nov 3, 2025

Yes, sure.

continue
# TODO: this prevents built `File` objects from being used as
# extra_files.
trial = os.path.join(self.environment.get_source_dir(), i.subdir, i.fname)
Copy link
Member

Choose a reason for hiding this comment

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

Is this changing? Are we adding support for new things here?

Copy link
Member Author

@dcbaker dcbaker Nov 3, 2025

Choose a reason for hiding this comment

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

This is checking that we don't use generated files, which we could also check with File.is_built.

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the commit message to have that.

I originally had several patches in this series that made the transformation one change at a time, but I feel like I always get asked to squash that, so I didn't send it as a split series.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks. I was mostly confused since I wasn't sure how to read the TODO. It seemed to be implying that we want to change the status eventually and start allowing generated files.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wrote the TODO, and originally I thought this was buggy behavior, but then realized this field is for files being grouped in an IDE, which I would think generally people don't want to edit generated files so this actually makes sense.

This gets us to the point that the build layer can assume it's getting
valid inputs. We switch from using a check that files exist (expensive)
to checking `File.is_built`, which achieves the same thing, but without
doing filesystem I/O.
@dcbaker dcbaker force-pushed the submit/move-extra-files-validation-to-interpreter branch from 868c0cf to 576bbf2 Compare November 3, 2025 17:32
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