You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
runtime: dynamic import(path, { with: { type: "toml" } }) of a runtime file path must parse TOML like Bun (OpenCode legacy config migration) #10104
Bun parses the TOML file and returns { default: <object> }. Under perry the specifier is a runtime value, so #5230 defers it to ERR_MODULE_NOT_FOUND; the .catch(() => {}) swallows it and a user's legacy config (provider/model/etc.) is silently never migrated — a behavioural divergence, not a crash.
Error shape on parse failure: reject with a SyntaxError like Bun.
Repro
Create ~/.config/opencode/config with provider = "anthropic"\nmodel = "claude-sonnet-4-5"\n, run opencode --version (any command that loads config) under bun and under the native binary; expect config.json written and the legacy file removed in both.
Acceptance
Fixture: await import(pathToFileURL(tmp).href, { with: { type: "toml" } }) returns the parsed table in a compiled program; JSON/text/file variants covered.
The OpenCode legacy-config migration produces the same config.json as bun.
Activity
proggeramlug commentedon Sep 12, 2026
Fixed by #10128, landed on
mainvia merge train #10139 atc0be019231.The close keyword does not fire through a train branch, so closing manually.