Commit Graph

315 Commits

Author SHA1 Message Date
Johan Mabille 00dd002fe6
Added PackageFetcher (#2917)
* Added PackageFetcher

* slight refactoring

* Additional cleanup and first pass according to review

* Last pass according to review
2023-10-19 15:26:57 +02:00
Antoine Prouvost 4e93b7967a
Add ChannelSpec (#2870)
* Make find_slash_and_platform private-lib

* Add ChannelSpec

* Add ChannelSpec::Type

* Add abs_path_or_url_to_url

* Add ChannelSpec path normalization and type detection

* Add ChannelSpec::location

* Allow any platform string in ChannelSpec

* Channel::platforms is a flat_set

* Move flat_set_caster to own file

* More flat_set in Channel

* Regenerate Python stubs

* Plug ChannelSpec into Channel

* Resolve path in ChannelSpec

* Fix env export channels

* No resolve symlink in ChannelSpec

* Fix tests on Windows

* Add ChannelSpec attribute extractors

* Add raw domain ChannelSpec test

* Use URL in read_channel_configuration

* Fix local channel name

* Improve path_to_url

* Construct from Channel from URL

* Properly parse channel alias

* Fix wrong move

* Channel alias is a CondaURL

* Add defaulted scheme to URL

* Add defaulted host to URL

* CondaURL tokens can only be at the begining

* Add CondaURL::path_without_token

* Add option to remove credentials in URLs

* Add empty cretendial URL tests

* Add str Credential options

* Add credential option to CondaURL::str

* Add split_prefix/suffix

* Add ChannelContext::from_package_path

* URL::pretty_path only on Windows

* Add ChannelContext::from_path

* Do not resolve paths in ChannelSpec

* Change mapping order in path resolving

* Compute URL canonical_name in read_channel_configurations

* Add URL::authority credentials

* Rename private URL::authentification > URL::authentifaction_elems

* Refactor URL::authority

* Refactor some read_channel_configurations

* Remove empty path URL case

* Add path_is_prefix

* Fix url_match

* Add flat_set doctest printer

* Add CondaURL doctest printer

* Alias dynamic_platform_set in ChannelSpec

* Use util:concat

* Restore subdir in matchspecs

* Make find_slash_and_platform private
2023-10-12 15:56:49 +02:00
Antoine Prouvost 5d515fa043
Add multiple queries to repoquery search (#2897)
* Remove kENUM

* Fix Hide URL confidential

* Refactor repoquery initialization

* Hide implementation headers

* Add enum_name(QueryType)

* Add QueryType_from_name

* Mulitple queries in repoquery search

* Stubgen

* No mathspec in Json query

* Remove unused ChannelContext
2023-10-09 21:40:50 +02:00
Antoine Prouvost 91b6c44a51
Read repodata.json using nl::json (rerun) (#2753)
* Add simdjson dependency

* Add experimental_repodata_parsing option

* Add simdjson repodata parser

* Add missing dependency

* Deactivate simdjson by default
2023-10-04 22:06:46 +02:00
Antoine Prouvost 0fbb0e4fab
Use CMake targets for reproc (#2883)
* Use CMake targets for reproc

* Use reproc-cpp-static on Windows

* Upper pin on Mamba
2023-10-02 18:01:14 +02:00
Johan Mabille 474be8b9b0
Download (#2844)
* Refactored Subdir Metadata

* Plugged downloader into subdirdata

* Simplified Donwloader APIs

* Added DownloadMonitor and plugged it into channel_loader

* Simplified subdir API

* Fixed python bindings

* Changes according to review (on going)

* Added json parsers to subdirmetadata
2023-09-29 16:19:14 +02:00
Antoine Prouvost be30af600a
Build micromamba win with feedstock (#2859)
* Try CI

* Remove useless header

* Try mixing static windows build with Conda

* More packages from conda-forge

* Move to yaml-cpp>=0.8.0

* Ensure proper yaml-cpp target

* Use yaml-cpp-static on Windows

* Fix versions

* Use libsolv-static from Conda-Forge
2023-09-27 10:32:47 +02:00
Daniel Elsner a2b0f9c3b8
Further improve `micromamba search` output (#2823) 2023-09-26 08:09:22 +02:00
Antoine Prouvost 9b757c24a8
No ugly kenum (#2831) 2023-09-14 10:56:29 +02:00
Antoine Prouvost 69a2cd30e2
fix stubs (#2817)
* Downpin pybind11-stubgen

* Fix stubgens

* Regenerate stubs
2023-09-07 10:12:09 +02:00
Klaim (Joël Lamotte) bbac096a04
Context: not a singleton (#2615)
Context is not a singleton anymore.

---------

Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
2023-09-05 10:55:43 +02:00
Johan Mabille 0a5ed8d71f release libmamba 1.5.1, libmambapy 1.5.1, mamba 1.5.1, micromamba 1.5.1 2023-09-05 10:23:43 +02:00
Daniel Elsner 7dfbf2cf0d
Clearer output from `micromamba search` (#2782)
* [feat] Show other versions with --pretty printing

* [feat] Refine version/build table in search pretty print

* [feat] Change table view to contain further aligned build information

* [feat] Redirect non-wildcard search to single package view

* Fix repoquery test for empty single package view

* Cleanup + add string marker for alignment

* Fix string marker for libmambapy

* Add changes suggested by JH

* Move to unordered_map where it makes sense

* Move to string_view and switch-case constexpr alignment mapping

* Fail lookup for non-existing alignments

* Remove unnecessary reference in constructor
2023-08-31 16:10:03 +02:00
Johan Mabille 795734fb7f release libmamba 1.5.0, libmambapy 1.5.0, mamba 1.5.0, micromamba 1.5.0 2023-08-24 09:24:26 +02:00
Johan Mabille 6e4d91e2ec
New apis for downloading (#2695)
* New apis for downloading

* Changes according to review

* Added minimal test and fixed issues

* Python backward compatibility
2023-08-23 09:07:20 +02:00
Hind-M 427771c4b4
Fix warnings (#2760) 2023-08-21 15:16:48 +02:00
Antoine Prouvost 03e34174dc
Move util_string to utility library (#2739) 2023-08-11 13:32:15 +02:00
Johan Mabille 6f6fdd7b98 release libmamba 1.4.9, libmambapy 1.4.9, mamba 1.4.9, micromamba 1.4.9 2023-07-13 16:07:23 +02:00
Johan Mabille bc818db386 release libmamba 1.4.8, libmambapy 1.4.8, mamba 1.4.8, micromamba 1.4.8 2023-07-11 09:50:02 +02:00
Johan Mabille c46647a880
Fixed zst check in MSubdirData (#2661) 2023-07-08 00:11:34 +02:00
Antoine Prouvost 3b6e10159f
Replace MTransaction::m_remove with Solution (#2603)
* Replace MTransaction m_to_remove with m_solution

* Add MSolver filters to Solution

* Add conversion test and accessor to flat_set

* Fix solution filtering in MTransaction

* Use Solution in MTransaction::print

* Ue m_solution in MTransaction::execute

* Fix Json logging

* MTransaction fix python search

* Fix transaction-to_solution topological order

* Fix MTransaction::execute reinstalls

* Remove MTransaction::m_transaction

* Remove MTransaction::filter

* Remove MTransaction::m_filter_name_id

* Add control flow in ObjTransaction loops

* Refactor find_python_versions

* Remove copies in iterations

* Review comments from @JohanMabille
2023-07-07 00:33:05 +02:00
Johan Mabille 2ed8bee1e1 release libmamba 1.4.7, libmambapy 1.4.7, mamba 1.4.7, micromamba 1.4.7 2023-07-06 09:00:00 +02:00
Johan Mabille cd1119fc41
Call init_console in mamba to prevent UTF8 errors when extracting pac… (#2657)
Call init_console in mamba to prevent UTF8 errors when extracting packages
2023-07-05 22:26:40 +02:00
Antoine Prouvost 520872800d
Create Solver solution (#2584)
* Replace MTransaction to_remove with PackageInfo

* Add a solution class

* Fix Solution for_each

* Add Solution empty and size

* Make MTransaction::filter const

* Remove unused MTransaction::m_force_reinstall

* Rename MSolver::set_flags

* Refactor MSolver flags

* Call solver.flag() once in MTransaction

* Implement Solution as alias with free functions

* Remove as many MSolver flag setters as possible

* Make Soltion a struct to possibly add more members

* Remove useless function call

* Add Solution::Omit

* Rename template typenames and parameters in Solution

* Fix MSolver const parameter
2023-07-04 12:04:05 +02:00
John H. Ayad c491f1c52c
Re-introduce ZST support to mamba and remove the feature flag (#2642)
* Re-introduce ZST support to mamba and remove the feature flag

* lint

* Ignore .state.json files for comparison

* lint

* One more
2023-07-02 21:28:37 +02:00
Johan Mabille fa3f7a2f73 release libmamba 1.4.6, libmambapy 1.4.6, mamba 1.4.6, micromamba 1.4.6 2023-06-30 22:07:45 +02:00
Antoine Prouvost 168e55e245
Try fixing missing subdirs on mamba.py (#2632)
* Use install repo from libmamba in mamba.py

* Regenerate stubgens
2023-06-29 10:54:54 +02:00
Antoine Prouvost 50a627e002
Attempt to fix CI (#2637)
* Revert "Change brace space in clang-format (#2627)"

This reverts commit 3dce990111.

* Revert "Improvement: Support ZST in mamba and enable ZST by default (#2404)"

This reverts commit 60cd358c39.
2023-06-29 08:29:37 +02:00
Antoine Prouvost 3dce990111
Change brace space in clang-format (#2627)
Change braced init spaces
2023-06-28 11:38:33 +02:00
John H. Ayad 60cd358c39
Improvement: Support ZST in mamba and enable ZST by default (#2404) 2023-06-27 16:14:29 +02:00
Johan Mabille 9c46dbadd2 release libmamba 1.4.5, libmambapy 1.4.5, mamba 1.4.5, micromamba 1.4.5 2023-06-27 11:05:14 +02:00
Klaim (Joël Lamotte) 5bd15a1502
LockFile behavior on file-locking is now almost independent from Context (#2608)
LockFile behavior on file-locking is now almost independent from Context

---------

Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
2023-06-22 15:40:56 +02:00
Jonas Haag 0a7490c940
Remove banner (#2298) 2023-06-20 16:53:19 +02:00
Klaim (Joël Lamotte) ec95d18986
No Singleton: `Configuration` (#2541)
* Removed unused debugging macros.

* mamba::Configuration is not a singleton anymore.

* review fix
2023-06-15 11:41:21 +02:00
Antoine Prouvost 77bbec5b4a
Fix stubgens (#2556) 2023-06-01 10:05:18 +02:00
Antoine Prouvost 83706d5f9f
Move problem graph creation to MSolver (#2515)
Move problem graph creation to MSolver and remove JupyterLab SAT error case as no long unsolvable
2023-05-23 14:03:00 +02:00
Klaim (Joël Lamotte) ea8249bc7e
No singleton: ChannelContext, ChannelBuilder and channel cache (#2455)
* Fusionned ChannelBuilder and ChannelContext and channel cache

* ChannelContext is not a singleton anymore.

* libmambapy now holds singletons for ChannelContext etc.

* formatting

* Simplified libmambapy singleton handling.

* formatting
2023-05-17 17:11:23 +02:00
Johan Mabille 7a92fa5f62 release libmamba 1.4.4, libmambapy 1.4.4, mamba 1.4.4, micromamba 1.4.4 2023-05-16 23:08:34 +02:00
Hind-M 32c64cdbfe
Support future deprecated API for `Context` (#2494)
Add deprecated API for context and updated stubs accordingly
2023-05-16 21:39:23 +02:00
Johan Mabille 46d3acd3c1 release libmamba 1.4.3, libmambapy 1.4.3, mamba 1.4.3, micromamba 1.4.3 2023-05-15 23:25:22 +02:00
Antoine Prouvost 15f6b6e606
Use libsolv wrappers in MPool and MRepo (#2453)
* Use ObjPool in MPool

* Straightforward wrapper call

* MPool debug callback wrapper

* Fix format

* Use m_real_repo_key

* MRepos need not be stored

* Change MRepo::set_urls call

* Rename real_repo_key

* Awlways set solvable URL

* Rename mrepo_key

* Leaf comment note on package Info

* Ensure proper channel format in query

* Fix set url everywhere

* Rename solvable:noarch

* Fix real_repo_url in pybind

* Bump mamba tool version

* fix: prevent (possible) dangling pointer in query

* Fix url in transaction

* fix: setting url or repo from mamba

* fix: UB string_view of deallocated string

* Use solv:: interface in channel specific dep

* Use new solv:: interface in make_package_info

* Use solv:: interface in add_package_info

* Small implementation changes in MRepo

* Use wrapped reading functions

* kill MRepo::m_url

* Mark MRepo C++ function for Python deprecated

* Add ObjRepo::legacy_read_conda_repodata

* Mark more MRepo functions private

* Remove filename attributes from MRepo

* Fix Mrepo add_extra_pkg_info

* Not ignoring MRepo name

* Split url outside MRepo

* Remove MRepo ctor overload
2023-05-05 11:07:21 +02:00
Hind-M 9831342dd1
Resume `Context` structuring (#2460)
Add ThreadsParams and PrefixParams in Context
2023-04-25 10:02:51 +02:00
Antoine Prouvost c7f897febf
Store PackageInfo::track_features as a vector (#2478)
Store PackageInfo::track_features as a vector
2023-04-21 15:37:30 +02:00
Hind-M 40c220c4ce
Context structuring (#2432)
Context structuring

Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
2023-04-12 21:08:29 +02:00
Antoine Prouvost 032e404fc8
Remove dead code / attribute (#2454)
Removed dead code in package info and PackageInfo::extra_metadata
2023-04-12 15:55:36 +02:00
Johan Mabille 30ca2e2d5d release libmamba 1.4.2, libmambapy 1.4.2, mamba 1.4.2, micromamba 1.4.2 2023-04-06 14:58:37 +02:00
Antoine Prouvost 0345b9d7f8
Use custom function to properly parse matchspec (#2433)
Make MPool::matchspec2id properly process channels
2023-04-03 16:39:43 +02:00
Ivan Ogasawara a3597e33ff
fix: Improve message after the env creating with micromamba (#2425) 2023-03-31 20:50:07 +02:00
Johan Mabille 6ed35f84ef release libmamba 1.4.1, libmambapy 1.4.1, mamba 1.4.1, micromamba 1.4.1 2023-03-28 11:39:49 +02:00
Klaim (Joël Lamotte) 4e7bd605b0
Renamed `validate` namespace to `mamba::validation (#2411)
Renamed `validate` namespace to `mamba::validation
2023-03-27 11:38:06 +02:00
Johan Mabille d212f4aeac release libmamba 1.4.0, libmambapy 1.4.0, mamba 1.4.0, micromamba 1.4.0 2023-03-22 17:42:38 +01:00
Antoine Prouvost 07477a25fe
Some renaming in the utility library (#2387)
Rename vector_set > flat_set, move util_compare > util/compare, move util_cast > util/cast
2023-03-17 09:06:31 +01:00
Antoine Prouvost 8c5841cbfc
Isolate PackageInfo from libsolv (#2340)
* Isolate libsolv from PackageInfo
2023-03-08 09:15:46 +01:00
Antoine Prouvost 66c721c220
Improve Python conflicts (#2318)
Better handle the (almost) cyclic conflict due to the reversal of the dependencies bewteen python and python_abi.
2023-03-07 16:19:55 +01:00
Johan Mabille 0919fbd514
Fixed repoquery output of mamba when query format is JSON (#2353)
Fixed repoquery output of mamba when query format is JSON
2023-03-07 14:55:09 +01:00
Hind-M e549d07b0c
Fix `repoquery` issues (#2330)
Fix `depends` and `whoneeds` repoquery sub-commands in micromamba
2023-03-06 12:13:19 +01:00
Antoine Prouvost 2811c25d75
Clean util_string (#2339)
clean up the util_string header and add util_string.cpp
2023-03-03 16:22:15 +01:00
Antoine Prouvost 8c4212f5d4
DependencyInfo is redundant (#2314)
Removed redundant DependencyInfo and renamed MatchSpec::build
2023-03-02 11:18:22 +01:00
Antoine Prouvost 018aac3dd7
Activate SAT error messages (#2325) 2023-02-28 11:24:47 +01:00
Antoine Prouvost 365342cc04
Fine tune clang-format proposal (#2290)
* Fine-tune .clang-format

* Fix missing header and right const

* Fix header order on Windows

* Apply pre-commit
2023-02-20 16:01:43 +01:00
Antoine Prouvost 0002794f3c
Aggressive compilation warnings (#2304) 2023-02-20 09:02:36 +01:00
timostrunk 2fc0624013
repoquery: Implemented recursive dependency printout. Closes: #1242 (#2283)
Co-authored-by: Timo Strunk <Timo.Strunk@nanomatch.com>
2023-02-13 22:40:21 +02:00
Wolf Vollprecht baf3c48cc3
release libmamba 1.3.1, libmambapy 1.3.1, mamba 1.3.1, micromamba 1.3.1 (#2280) 2023-02-10 11:05:46 +01:00
Wolf 9de6782e02 release libmamba 1.3.0, libmambapy 1.3.0, mamba 1.3.0, micromamba 1.3.0 2023-02-03 13:03:49 +01:00
Johan Mabille aab7768807
Added missing public dependency to libmambaConfig.cmake (#2227) 2023-02-02 16:08:32 +01:00
jaimergp 4e2fb8236e
add `use_lockfiles` to libmambapy bindings (#2256) 2023-01-30 13:56:58 +01:00
Wolf Vollprecht 3390da9ab9 release libmamba 1.2.0, libmambapy 1.2.0, mamba 1.2.0, micromamba 1.2.0 2023-01-16 10:20:39 +01:00
Wolf Vollprecht 3f2135ef9e
remove patches for feedstock (#2216) 2023-01-11 13:40:19 +01:00
Wolf Vollprecht f6e717173c
make tarballs look more similar to conda-package-handling, add compression threads (#2177) 2023-01-03 17:56:12 +01:00
Antoine Prouvost efc377e29d
Error messages improvements (#2149)
* Fix compression of split with different status

* Fix size issue in truncated strings

* Add versions_and_build_strings_trunc

* Use zipped versions and builds

* Better handling of virutal nodes

* Don't merge same name user requirements

* Fix NamedList tests

* Adjust NamedList bindings

* Regenerate stubgens
2022-12-05 15:40:52 +01:00
Claudia Rogoz 53f141a32e
Add Context binding for experimental_sat_error_message (#2143)
* Add experimental_sat_error_message setter

* fix order

* add experimental_sat_error_message to context

* initi_api_context

* pre-commit

* no conda context
2022-12-05 11:28:28 +01:00
Wolf Vollprecht e0848e695e
release 1.1.0 (#2130) 2022-11-28 18:44:19 +01:00
Antoine Prouvost 0181538e54
Bind SAT error messages to python (#2127)
* Bind ProblemsGraph and CompressProblemGraph

* Rename summary error message

* Fix Python static property

* Add stubgens for problems bindings

* Give a little help to Windows

* Windows

* Hang in there MSVC

* Fix Pybind init

* Add graph all successors accessor

* Change graph bindings to raw data

* Add NamedList remove_duplicates py::arg

* Regenerate stubgens
2022-11-23 14:30:03 +01:00
Antoine Prouvost f32b42e3f2
Move to fmt::terminal_color and other output IO improvements (#2085)
* Remove termcolor for fmt
* Reimplement termcolor::is_atty
* Switch to fmt::terminal_color
* Add missing header for to_utf8
* Add Context color palette
* Refactor progress bar to use palette
* Remove misleading flag-like enum
* Fix windows build
* Remove output::format
* Add visited colors for repoquery
* Use palette in SAT error messages
* Console::stream() clear line
2022-11-21 14:22:51 +01:00
Antoine Prouvost ab22b63985
[MER] Add experimental flag for error messages (#2080)
* Add experimental flag for error messages
* Bind MSolver::explain_problems
* Use Solver.explain_problems in mamba
* Rename MSolver::solve > MSolver::try_solve
* Add MSolver::must_solve
* Add [[nodiscard]] to MSolver
* Change solve -> try_solve in tests
* Used shared_ptr for MPool
* Make MSolverProblem a flat data type
* Add deprecation warnings for Solver.solve
* Add tree error message to MSolver
2022-11-10 18:54:41 +01:00
Wolf Vollprecht c5d73a204b release 1.0.0 2022-11-01 21:01:36 +01:00
Wolf Vollprecht c889fa6855
add micromamba self-update functionality (#2023) 2022-11-01 17:24:46 +01:00
Jonas Haag eea9407d30
Test special characters in basic auth (#2012) 2022-10-29 17:55:37 +02:00
AntoinePrv 4e2a91bea7 Direct dependency on fmt 2022-10-26 10:49:50 +02:00
Joël Lamotte (Klaim) 2b7b230613 Changed LockFile to be a non-throwing checkable type, no pointers use.
This changes how we use LockFile. See documentation/comments in the
type's header `util.hpp`.
2022-10-21 16:29:18 +02:00
Wolf Vollprecht d839af71d1
Test stubs (#2025)
test pybind11-stubgen generation
2022-10-14 15:21:26 +02:00
Daniel Holth f055ff777c
add stubs with pybind11-stubgen (#1983)
* add stubs with pybind11-stubgen
* move stubs to libmambapy/__init__.pyi
2022-10-13 14:08:31 +02:00
Wolf Vollprecht cb2342a009
release 0.27.0 (#1990) 2022-10-04 12:47:54 +02:00
Wolf Vollprecht 69cc8944ff use external spdlog in libmambapy if desired 2022-10-04 09:20:20 +02:00
Wolf Vollprecht 25be29a831 update all release files 2022-09-30 16:11:26 +02:00
Daniel Farrell 3a5cd599d6
Add 'use_lockfiles' configuration to enable or disable locking globally (#1830)
Co-authored-by: Danny <dan@cyrusbio.com>
Co-authored-by: Jonas Haag <jonas@lophus.org>
Co-authored-by: Wolf Vollprecht <w.vollprecht@gmail.com>
Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
2022-09-29 18:01:13 +02:00
Adrian Freund 02e4385d2f
Add support for configuring proxies in .condarc (#1814)
* Add support for proxy settings in .condarc

This commit is based on https://github.com/mamba-org/mamba/pull/161/

* Add test for proxy configuration

* Remove env variables from proxy servers configurable

They are already handled by curl

* Add tests for proxy_match

* Remove and improve debug messages

* Use EXPECT_STREQ for proxy match tests

* Use std:string instead of char*

* Add micromamba proxy tests

* Retrigger CI

* Try to fix proxy tests in CI

* Add missing file and fix executable name

* Try to fix windows build

* Use install xtensor package for proxy test

* Try to fix tests on windows

* Pass proxy settings between libmamba and mamba

* Use long form of `--script` parameter for mitmproxy

Co-authored-by: Jonas Haag <jonas@lophus.org>

* Clarify variable name

Co-authored-by: Jonas Haag <jonas@lophus.org>

* Add docstring to dump_proxy_connections.py

* Add explanation to micromamba proxy test

* Cleanup proxy_match function

* Redact passwords in proxy urls when logging

* Renamed redact_url to redact_url_password

* Revert "Renamed redact_url to redact_url_password"

This reverts commit ca39afda21.

* Revert "Redact passwords in proxy urls when logging"

This reverts commit 270eb70420.

* Use existing hide_secrets function to hide password in proxy url

* Rewrite proxy_match function to be in line with conda

Co-authored-by: Jonas Haag <jonas@lophus.org>
2022-09-08 17:48:27 +02:00
Joël Lamotte (Klaim) 5f2bd74d6f Revert "try vs2022"
This reverts commit 4a4c65747ec8707951c0ddb7c0c0cd6fb7345610.
2022-08-12 17:25:10 +02:00
Wolf Vollprecht 0ff503c483 try vs2022 2022-08-12 14:37:50 +02:00
Joël Lamotte (Klaim) a6a1251c10 Replaced `fs::u8path` long-path support on windows by enabling it explicitly. 2022-08-12 14:37:49 +02:00
Joël Lamotte (Klaim) 8b4010a56f Use `fs::u8path` instead of `fs::path` to fix utf-8 paths issues on Windows 2022-08-12 14:37:49 +02:00
Joël Lamotte (Klaim) 231db2021a Fixed missing explicit conversions from `fs::path` to `std::string` 2022-08-12 14:37:49 +02:00
Joël Lamotte (Klaim) 9790a87a5d Use standard C++ filesystem API only 2022-08-12 14:37:49 +02:00
Antoine Prouvost 6d45c96ecc
Add missing SolverRuleinfo enum members to libmambapy (#1833) 2022-08-03 19:59:01 +02:00
Wolf Vollprecht 4074116dae
Release 0.25.0 (#1824) 2022-07-26 18:03:18 +02:00
crogoz a825a08928
Add missing rule info 2022-07-26 16:08:37 +02:00
AntoinePrv cabd3bf640 Safe id2pkginfo 2022-07-26 11:35:10 +02:00
AntoinePrv 13a6a4c086 Change mutability in libmambapy PackageInfo 2022-07-25 18:12:13 +02:00
AntoinePrv 649d7eb406 Add argument for PackageInfo ctor 2022-07-25 18:09:28 +02:00
Antoine Prouvost 5e76e2f644
Keep Pool alive for the lifetime of the Solver (#1804) 2022-07-19 16:53:40 +02:00
Wolf Vollprecht f2ac46b1c4
add some utility functions for better error reporting and refactor with MQueue (#1789) 2022-07-13 00:43:53 +02:00
Wolf Vollprecht d48711724a
release libmamba 0.24.0, libmambapy 0.24.0, mamba 0.24.0, micromamba 0.24.0 (#1714) 2022-06-01 10:00:56 +02:00
Wolf Vollprecht d992bd655e release 0.23.3 2022-05-20 18:23:53 +02:00
Wolf Vollprecht c124c4c818
reduce number of compiler warnings (#1691) 2022-05-20 18:06:44 +02:00
Wolf Vollprecht 46428139ce release 0.23.1 2022-05-11 19:23:58 +02:00
Joël Lamotte (Klaim) 9ad9ddab5a Improves singletons construction and destruction order guarantees
In C++ namespace-scope static object are created and destructed in an
unspecified order before and after `main()` execution, respectively.
The only guarantee is that such objects in the same translation unit
shall be constructed in apparition order in the file and destructed in
the reverse order. Another guarantee is that local (inside functoins)
static object are guaranteed to be created only at the first call to
that function, but then there is no guarantee on the destruction order.

This is fine until these objects interacts, that is, at least one of
these objects have a dependency/usage of another object defined in a
different translation unit.

We currently have singletons which are implemented as global statics
spread through various translation units, and several of these
singletons are also accessed through construction and destruction of
other singletons. Basically, we have undefined behavior around their
creation and destruction, so it is not always visible because often
memory looks like valid objects even if it is not. Some recent fixes
made this even more visible (which is helpful).

This change moves all the singleton object definitions into the same
translation unit to begin improving guarantees on their construction
and destruction order after `main()` execution.
2022-05-10 12:26:52 +02:00
Klaim (Joël Lamotte) 51e917e124
Replace thread detaching by thread joining before main's end (#1637)
Scopes lifetime of any thread used by libmamba to `main()`'s scope.

This fixes undefined behavior when threads are running after `main()`
is finished. At the end of `main()`, static objects are destroyed in
an unspecified order which can also lead easilly to undefined behaviors.
This change should fix both issues.

For now the implementation of `MainExecutor` is simple: it spawn a
new thread for each task scheduled and does not provide means to track
the progress and/or end of tasks. This reflects the previous behavior.
The intent is to enabled changing the implementation of `MainExecutor`
in the future to improve execution speed and/or execution resources
usage.
2022-04-27 12:01:28 +02:00
Wolf Vollprecht 53eb28d0a4 release 0.23.0 2022-04-21 18:29:05 +02:00
Wolf Vollprecht 78558dbb58
fix issue with cache_path returning non-convertible type to python #1639) 2022-04-21 17:48:05 +02:00
Wolf Vollprecht 92a5efe13a
Add configurable user agent to context (#1625) 2022-04-14 14:05:30 +02:00
Klaim (Joël Lamotte) 048cb67f62
Fix JSON output issues (#1600)
* Fixed: `--json` throwing exceptions in some situations (lockfiles)
* Refactored Console pimpl handling
* Automatic json printing instead of explicit.
* added a way to cancel the print of json log from libmamba, used in mamba which already output the right json;
From now on the json output will be automatically printed at the end of the program
(after `main()` call) instead of explicitly invoked.
2022-04-07 11:17:22 +02:00
Jonas Haag 2e50484c5e
CI: Use Sccache (#1606) 2022-04-01 09:41:04 +02:00
Joël Lamotte (Klaim) 4554063c7b Constrains cli11 to v2.1.2
This is to prevent broken builds with cli 2.2.0 update.
2022-03-28 15:48:25 +02:00
Johan Mabille 0fb7d5efb2 Hide spdlog 2022-03-26 06:36:58 +01:00
Wolf Vollprecht d232bcb9af
remove prefixdata from solver interface (#1550) 2022-03-21 17:33:38 +01:00
Johan Mabille c4699b19df Added expected for reference and removed poitners in the API 2022-03-21 14:50:39 +01:00
Johan Mabille 3eed546f4a Refactored error handling 2022-03-18 17:30:26 +01:00
Wolf Vollprecht d07ee8abac
Merge pull request #1563 from JohanMabille/expected
Plugged tl::expected and refactored MSubdirData construction
2022-03-10 19:03:38 +01:00
Johan Mabille d5da2b3bf9 added static create method to PrefixData + error handling 2022-03-10 18:26:34 +01:00
Wolf Vollprecht f29de46edf
improve interface of structured problems (#1570) 2022-03-10 12:46:00 +01:00
Johan Mabille 3f6bfb59bf Removed dynamic allocation and shared_ptr for subdirdata 2022-03-10 10:16:46 +01:00
Wolf Vollprecht 4cdfdf1cd8
Merge pull request #1566 from wolfv/structured_problems
add structured problems extraction and python interface
2022-03-09 23:12:35 +01:00
John H. Ayad bd9b743342
Bump libcurl to 7.82.0 and add a test that catches the bug (#1569) 2022-03-09 23:11:33 +01:00
Wolf Vollprecht 7c57078b6e ignore import error when conda_build_cross_compilation is set 2022-03-09 20:45:34 +01:00
Wolf Vollprecht 751e556d3c add structured problems extraction and python interface 2022-03-09 17:07:15 +01:00
Wolf Vollprecht d814d24c50
remove prefixdata.load() (#1555) 2022-03-02 18:06:06 +01:00
Johan Mabille 3e4a839fc5
Remove need to manually call SubdirData.load() (#1554) 2022-03-02 15:23:18 +01:00
Johan Mabille 6b195b423a
Building MRepo objects through static function that register the repo into the pool (#1547) 2022-03-02 06:23:14 +01:00
Johan Mabille 5ce0c38b39
Storing repos in pool (#1546) 2022-03-01 15:21:15 +01:00
Johan Mabille 304bdb51b6
Stores channel into MSubdirdata and libsolv Repo appdata pointer (#1544) 2022-03-01 10:49:24 +01:00
Wolf Vollprecht 4b663ada01 release libmamba 0.22.1, libmambapy 0.22.1, mamba 0.22.1 2022-02-28 23:40:33 +01:00
Wolf Vollprecht 78ec204b64
Release 0.22.0 (#1539) 2022-02-25 18:41:03 +01:00
Wolf Vollprecht 565b73a8a3
add noarch recompilation step to mamba and micromamba when updating python (#1511) 2022-02-24 07:53:59 +01:00
Wolf Vollprecht 42f2cd88ba format all files 2022-02-22 15:58:57 +01:00
Wolf Vollprecht b3aef48677 release libmamba 0.21.2, libmambapy 0.21.2, mamba 0.21.2, micromamba 0.21.2 2022-02-14 09:49:00 +01:00
Wolf Vollprecht 3d8afb75fb release libmamba 0.21.1, libmambapy 0.21.1, mamba 0.21.1, micromamba 0.21.1 2022-02-11 19:16:10 +01:00
Wolf Vollprecht f76f428dc6 release 0.21.0 2022-02-07 18:47:26 +01:00
Adrien Delsalle 129920a304
Improve progress bars (#1350)
* refactor progress bars
* use fmt to better format progress bars fields
* add a Chrono class to handle time and status/state
* add a ProgressBarRepr class to handle representation of the bars
* add capability to remove progress bars from a manager
* add capability to set width when computing bars repr and printing
* handle no_progress_bars context value in all situations
* also ensure quiet, not a tty, and json modes are handled
* add and update tests
* make it optional to display sub-bars in aggregated mode
* display a carrousel of downloading or extracting packages is the aggregated bar
* make sure extracting packages from cache are printed by the progress bars manager
* remove postfix when printing the completed download status
* protect chrono state against modifications when sorting bars
* fix to_human_readable_filesize free function
* only wait for watch_print thread to exit if started
* store speed, also compute average speed from member or Chrono elapsed time
* use the average speed on download aggregated bar if cURL info is missing
* allows to get average speed on total elapsed time
* improved color scheme of progress bars
* collect and show the in-progress status using cyan
* init the progress randomly when activating spinner
* control sorting of multi downloads using an option
* use C-style options also for fastfail
* make sure pbar manager is init on multi bars when dl channels
* refactor on api changes
2022-01-26 15:47:13 +01:00
Wolf Vollprecht 7c71c34887 add global job function 2022-01-25 15:32:05 +01:00
Wolf Vollprecht 2e5e555c68
Release changelog for 0.20.0 (#1392) 2022-01-25 10:48:12 +01:00
Adrien Delsalle d4acbf7dc3
Make max download threads configurable (#1377) 2022-01-14 14:47:49 +01:00
Bas Zalmstra 9aeb98d039 feat: expose all keys of PackageInfo 2021-12-10 11:36:25 +01:00
Wolf Vollprecht 15c347db76 release 0.19.1 of all projects 2021-12-08 18:53:39 +01:00
Wolf Vollprecht 1d447979bf use winreg from conda-forge 2021-12-02 09:34:07 +01:00
Wolf Vollprecht 5a40d504e7
release libmamba 0.19.0, libmambapy 0.19.0, mamba 0.19.0, micromamba 0.19.0 (#1314) 2021-11-30 18:00:04 +01:00
Wolf Vollprecht 010aad71a0
Merge pull request #1306 from wolfv/fix_prefix_unicode
Fix prefix unicode
2021-11-30 17:16:21 +01:00
Wolf Vollprecht 98d20749be experiment with solver errors 2021-11-30 16:25:10 +01:00
Wolf Vollprecht d97ac17570 fix unicode on win 2021-11-30 16:22:52 +01:00
Wolf Vollprecht 4e047cca58
Merge pull request #1303 from duncanmmacleod/libmambapy-no-install_requires-libmamba 2021-11-25 17:29:01 +01:00
Duncan Macleod f9ee91c242
libmambapy: remove install_requires on libmamba
this cannot be resolved right now, so `pip check` complains loudly
2021-11-25 16:23:43 +00:00
Wolf Vollprecht 6aa8448bd6
Release 0.18.2 (#1300) 2021-11-24 16:50:24 +01:00
Wolf Vollprecht 20a4463e7b add releaser script 2021-11-24 14:30:25 +01:00
Adrien Delsalle 8b13203cdb
Update changelogs (#1287) 2021-11-24 14:17:33 +01:00
Wolf Vollprecht acc44f8cef add changelog for libmambapy 2021-11-19 19:20:23 +01:00
Wolf Vollprecht 4a2a499d8f release 0.18.1 2021-11-19 19:16:51 +01:00
Adrien DELSALLE 6422b29891
set log level in context ctor
add set_log_level method
add python bindings for set_log_level and log levels enum
use set_log_level in mamba
2021-11-19 16:56:20 +01:00
Adrien DELSALLE 770d1a9ba2
allow mamba to set max extract threads
use MAMBA_EXTRACT_THREADS env var in mamba
set max extract threads before transaction
make sure the context value is used by setting context value in fetch_extract_packages
add error handling in mamba in case env var can't be converted to integer
2021-11-19 14:48:47 +01:00
Adrien Delsalle 3e310f0b1e
update changelogs (#1273)
bump version
add micromamba independent version
print both libmamba and umamba version in umamba CLI
2021-11-18 11:10:32 +01:00
Adrien Delsalle 9a1a68e82c
catch import error for cross compiling osx arm64 (#1263)
when version is imported it currenly also try to import the bindings
2021-11-10 14:55:58 +01:00
Wolf Vollprecht 1439f321c5
Build fixes (#1261)
* wheel is not universal

* use modern way of finding Python

* set policy needed for pybind 11, and up cmake required version
2021-11-10 14:51:54 +01:00
Adrien DELSALLE 95e65b8114
use spdlog as logger backend
split verbosity and log level
use backtrace to replay logs on critical error
use backtrace to replay logs emitted before setting the log level, with the appropriate level
make libmamba compile time log level a cmake option
break circular dependencies
remove hard-coded config loading sequence
2021-11-05 10:46:22 +01:00
Adrien DELSALLE 1b6fccb39d
use find package only is libmamba targets are not defined 2021-10-28 17:12:01 +02:00
Adrien DELSALLE 73b1760e5e
improve cmake build options
create a libmamba-full-static target to expose static deps
remove automagic activation of libmamba build options to fix packaging
add find_package libmamba in micromamba and libmambapy
add umamba MICROMAMBA_LINKAGE option to select libmamba target
update documentation
2021-10-28 16:36:22 +02:00
Adrien DELSALLE a416754bcb
use libmamba LockFile instead of conda's one
add CLI parser for clean -l,--locks
rely on libmamba for that specific clean action
2021-10-26 16:10:48 +02:00
Adrien Delsalle bff16c2bdc
Split projects (#1219)
* make a clear split between CMake targets
* split versions between libmamba and mamba
* add libmambapy target for python bindings and make mamba depend on it
* rename CMake options to make them homogeneous, simplify CMake
* remove termcolor from thirdparties, use it as a dependency
* remove unnecessary version global vars and convert to functions
* update CI workflows
2021-10-26 16:01:53 +02:00