Skip to content

Commit

Permalink
Merge branch 'main' into catch2_ext
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru authored Dec 4, 2024
2 parents c37538f + a85eb16 commit e6fb1a7
Show file tree
Hide file tree
Showing 14 changed files with 314 additions and 105 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/brew.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Homebrew and Linuxbrew toolchains

on:
workflow_call:

jobs:
build_linuxbrew:
name: Build on linuxbrew
runs-on: ubuntu-latest
container:
image: homebrew/brew:latest

steps:
# v1 required due to permissions error
- name: Checkout mamba repository
uses: actions/checkout@v1

- name: Correct the creation permissions
run: sudo chown -R linuxbrew .

- name: Install host and build dependencies
run: brew install fmt libarchive libsolv lz4 openssl@3 reproc simdjson xz yaml-cpp zstd cmake cli11 nlohmann-json spdlog tl-expected curl pkgconfig python bzip2 krb5 zlib

- name: Configure to build mamba
run: cmake -S. -Bbuild -DBUILD_LIBMAMBA=ON -DBUILD_MAMBA=ON -DBUILD_SHARED=ON -DBUILD_STATIC=OFF

- name: Build mamba
run: cmake --build build -j4

build_homebrew:
name: Build on homebrew
runs-on: macos-13

steps:
- name: Checkout mamba repository
uses: actions/checkout@v4

- name: Install host and build dependencies
run: brew install fmt libarchive libsolv lz4 openssl@3 reproc simdjson xz yaml-cpp zstd cmake cli11 nlohmann-json spdlog tl-expected pkgconfig python

- name: Configure to build mamba
run: >
cmake -S. -Bbuild -DBUILD_LIBMAMBA=ON -DBUILD_MAMBA=ON -DBUILD_SHARED=ON -DBUILD_STATIC=OFF
-DLibArchive_ROOT=$(brew --prefix libarchive)
- name: Build mamba
run: cmake --build build -j4
86 changes: 0 additions & 86 deletions .github/workflows/conda_canary.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install pre-commit
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-name: linters
create-args: pre-commit
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ jobs:
with:
os: ${{ matrix.os }}
build_type: ${{ matrix.build_type }}

brew_tests:
name: Homebrew and Linuxbrew toolchains
uses: ./.github/workflows/brew.yml
69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
2024.11.22
==========

Releases: libmamba 2.0.4, libmambapy 2.0.4, micromamba 2.0.4

Enhancements:

- [micromamba] feat: List PyPI packages in environment export by @jjerphan in https://github.com/mamba-org/mamba/pull/3623
- [libmamba] More details in error message when failing to parse json from a python command's output by @Klaim in https://github.com/mamba-org/mamba/pull/3604
- [libmamba] Fix: json parsing error due to wrong encoding of Python output by @Klaim in https://github.com/mamba-org/mamba/pull/3584
- [libmamba] Adds logs clarifying the source of the error "could not load prefix data by @Klaim in https://github.com/mamba-org/mamba/pull/3581
- [libmamba, micromamba] pip packages support with `list` by @Hind-M in https://github.com/mamba-org/mamba/pull/3565
- [libmamba, libmambapy] chore: some CMake cleanup by @henryiii in https://github.com/mamba-org/mamba/pull/3564
- [libmamba] Replaced rstrip reimplementation with call to remove_suffix by @JohanMabille in https://github.com/mamba-org/mamba/pull/3508

Bug fixes:

- [micromamba, libmamba] fix: Return JSON on environment creation dry run by @jjerphan in https://github.com/mamba-org/mamba/pull/3627
- [libmamba] fix: support homebrew/linuxbrew (AppleClang, GCC 11) by @henryiii in https://github.com/mamba-org/mamba/pull/3613
- [libmamba, libmambapy] maint: Enable -Werror compiler flag for GCC, Clang and AppleClang by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3611
- [libmamba] Fix build trailing `*` display by @Hind-M in https://github.com/mamba-org/mamba/pull/3619
- [libmamba] fixed: incorrect erasing of env vars by @Klaim in https://github.com/mamba-org/mamba/pull/3622
- [libmamba] Prevent pip "rich" ouput by @Klaim in https://github.com/mamba-org/mamba/pull/3607
- [micromamba, libmamba] maint: Address compiler warnings by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3605
- [micromamba] fix: Export `'channels'` as part of environments' export by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3587
- [libmamba] Fix some warnings by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3595
- [all] Remove Taskfile from `environment-dev-extra.yml` by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3597
- [all] fixed incorrect syntax in static_build.yml by @Klaim in https://github.com/mamba-org/mamba/pull/3592
- [micromamba] fix: Correct `mamba env export --json --from-history` by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3590
- [libmamba] fix: Skip misformatted configuration files by @ChaonengQuan in https://github.com/mamba-org/mamba/pull/3580
- [libmamba] Fix locking error by @Hind-M in https://github.com/mamba-org/mamba/pull/3572
- [libmamba, micromamba] Fix test on windows by @Hind-M in https://github.com/mamba-org/mamba/pull/3555
- [libmamba] fix: Only register channels in the context once by @jjerphan in https://github.com/mamba-org/mamba/pull/3521
- [micromamba] fix: JSON output for environment export by @jjerphan in https://github.com/mamba-org/mamba/pull/3559
- [micromamba] fix: Support `conda env export` `no-builds` flag by @jjerphan in https://github.com/mamba-org/mamba/pull/3563
- [micromamba] fix: Export the environment prefix in specification by @jjerphan in https://github.com/mamba-org/mamba/pull/3562
- [libmamba] windows shell init files use executable name by @Klaim in https://github.com/mamba-org/mamba/pull/3546
- [libmamba, micromamba] Fix relative path in local channel by @Hind-M in https://github.com/mamba-org/mamba/pull/3540
- [libmamba, micromamba] Correctly rename test to be run by @Hind-M in https://github.com/mamba-org/mamba/pull/3545
- [libmamba, micromamba] Create empty base prefix with `env update` by @Hind-M in https://github.com/mamba-org/mamba/pull/3519
- [libmamba, micromamba] fix: Use POSIX-compliant scripts by @jjerphan in https://github.com/mamba-org/mamba/pull/3522
- [libmamba, micromamba] maint: Clarify `env` subcommand documentation in help menu (cont'd) by @jjerphan in https://github.com/mamba-org/mamba/pull/3539
- [libmamba] fix: Handle space in `mamba` and `micromamba` executable absolute paths by @NewUserHa in https://github.com/mamba-org/mamba/pull/3525
- [libmamba, micromamba] maint: Clarify `env` subcommand documentation in help menu by @jjerphan in https://github.com/mamba-org/mamba/pull/3502
- [micromamba] fix: Adapt `test_env_update_pypi_with_conda_forge` by @jjerphan in https://github.com/mamba-org/mamba/pull/3537
- [libmamba] Add recommendation if error with root prefix by @Hind-M in https://github.com/mamba-org/mamba/pull/3513
- [libmamba] fix: Ignore inline comment in environment specification by @jjerphan in https://github.com/mamba-org/mamba/pull/3512
- [libmamba] Replace `[System.IO.Path]::GetFileNameWithoutExtension` with `-replace` by @mleistner-bgr in https://github.com/mamba-org/mamba/pull/3510
- [libmamba] Fix warnings and co by @Hind-M in https://github.com/mamba-org/mamba/pull/3507


CI fixes and doc:

- [all] ci: add brew toolchain test by @henryiii in https://github.com/mamba-org/mamba/pull/3625
- [all] doc: show how to use advanced match specs in yaml spec by @corneliusroemer in https://github.com/mamba-org/mamba/pull/3384
- [all] Doc: how to install specific Micromamba version by @truh in https://github.com/mamba-org/mamba/pull/3517
- [all] doc: Homebrew currently only installs micromamba v1 by @corneliusroemer in https://github.com/mamba-org/mamba/pull/3499
- [all] maint: Add dependabot config for GitHub workflows/actions by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3614
- [all] maint: Unify `cmake` calls in workflows, build win static builds in p… by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3616
- [all] docs: Update pieces of documentation after the release of mamba 2 by @jjerphan in https://github.com/mamba-org/mamba/pull/3610
- [libmambapy, libmamba] maint: Update clang-format to v19 by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3600
- [micromamba, libmamba] Update pre-commit hooks except clang-format by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3599
- [all] Force spinx v6 in readthedocs by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3586
- [all] Fix doc by @Hind-M in https://github.com/mamba-org/mamba/pull/3568
- [all] [windows-vcpkg] Replace deprecated openssl with crypto feature with latest libarchive by @Hind-M in https://github.com/mamba-org/mamba/pull/3556
- [all] maint: Unpin libcurl<8.10 by @jjerphan in https://github.com/mamba-org/mamba/pull/3548
- [all] dev: Remove the use of Taskfile by @jjerphan in https://github.com/mamba-org/mamba/pull/3544
- [all] Upgraded CI to micromamba 2.0.2 by @JohanMabille in https://github.com/mamba-org/mamba/pull/3497

2024.11.21
==========

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ It can significantly reduce your CI setup time by:
- Caching package downloads.
- Caching entire `conda` environments.

## Differences with `conda`

While `mamba` and `micromamba` are generally a drop-in replacement for `conda` there are some differences:

- mamba and micromamba do no support revisions (for discussions, see https://github.com/mamba-org/mamba/issues/803)

## Development installation

Please refer to the instructions given by the [official documentation](https://mamba.readthedocs.io/en/latest/developer_zone/dev_environment.html).
Expand Down
3 changes: 0 additions & 3 deletions docs/source/installation/micromamba-installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ On macOS, you can install ``micromamba`` from `Homebrew <https://brew.sh/>`_:
brew install micromamba
.. hint::

(2024-10-03) Homebrew currently only has version 1 of micromamba, not version 2. See https://github.com/mamba-org/mamba/issues/3495 for updates.
Mamba-org releases
******************
Expand Down
59 changes: 59 additions & 0 deletions libmamba/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
libmamba 2.0.4 (November 22, 2024)
==================================

Enhancements:

- More details in error message when failing to parse json from a python command's output by @Klaim in https://github.com/mamba-org/mamba/pull/3604
- Fix: json parsing error due to wrong encoding of Python output by @Klaim in https://github.com/mamba-org/mamba/pull/3584
- Adds logs clarifying the source of the error "could not load prefix data by @Klaim in https://github.com/mamba-org/mamba/pull/3581
- pip packages support with `list` by @Hind-M in https://github.com/mamba-org/mamba/pull/3565
- chore: some CMake cleanup by @henryiii in https://github.com/mamba-org/mamba/pull/3564
- Replaced rstrip reimplementation with call to remove_suffix by @JohanMabille in https://github.com/mamba-org/mamba/pull/3508

Bug fixes:

- fix: Return JSON on environment creation dry run by @jjerphan in https://github.com/mamba-org/mamba/pull/3627
- fix: support homebrew/linuxbrew (AppleClang, GCC 11) by @henryiii in https://github.com/mamba-org/mamba/pull/3613
- maint: Enable -Werror compiler flag for GCC, Clang and AppleClang by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3611
- Fix build trailing `*` display by @Hind-M in https://github.com/mamba-org/mamba/pull/3619
- fixed: incorrect erasing of env vars by @Klaim in https://github.com/mamba-org/mamba/pull/3622
- Prevent pip "rich" ouput by @Klaim in https://github.com/mamba-org/mamba/pull/3607
- maint: Address compiler warnings by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3605
- Fix some warnings by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3595
- Remove Taskfile from `environment-dev-extra.yml` by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3597
- fixed incorrect syntax in static_build.yml by @Klaim in https://github.com/mamba-org/mamba/pull/3592
- fix: Skip misformatted configuration files by @ChaonengQuan in https://github.com/mamba-org/mamba/pull/3580
- Fix locking error by @Hind-M in https://github.com/mamba-org/mamba/pull/3572
- Fix test on windows by @Hind-M in https://github.com/mamba-org/mamba/pull/3555
- fix: Only register channels in the context once by @jjerphan in https://github.com/mamba-org/mamba/pull/3521
- windows shell init files use executable name by @Klaim in https://github.com/mamba-org/mamba/pull/3546
- Fix relative path in local channel by @Hind-M in https://github.com/mamba-org/mamba/pull/3540
- Correctly rename test to be run by @Hind-M in https://github.com/mamba-org/mamba/pull/3545
- Create empty base prefix with `env update` by @Hind-M in https://github.com/mamba-org/mamba/pull/3519
- fix: Use POSIX-compliant scripts by @jjerphan in https://github.com/mamba-org/mamba/pull/3522
- maint: Clarify `env` subcommand documentation in help menu (cont'd) by @jjerphan in https://github.com/mamba-org/mamba/pull/3539
- fix: Handle space in `mamba` and `micromamba` executable absolute paths by @NewUserHa in https://github.com/mamba-org/mamba/pull/3525
- maint: Clarify `env` subcommand documentation in help menu by @jjerphan in https://github.com/mamba-org/mamba/pull/3502
- Add recommendation if error with root prefix by @Hind-M in https://github.com/mamba-org/mamba/pull/3513
- fix: Ignore inline comment in environment specification by @jjerphan in https://github.com/mamba-org/mamba/pull/3512
- Replace `[System.IO.Path]::GetFileNameWithoutExtension` with `-replace` by @mleistner-bgr in https://github.com/mamba-org/mamba/pull/3510
- Fix warnings and co by @Hind-M in https://github.com/mamba-org/mamba/pull/3507

CI fixes and doc:

- ci: add brew toolchain test by @henryiii in https://github.com/mamba-org/mamba/pull/3625
- doc: show how to use advanced match specs in yaml spec by @corneliusroemer in https://github.com/mamba-org/mamba/pull/3384
- Doc: how to install specific Micromamba version by @truh in https://github.com/mamba-org/mamba/pull/3517
- doc: Homebrew currently only installs micromamba v1 by @corneliusroemer in https://github.com/mamba-org/mamba/pull/3499
- maint: Add dependabot config for GitHub workflows/actions by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3614
- maint: Unify `cmake` calls in workflows, build win static builds in p… by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3616
- docs: Update pieces of documentation after the release of mamba 2 by @jjerphan in https://github.com/mamba-org/mamba/pull/3610
- maint: Update clang-format to v19 by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3600
- Update pre-commit hooks except clang-format by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3599
- Force spinx v6 in readthedocs by @mathbunnyru in https://github.com/mamba-org/mamba/pull/3586
- Fix doc by @Hind-M in https://github.com/mamba-org/mamba/pull/3568
- [windows-vcpkg] Replace deprecated openssl with crypto feature with latest libarchive by @Hind-M in https://github.com/mamba-org/mamba/pull/3556
- maint: Unpin libcurl<8.10 by @jjerphan in https://github.com/mamba-org/mamba/pull/3548
- dev: Remove the use of Taskfile by @jjerphan in https://github.com/mamba-org/mamba/pull/3544
- Upgraded CI to micromamba 2.0.2 by @JohanMabille in https://github.com/mamba-org/mamba/pull/3497

libmamba 2.0.4alpha3 (November 21, 2024)
========================================

Expand Down
18 changes: 18 additions & 0 deletions libmamba/src/api/create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//
// The full license is in the file LICENSE, distributed with this software.

#include <iostream>

#include "mamba/api/configuration.hpp"
#include "mamba/api/create.hpp"
#include "mamba/api/install.hpp"
Expand All @@ -29,6 +31,7 @@ namespace mamba

auto& create_specs = config.at("specs").value<std::vector<std::string>>();
auto& use_explicit = config.at("explicit_install").value<bool>();
auto& json_format = config.at("json").get_cli_config<bool>();

auto channel_context = ChannelContext::make_conda_compatible(ctx);

Expand Down Expand Up @@ -78,6 +81,21 @@ namespace mamba
);
}
}
else
{
if (create_specs.empty() && json_format)
{
// Just print the JSON
nlohmann::json output;
output["actions"]["FETCH"] = nlohmann::json::array();
output["actions"]["PREFIX"] = ctx.prefix_params.target_prefix;
output["dry_run"] = true;
output["prefix"] = ctx.prefix_params.target_prefix;
output["success"] = true;
std::cout << output.dump(2) << std::endl;
return;
}
}

if (ctx.env_lockfile)
{
Expand Down
4 changes: 3 additions & 1 deletion libmamba/src/api/repoquery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ namespace mamba
config.at("use_default_prefix_fallback").set_value(true);
config.at("use_root_prefix_fallback").set_value(true);
config.at("target_prefix_checks")
.set_value(MAMBA_ALLOW_EXISTING_PREFIX | MAMBA_ALLOW_MISSING_PREFIX);
.set_value(
MAMBA_ALLOW_EXISTING_PREFIX | MAMBA_ALLOW_MISSING_PREFIX | MAMBA_ALLOW_NOT_ENV_PREFIX
);
config.load();

auto channel_context = ChannelContext::make_conda_compatible(ctx);
Expand Down
Loading

0 comments on commit e6fb1a7

Please sign in to comment.