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 is how my
Cargo.toml
looks like:You can see that
tracing-oslog
is not fetched from crates-io, but it is fetch from github. I would sill like to vendor it so that I can build my project without connection to internet.However right now it is not vendored because of the
.filter(|source| source.is_crates_io())
line.I am making an assumption that the idea of this if is not to vendor local dependencies. However if it is a local dependency, then
source
for it is alreadyNone
and there is no need to have a filter on top of it.My assumption could be very well wrong. I can imagine the situation where some crates are pulled from local corporate git system and some are pulled from the internet. For such case, skipping
.filter(|source| source.is_crates_io())
makes more sense, but it still looks far from perfect to me as it would fail as soon as you would like to make a fork of some github package on github.If the intention was to support the second case, would not it be better idea to have allowlist and blocklist support for the source strings in form of regular expressions? Or faster alternative could to make filtering configurable by passing something like
--skip-non-crates-io