Commit Graph

315 Commits

Author SHA1 Message Date
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