Skip to content

fix: use original URL for plugin type detection after redirect#1121

Merged
dsherret merged 2 commits into
dprint:mainfrom
azais-corentin:fix/wasm-plugin-redirect-detection
Apr 1, 2026
Merged

fix: use original URL for plugin type detection after redirect#1121
dsherret merged 2 commits into
dprint:mainfrom
azais-corentin:fix/wasm-plugin-redirect-detection

Conversation

@azais-corentin

Copy link
Copy Markdown
Contributor

PR #1114 changed plugin_kind() to check the resolved (post-redirect) URL instead of the original source URL. GitHub Releases redirects .wasm URLs to a CDN URL (release-assets.githubusercontent.com/...) that does not end in .wasm, causing plugin_kind() to return None and reject the plugin.

Fix: pass both the original source (for type detection) and the resolved source (for relative URL resolution in process plugins) to setup_plugin.

Fixes #1120

azais-corentin and others added 2 commits April 1, 2026 15:38
PR dprint#1114 changed plugin_kind() to check the resolved (post-redirect) URL
instead of the original source URL. GitHub Releases redirects .wasm URLs
to a CDN URL (release-assets.githubusercontent.com/...) that does not
end in .wasm, causing plugin_kind() to return None and reject the plugin.

Fix: pass both the original source (for type detection) and the resolved
source (for relative URL resolution in process plugins) to setup_plugin.

Fixes dprint#1120

@dsherret dsherret left a comment

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.

Thanks!

@dsherret dsherret merged commit a684871 into dprint:main Apr 1, 2026
12 checks passed
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.

WASM plugins from GitHub Releases fail to load in v0.53.1 (redirect breaks plugin type detection)

2 participants