Repository navigation
Conversation
The error reporter read `ErrorReporter` off the `effect` main entry with `Reflect.get`, which made bundlers keep every export of Effect (about 250 KB gzipped). It now uses the string keys of Effect's ErrorReporter API and a `Context.Reference` with the key of `CurrentErrorReporters`, so the same build still works with Effect v3 and v4 and tree-shakes. `contextExports` moves into `compat.ts` together with `isEffectV4`, because Rolldown folds a single-use local alias back into `Context.Reference`, which webpack rejects on Effect v3 before 3.11. One reporter instance now serves every Sentry layer, so a failure that is not an object is captured once when the layer is provided twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
size-limit report 📦Compared: e07f417 (PR test merge using jp/effect-size-limit at 1b07799) Against: ef89ae2 (jp/effect-size-limit) · base run #67360
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This stops
effectLayerfrom pulling all of Effect into the bundle. The error reporter now uses the string keys of Effect'sErrorReporterAPI and aContext.Referencewith the key ofCurrentErrorReporters, instead of readingErrorReporterfrom theeffectmain entry. One build still works with Effect v3 and v4.Why
The
Reflect.getlookup on theeffectnamespace made bundlers keep every export of Effect, about 250 KB gzipped.Known issues
effect/ErrorReporter/CurrentErrorReporters, which Effect does not export as a type. The unit tests fail when an Effect update changes it.