would like to configure the location of the client.js resource or provide bytes directly
- Dominant language
- Dart
- Stars
- 224
- Forks
- 94
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 2
Description
Currently the client.js file is loaded using Isolate.resolvePackageUri. This mostly works for flutter, since we correctly provide a --packages file during snapshot creation. nevertheless, there are several edge cases where it will not correctly resolve the file:
* User downloads precompiled snapshot from website, but doesn't use bundled cache
* User creates a snapshot, but deletes/moves pub cache after wards.
* Probably something else I'm forgetting
These aren't incredibly common, but from the tool side of things there's not a lot we can do once a a snapshot is created. Instead it would be ideal if the tool could look up the client.js script itself and provide the bytes to dwds.start.
https://github.com/flutter/flutter/issues/58110
Contributor guide
Research direction
Start by tracing how client.js is loaded through Isolate.resolvePackageUri and passed to dwds.start. Define the supported configuration or byte-input path so snapshots still work when the bundled cache is absent or the pub cache has moved; done means the tool can supply client.js independently of that cache.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, javascript
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100