Conversation
41ad002 to
a5639b9
Compare
test/test_compression.cpp
Outdated
| Context ctx; | ||
| // TODO file URL handling is doing some weird things | ||
| auto target | ||
| = DownloadTarget::from_url(ctx, "file:///" + filename.string(), "out_zst.txt", "."); |
There was a problem hiding this comment.
Somewhere we need to stop stripping a / ...
| class mirror_map_type : private mirror_map_base | ||
| { | ||
| public: | ||
| using mirror_map_base::begin; |
There was a problem hiding this comment.
I initially voluntarilly didnt expose begin/end because that breaks the garantee that the values of the vector are unique (because then we can access and modify the vectors).
Suggestions: either
- use
as_map()which makes a copy, not modifying this container; - or expose the const versions of
begin/endonly.
| spdlog::warn("SETTING MIRRORR >>>> {}, {}", host, mirror_url); | ||
|
|
||
| ctx.mirror_map.create_unique_mirror<Mirror>(host, ctx, mirror_url); | ||
| ctx.mirror_map.create_unique_mirror<Mirror>(mirror_url, ctx, mirror_url); |
There was a problem hiding this comment.
Just to be sure: the original code in the cli's main.cpp was using the variable host as key, which is why it was like that before. It doesnt change much of the meaning here but I'm not sure if it's ok.
| if (mirrors.empty()) | ||
| { | ||
| dl_target->clear_base_url(); | ||
| // TODO proper error handling here! :) |
There was a problem hiding this comment.
Not throwing runtime error but something more proper.
enforces that targets must have at least one valid mirror associated …
|
I've merged most of the changes from this PR in smaller PRs over the weekend. There was a tricky segfault on Windows, but I think it was due to us not forcing |
@Klaim it's dirty and doesn't work but I tried to clean up our mirror issues a bit.