mirror of
https://github.com/apple/pkl.git
synced 2026-09-03 08:17:14 +02:00
[PR #495] [MERGED] Introduce specialized ModuleKey(Factory) for http uris
#583
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/495
Author: @bioball
Created: 5/15/2024
Status: ✅ Merged
Merged: 5/16/2024
Merged by: @bioball
Base:
main← Head:http-module-key📝 Commits (1)
99f3877Make http URLs their own module key📊 Changes
8 files changed (+65 additions, -26 deletions)
View changed files
📝
pkl-cli/src/main/kotlin/org/pkl/cli/CliRepl.kt(+1 -0)📝
pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliCommand.kt(+1 -0)📝
pkl-core/src/main/java/org/pkl/core/EvaluatorBuilder.java(+1 -0)📝
pkl-core/src/main/java/org/pkl/core/module/ModuleKeyFactories.java(+16 -0)📝
pkl-core/src/main/java/org/pkl/core/module/ModuleKeys.java(+44 -14)📝
pkl-core/src/main/java/org/pkl/core/module/ResolvedModuleKeys.java(+0 -12)📝
pkl-core/src/main/java/org/pkl/core/service/ExecutorSpiImpl.java(+1 -0)📝
pkl-server/src/main/kotlin/org/pkl/server/Server.kt(+1 -0)📄 Description
GenericUrl is a catch-all that uses URL.openConnection(). Since we now have special handling of HTTP urls, it makes more sense to put it in its own module key.
Those that don't use the Http module key specifically but use
GenericUrlwill still be able to fetchhttpurls, but it would use the standardURL.openConnectionimplementation. This works the same asfile:URIs; if only theGenericUrlmodule key factory is used, Pkl can still loadfile:uris.(FYI @translatenix)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.