Skip to content

修复 MultipleSourceVersionList 不会使用备用下载源的问题#5585

Merged
Glavo merged 2 commits intoHMCL-dev:mainfrom
Glavo:download-source
Feb 20, 2026
Merged

修复 MultipleSourceVersionList 不会使用备用下载源的问题#5585
Glavo merged 2 commits intoHMCL-dev:mainfrom
Glavo:download-source

Conversation

@Glavo
Copy link
Member

@Glavo Glavo commented Feb 20, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes an issue where MultipleSourceVersionList was not properly falling back to alternative download sources when the primary source failed. The original implementation used thenComposeAsync, which only executes when the dependent task succeeds, preventing the fallback mechanism from working. The new implementation creates a custom Task wrapper that uses isRelyingOnDependents() = false to ensure execute() is called even when dependents fail, allowing it to detect failures and create fallback tasks dynamically.

Changes:

  • Replaced thenComposeAsync pattern with custom Task wrapper that handles dependent failures
  • Implemented dynamic dependency creation for fallback sources
  • Preserved exception handling and logging for all sources exhausted

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Glavo Glavo merged commit 2e5e21a into HMCL-dev:main Feb 20, 2026
2 checks passed
@Glavo Glavo deleted the download-source branch February 20, 2026 14:19
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.

1 participant

Comments