-
Notifications
You must be signed in to change notification settings - Fork 440
feat: Inject channels+mirrors coming from mambajs env-lockfiles #4126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Klaim
wants to merge
66
commits into
mamba-org:main
Choose a base branch
from
Klaim:env-lockfile-channels
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
9a5caa9
inject channels+mirrors coming from mambajs env-lockfiles
Klaim 9822718
c++ tests
Klaim 4e7e517
debug info from ci
Klaim 957eb64
workaround incorrect compilers
Klaim 7b4fcc4
debug info ci
Klaim 542d4a9
channels urls/mirrors coming from the env-lockfile have higher priority
Klaim 7e7b443
tweak url priority logic
Klaim 2e6e11a
tweak ci debug info
Klaim eec22d4
fix wrong debug info
Klaim bbd62c0
fix attempt
Klaim 1e7a721
fix attempt
Klaim cc33b17
fixup
Klaim f03eea2
attempt to figure out what's happening
Klaim 127d543
workaround annoying warnings as error
Klaim 19b4f15
attempt mirror added on top + no unicity filter
Klaim 9f5e696
attempt to gather more data
Klaim cdd437d
tweak
Klaim b406463
experiment: valid prefix url
Klaim f3c3a02
tweak debug log
Klaim e3d78e5
tweak to confirm issue
Klaim 61777ce
revert to correct behavior
Klaim 576cc9f
Revert "experiment: valid prefix url"
Klaim 4291726
tests: dont force default channel when testing env-lockfiles
Klaim 0455438
improved error reports
Klaim 4497b37
reactivated correct channel mirrors injection logic
Klaim 6752936
attempt to fix failure with `--json` because packages info dont have …
Klaim 8de30d4
fix attempt variation for --json
Klaim 6464c70
add more context information for ci errors reports
Klaim cfa724d
added missing json log if dryrun
Klaim e8a7880
experiment: comment channel injection from mambajs lockfiles
Klaim 58fbfe5
warning tweak
Klaim 7be95fc
woops
Klaim 04b665c
experiment; reactivate lockfile channels injection code but put the u…
Klaim c321596
restore intended code (fails on ci)
Klaim 9fab071
make sure injected channels are taken into account through context an…
Klaim eefe9c4
removed test code impacting correctness in mambajs lockfile case
Klaim c494b0d
removed test assertion
Klaim 0842dbd
experiment: deactivate the feature added here
Klaim 99d0589
still experiment, remove warning
Klaim a686437
revert experiment, reenable feature
Klaim 04e05fb
experiment please remove
Klaim c0acdb5
Revert "experiment please remove"
Klaim cb7e7a6
experiment more info
Klaim c75bb4c
tweaks might not be necessary
Klaim 9a3d0bf
transaction: replace channel name resolution by looking into channels…
Klaim f7461cc
tests: added logs
Klaim 1974ecb
test log tweak
Klaim 207d85e
partial cleanup
Klaim 8818faa
temporary experiment
Klaim d5163df
fixed typo
Klaim 880adfb
formatting
Klaim 4fd4b88
removed temporary experiment
Klaim 8d763b6
formatting
Klaim 3b2628e
wip
Klaim 017ace8
back to using channel::resolve
Klaim b074b1c
formatting
Klaim e9fd889
determine env-lockfile packages missing urls before earlier
Klaim 66b8e92
Lint
jjerphan a06274f
Move default parameter value from header to translation unit
jjerphan 4c8c692
Merge remote-tracking branch 'origin/main' into env-lockfile-channels
Klaim 36b10df
Merge remote-tracking branch 'origin/main' into env-lockfile-channels
Klaim 3f533da
Merge remote-tracking branch 'origin/main' into env-lockfile-channels
Klaim 90c2cf8
fixed: missing pacakge info channel url determination
Klaim 714b51d
Merge remote-tracking branch 'origin/main' into env-lockfile-channels
Klaim b815459
attempt to fix history vs channel name ci issue
Klaim 383401b
fixup "long_str()` needs to return a desc not an url
Klaim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // Copyright (c) 2025, QuantStack and Mamba Contributors | ||
| // | ||
| // Distributed under the terms of the BSD 3-Clause License. | ||
| // | ||
| // The full license is in the file LICENSE, distributed with this software. | ||
|
|
||
| ////////////////////////////////////////////////////////////////////////////// | ||
| // This file provides implementations to generic algorithms which are not yet | ||
| // available in our current C++ version and/or implementations. | ||
| // | ||
| // TODO: replace these implementations by standard implementations | ||
| // once available. | ||
| // | ||
|
|
||
| #ifndef MAMBA_UTIL_ALGORITHM_HPP | ||
| #define MAMBA_UTIL_ALGORITHM_HPP | ||
|
|
||
| #include <algorithm> | ||
| #include <concepts> | ||
| #include <iterator> | ||
| #include <ranges> | ||
|
|
||
| namespace mamba::stdext // not using mamba::util because of potential conflicts with existing | ||
| // tooling | ||
| { | ||
| /////////////////////////////////////////////////////////////////////////////////////////////// | ||
| // see https://en.cppreference.com/w/cpp/algorithm/ranges/contains.html | ||
| namespace details | ||
| { | ||
| struct contains_fn | ||
| { | ||
| template <std::input_iterator I, std::sentinel_for<I> S, class Proj = std::identity, class T> | ||
| requires std::indirect_binary_predicate<std::ranges::equal_to, std::projected<I, Proj>, const T*> | ||
| constexpr bool operator()(I first, S last, const T& value, Proj proj = {}) const | ||
| { | ||
| return std::ranges::find(std::move(first), last, value, proj) != last; | ||
| } | ||
|
|
||
| template <std::ranges::input_range R, class Proj = std::identity, class T> | ||
| requires std::indirect_binary_predicate< | ||
| std::ranges::equal_to, | ||
| std::projected<std::ranges::iterator_t<R>, Proj>, | ||
| const T*> | ||
| constexpr bool operator()(R&& r, const T& value, Proj proj = {}) const | ||
| { | ||
| return std::ranges::find(std::ranges::begin(r), std::ranges::end(r), value, proj) | ||
| != std::ranges::end(r); | ||
| } | ||
| }; | ||
| } | ||
|
|
||
| inline constexpr details::contains_fn contains{}; | ||
|
|
||
| ///////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
|
||
| } | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have the full context here, but if possible it would be best if these could be part of
ChannelParams/resolveworkflow.The general idea of
specs::Channelis that withresolveyou always obtain what you want, (pure functional no mutable changes). This is because currently withlibsolvhacks etc,specs::Channelare rather short-lived, converted back and forth to strings. I believe functions likeset_platformsare use for only local reasoning.