Skip to content

Rework Files to support generated files#3451

Merged
oprypin merged 8 commits intomasterfrom
genfile
Jan 26, 2024
Merged

Rework Files to support generated files#3451
oprypin merged 8 commits intomasterfrom
genfile

Conversation

@oprypin
Copy link
Copy Markdown

@oprypin oprypin commented Oct 30, 2023

Oleh Prypin and others added 8 commits December 15, 2023 23:42
The previous attempt always computed these on the fly #3017
but now they will be cached after first access, so the performance penalty is avoided.

The fields can still be overwritten manually.
And one can ask the fields to be recomputed by using the `del` operation.
Co-authored-by: Tim Vink <vinktim@gmail.com>
Add a new field `content_bytes`/`content_string` to read the content regardless of whether it's backed by the new style or still by `abs_src_path` (which is now not always present)
-it populates `generated_by` automatically as well, based on the currently running plugin event.
This means plugins don't have to carefully find the sort order to put files in.
@oprypin

This comment was marked as abuse.

@oprypin

This comment was marked as abuse.

@squidfunk
Copy link
Copy Markdown
Contributor

Awesome, that looks like a huge quality of life improvement for plugin authors 👏

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