Skip to content

Add optional chunk reader interface to generate_manifest_rusty#2

Open
quexeky wants to merge 13 commits into
Drop-OSS:mainfrom
quexeky:manifest-cleanup
Open

Add optional chunk reader interface to generate_manifest_rusty#2
quexeky wants to merge 13 commits into
Drop-OSS:mainfrom
quexeky:manifest-cleanup

Conversation

@quexeky
Copy link
Copy Markdown
Contributor

@quexeky quexeky commented Feb 25, 2026

Adds additional writers for downpour

Still doesn't run log_sfn or progress_sfn, but most functionality is implemented
Signed-off-by: quexeky <git@quexeky.dev>
Signed-off-by: quexeky <git@quexeky.dev>
Signed-off-by: quexeky <git@quexeky.dev>
Copy link
Copy Markdown
Member

@DecDuck DecDuck left a comment

Choose a reason for hiding this comment

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

Is the generate_manifest function just completely copy and pasted?

@quexeky
Copy link
Copy Markdown
Contributor Author

quexeky commented Feb 26, 2026

The existing generate_manifest function should be identical, yeah. I decided that it's probably better to just not touch it for compatibility reasons

@DecDuck
Copy link
Copy Markdown
Member

DecDuck commented Feb 26, 2026

It's fine, you can replace it. Compatibility can just be based on version.

@quexeky
Copy link
Copy Markdown
Contributor Author

quexeky commented Feb 26, 2026

Aight cheers - I'll do that in a moment then

…go clippy

Signed-off-by: quexeky <git@quexeky.dev>
Signed-off-by: quexeky <git@quexeky.dev>
@quexeky
Copy link
Copy Markdown
Contributor Author

quexeky commented Feb 26, 2026

I think that that should be everything now

@quexeky quexeky changed the title Add generate_manifest_rusty_v2 Update generate_manifest_rusty Feb 26, 2026
Comment thread src/manifest.rs Outdated
Comment thread src/manifest.rs Outdated
Comment thread src/tests.rs
… of buffered futures

Signed-off-by: quexeky <git@quexeky.dev>
Signed-off-by: quexeky <git@quexeky.dev>
Signed-off-by: quexeky <git@quexeky.dev>
@quexeky quexeky requested a review from DecDuck March 2, 2026 04:42
Comment thread src/manifest.rs Outdated
Comment on lines +44 to +59
pub async fn generate_manifest_rusty<P, LogFn, ProgFn, FactoryFn, Writer, CloseFn>(
dir: P,
progress_sfn: ProgFn,
log_sfn: LogFn,
factory: FactoryFn,
closer: CloseFn,
semaphore: Option<&Semaphore>,
) -> anyhow::Result<Manifest>
where
P: AsRef<Path>,
LogFn: Fn(String) + Clone,
ProgFn: Fn(f32),
Writer: AsyncWrite + Unpin,
FactoryFn: AsyncFn(String) -> Writer + Clone,
CloseFn: AsyncFn(Writer) + Clone,
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This signature is too complicated, you need to simplify it.

It should be easy and quickly parseable without additional complexity.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Which bits would you have me simplify? Because to be entirely honest, I'm not sure how much simpler this can be made

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A lot of the generics can be inline to function arguments.

What's the factory pattern for?

And I'm pretty sure you can call close on a writer, maybe handle the close there?

Comment thread src/manifest.rs
Comment thread src/manifest.rs Outdated
Comment thread src/manifest.rs
Signed-off-by: quexeky <git@quexeky.dev>
@DecDuck DecDuck changed the title Update generate_manifest_rusty Add optional chunk reader interface to generate_manifest_rusty Mar 2, 2026
Signed-off-by: quexeky <git@quexeky.dev>
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