Repository navigation
fix: identify circular imports from src/env - #17014
elliott-with-the-longest-name-on-github merged 3 commits into
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/2c90fd575e104fd3c4be91756495774e8585d906Open in Note This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed. |
🦋 Changeset detectedLatest commit: 2c90fd5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commented
Sep 3, 2026
|
@svelte-triage-bot Throw the error using |
commented
Sep 3, 2026
|
Implemented and pushed the
I also recorded this feedback in svelte-agent#5. |
Fixes #17013.
When
src/envimports a dependency that imports$app/env/privateor$app/env/public, loading the environment configuration depends on modules that have not yet been generated.Recognize this resolution failure and report the circular dependency directly instead of exposing the internal generated-module path. When available, the diagnostic now identifies the project-relative module that imported
$app/env/privateor$app/env/public.A regression test covers the transitive helper-import pattern and verifies that the responsible helper module is reported.
Testing
pnpm vitest run -c vitest.kit.config.js src/core/sync/sync.spec.js --reporter=verbosepnpm -F @sveltejs/kit test:unitpnpm formatpnpm -F @sveltejs/kit lintpnpm -F @sveltejs/kit prepublishOnly