Repository navigation
fix(deck.gl-geotiff): call onSourceUnload for MosaicLayer's cached sources when it's removed - #823
Merged
Merged
Conversation
…urces when it's removed deck.gl's `Tileset2D.finalize` clears its cache without `onTileUnload`, so removing a MosaicLayer never called `onSourceUnload` for the sources it still held. MosaicTileset2D now unloads every cached item on finalize, as RasterTileset2D does (#728). An item still opening is unloaded once its open finishes, since deck.gl keeps what an aborted open returns anyway. Part of #816. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kylebarron
commented
Oct 30, 2026
Comment on lines
+88
to
+89
| * Unloads every cached item, which deck.gl's `finalize` skips (see #728). An | ||
| * item still opening is unloaded once its open finishes. |
Member
Author
There was a problem hiding this comment.
We should point to visgl/deck.gl#10883 upstream
Member
Author
There was a problem hiding this comment.
Note
This reply was written by Claude (Claude Code), not by @kylebarron.
Done in 53581a1. This docstring now points to visgl/deck.gl#10883. I added the same pointer to RasterTileset2D.finalize, which works around the same deck.gl gap, so both overrides say they can go once #10883 lands.
🤖 Written by Claude Code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kylebarron
added a commit
that referenced
this pull request
Oct 30, 2026
> [!NOTE] > This PR was written by Claude (Claude Code), not by @kylebarron. Bumps `version` to `0.10.0-beta.2` in the root `package.json` and in every `packages/*/package.json`. The publish workflow publishes it under the `beta` dist-tag, so `latest` stays on 0.9.0. `CHANGELOG.md` gets a `v0.10.0-beta.2` section with the one PR merged since v0.10.0-beta.1, #823. ## Before pushing the tag `@developmentseed/range-reader` needs a trusted publisher on npm, with the same settings as the other packages: workflow `release.yml`, environment `release`. The v0.10.0-beta.1 publish run failed at `range-reader` without one, after it had published `affine`, `epsg` and `proj`. 🤖 Written by [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Note
This PR was written by Claude (Claude Code), not by @kylebarron.
When a MosaicLayer is removed,
onSourceUnloadnow fires for every source the layer still holds.deck.gl's
Tileset2D.finalizeclears its cache without callingonTileUnload, so MosaicLayer never reported those sources.MosaicTileset2Dnow unloads every cached item on finalize, asRasterTileset2Ddoes for tiles (#728). An item still opening is unloaded once its open finishes, since deck.gl keeps what an aborted open returns anyway.This is the first step toward #816. Re-opening sources through
updateTriggerswill replace MosaicLayer's inner TileLayer, which drops its cache the same way.The override repeats
RasterTileset2D.finalize. visgl/deck.gl#10883 would make deck.gl do this itself, and then both could go.Ref #816
Tests
These run in deck.gl's
LayerManager, and both failed before the fix:onSourceUnload;🤖 Written by Claude Code