Repository navigation
Conversation
Nearly every file imports Effect modules as namespaces from their subpaths, but nothing enforced it: six files and one docs example still imported from the bare `effect` package. Restrict the bare `effect` import next to the other restricted imports, and move those files and the example to subpath namespace imports.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a contained import-style migration plus lint enforcement; the source changes preserve existing Effect and Schema usage, while the configuration change only affects developer tooling. No product defaults, runtime workflows, schemas, or sensitive areas are modified. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughImports from the ChangesEffect import paths
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk: ⚪ Minimal · up to The import convention is enforced for the affected source files, with no identified issue preventing merge after normal checks. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 4 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai why isn't the effect lsp catching this?? https://github.com/pingdotgg/t3code/blob/main/tsconfig.base.json#L26 |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
fd '^tsconfig\.base\.json$'
cat -n tsconfig.base.json
rg -n -C3 '"@effect/language-service"|namespaceImport|effect/language-service|patch.*tsc|effect-language' --glob '!patches/**' --glob '!bun.lock' --glob '!pnpm-lock.yaml' .
fd '^(package\.json|tsconfig.*\.json|.*lock.*)$' -d 3
ast-grep outline vite.config.ts --match 'RESTRICTED_IMPORT_PATHS' --view expandedLength of output: 26803 🏁 Script executed: #!/bin/bash
cat -n package.json
cat -n packages/contracts/package.json
cat -n packages/contracts/tsconfig.json
cat -n apps/server/package.json
cat -n apps/server/tsconfig.json
rg -n -C2 'language-service|tsgo|typescript|effect.*patch' pnpm-lock.yaml
fd -H '^(settings\.json|extensions\.json)$' --exclude .git
rg -n -C2 'effect/language-service|effect-language-service|tsdk|typescript-go|tsgo|prepare|postinstall' --glob '*.json' --glob '*.yaml' --glob '*.yml' --glob '!**/fixtures/**' --hidden --glob '!.git/**' .Length of output: 153901 🤖 web_search executed:
Length of output: 1620 🏁 Script executed: #!/bin/bash
cat -n .vscode/settings.json
cat -n .vscode/extensions.json
gh api repos/Effect-TS/tsgo/git/trees/v0.41.0?recursive=1 --jq '.tree[] | select(.path | test("import.*barrel|import.*namespace|README|diagnostic|config"; "i")) | .path' | head -100
curl -fsSL https://raw.githubusercontent.com/Effect-TS/tsgo/v0.41.0/README.md | sed -n '1,240p'Length of output: 1382 🤖 web_search executed:
Length of output: 393 🏁 Script executed: #!/bin/bash
curl -fsSL https://registry.npmjs.org/@effect%2ftsgo/0.41.0 | jq '{version,gitHead,repository,dist}'
gh api repos/Effect-TS/tsgo --jq '{default_branch,html_url}'
gh api 'repos/Effect-TS/tsgo/git/trees/main?recursive=1' --jq '.tree[] | select(.path | test("barrel|namespace|README|diagnostic|config"; "i")) | .path' | head -100
curl -fsSL https://raw.githubusercontent.com/Effect-TS/tsgo/main/README.md | head -220Length of output: 41904 🏁 Script executed: #!/bin/bash
gh api 'repos/Effect-TS/tsgo/tags?per_page=100' --jq '.[] | select(.name | contains("0.41.0")) | {name,commit}'
gh api 'repos/Effect-TS/tsgo/git/trees/main?recursive=1' --jq '.tree[] | select(.path | test("effectoptions|options.go|rules.go|rule.*registry|import"; "i")) | .path' | head -90
curl -fsSL https://raw.githubusercontent.com/Effect-TS/tsgo/main/internal/effectconfigcheck/validation.go | grep -n -C4 -E 'importFromBarrel|namespaceImport|unknown|Unknown'
curl -fsSL https://raw.githubusercontent.com/Effect-TS/tsgo/main/README.md | grep -n -C3 -E 'importFromBarrel|namespaceImportPackages|barrelImportPackages|not.*port|unsupported'Length of output: 9616 🏁 Script executed: #!/bin/bash
set -euo pipefail
ref=71ced39cc84282848bde2098718f63ca9755831b
curl -fsSL "https://raw.githubusercontent.com/Effect-TS/tsgo/$ref/internal/rules/rules.go" | sed -n '1,210p'
curl -fsSL "https://raw.githubusercontent.com/Effect-TS/tsgo/$ref/README.md" | grep -n -C3 -E 'importFromBarrel|namespaceImportPackages|barrelImportPackages|auto.import|import style'
gh api "repos/Effect-TS/tsgo/git/trees/$ref?recursive=1" --jq '.tree[] | select(.path | test("barrel|autoimportstyle|options.go"; "i")) | .path'
curl -fsSL "https://raw.githubusercontent.com/Effect-TS/tsgo/$ref/internal/autoimportstyle/stylepolicy.go" | head -100Length of output: 7687
The repo uses TypeScript I checked the exact
So You are interacting with an AI system. |
`importFromBarrel` came from the TypeScript-plugin language service. Effect TSGo never ported it, and 0.41 accepts unknown rule names without a warning, so the line has done nothing since the move to TSGo. The restricted `effect` import enforces it now, and newer TSGo releases fail on unknown rule names.
|
To add the "why silently" part: tsgo 0.41 accepts unknown |
…mports # Conflicts: # apps/server/src/preview/Manager.test.ts
Dismissing prior approval to re-evaluate e0a780f
Problem
docs/internals/effect-services.mdsays to import Effect modules as namespaces from their subpaths, and about 9,400 imports do, but nothing enforces it. Five files and one docs example still import from the bareeffectpackage. The Effect language service doesn't flag them:maintypechecks with all five.Change
effectjoinsRESTRICTED_IMPORT_PATHSinvite.config.ts, next to the other restricted imports.tsconfig.base.jsondrops"importFromBarrel": "error". That rule came from the TypeScript-plugin language service, and Effect TSGo never ported it, so the line has done nothing since the move to TSGo (Migrate TypeScript checks to Effect TSGo #2851). Newer TSGo releases fail on unknown rule names.Scope and approval
Lint config plus import-only changes; no behavior changes. It enforces a rule the docs already state. I work at CodeRabbit.
Verification
effectfailsvp lintwith the new message. No source file does; the remaining matches are string fixtures in tests and vendoredpatches/.contractsand server typechecks pass.