You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@vados-cosmonic I agree, one of my hesitations in doing config/data driven coverage testing is that I plan to add overlay support cargo style sometime after #215. Note this commit from the multi package publishing PR:
The current wasm_pkg_client::Client::resolve_source approach should wrap any self.sources.read() in an overlay lookup for better control over how and when sources/registries are overridden:
There is only a SourceId to SourceId mapping and the resolution is done in scoped order: global -> workspace -> package.
Right now we do not resolve/normalize overrides in a layered approach so reasoning about the config aht various scopes becomes difficult and results in disjointed logic that does not use prior resolutions:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
#212 (comment)
In Cargo there is one type to handle overrides at all scopes (package, registry, workspace source replacement):
src/cargo/sources/overlay.rs#L14-L20And the pattern for applying overlays happens once per pacakge/registry overrides are already done:
src/cargo/sources/config.rs#L240-L248The current
wasm_pkg_client::Client::resolve_sourceapproach should wrap anyself.sources.read()in an overlay lookup for better control over how and when sources/registries are overridden:wasm-pkg-tools/crates/wasm-pkg-client/src/lib.rs
Line 298 in d40f518
Note the overlays field in
cargo::sources::config::SourceConfigMap:https://github.com/rust-lang/cargo/blob/a595d0da21f228b7fdae64d3d5c0e527ea66bb59/src/cargo/sources/config.rs#L23-L31
There is only a
SourceIdtoSourceIdmapping and the resolution is done in scoped order: global -> workspace -> package.Right now we do not resolve/normalize overrides in a layered approach so reasoning about the config aht various scopes becomes difficult and results in disjointed logic that does not use prior resolutions:
wasm-pkg-tools/crates/wasm-pkg-client/src/lib.rs
Lines 231 to 246 in d40f518
In essence we should implement: an overlay flow to handle overrides with these rules:
All reactions