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
This makes it hard to remove sources, and clear sources, even if we allow for updating sources: djg/chunky-vec#2
We need to decide what to do here. @djg 's suggestion is to use RefCell<ChunkyVec<Option<FileSource>>> and if the source is to be removed, just replacing the value with None.
This may complicate the code in several ways as we'll have to iterate over increasing matrix of permutations of resource/source as sources are added/removed. The loopback on them will be fast (source missing -> invalid candidate), but the logic around it is becoming non-trivial.
It also becomes more problematic when we want to consider #8 because then a missing file may indicate a missing source, or a present source with a missing file, and should impact candidate viability differently.
I'd like to see if there's any other way to approach it, even performance-suboptimal.
@djg@Manishearth - do you think that Option<FileSource> is the only possibility here?
The text was updated successfully, but these errors were encountered:
At the moment
FileSource
list is stored inRefCell<ChunkyVec<>>
in https://github.com/zbraniecki/l10nregistry-rs/blob/master/src/registry/mod.rs#L25This makes it hard to remove sources, and clear sources, even if we allow for updating sources: djg/chunky-vec#2
We need to decide what to do here. @djg 's suggestion is to use
RefCell<ChunkyVec<Option<FileSource>>>
and if the source is to be removed, just replacing the value withNone
.This may complicate the code in several ways as we'll have to iterate over increasing matrix of permutations of resource/source as sources are added/removed. The loopback on them will be fast (source missing -> invalid candidate), but the logic around it is becoming non-trivial.
It also becomes more problematic when we want to consider #8 because then a missing file may indicate a missing source, or a present source with a missing file, and should impact candidate viability differently.
I'd like to see if there's any other way to approach it, even performance-suboptimal.
@djg @Manishearth - do you think that
Option<FileSource>
is the only possibility here?The text was updated successfully, but these errors were encountered: