Skip to content

Do not fold URI parsing calls at compile time - #16087

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
lukaszsamson:codex/uri-runtime-default-port
Nov 9, 2026
Merged

josevalim merged 1 commit into
elixir-lang:mainfrom
lukaszsamson:codex/uri-runtime-default-port

Conversation

@lukaszsamson

@lukaszsamson lukaszsamson commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

URI.parse/1, URI.new/1, and URI.new!/1 consult the globally mutable default-port table when an input has no explicit port. Folding literal calls at compile time freezes the port before an application's start callback can register or override it. This PR removes the three functions from inline_pure_function/2 so literal calls observe the runtime configuration, just like calls with dynamic inputs.

Assisted-by: Codex:GPT-6

URI.parse/1, URI.new/1, and URI.new!/1 consult the mutable default-port table, including for built-in schemes. Keep literal calls at runtime so they observe ports registered after compilation.

Assisted-by: Codex:GPT-6
@josevalim
josevalim merged commit 469b7c7 into elixir-lang:main Nov 9, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants