Skip to content
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

micromamba: bump to 2.0.1 #195371

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions Formula/m/micromamba.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Micromamba < Formula
desc "Fast Cross-Platform Package Manager"
homepage "https://github.com/mamba-org/mamba"
url "https://github.com/mamba-org/mamba/archive/refs/tags/micromamba-1.5.10.tar.gz"
sha256 "38ee4658f66c5e4bf2c33cd3c9c0ebd01fe2e3a6da6ac619cc4702a9072dcc3c"
url "https://github.com/mamba-org/mamba/archive/refs/tags/micromamba-2.0.1.tar.gz"
sha256 "06482a7ed5b2ff3d0a9dd1eb9a924a3e67e0eae01b1c2a77be5eae05180e54ea"
license "BSD-3-Clause"
head "https://github.com/mamba-org/mamba.git", branch: "main"

Expand Down Expand Up @@ -34,6 +34,7 @@
depends_on "lz4"
depends_on "openssl@3"
depends_on "reproc"
depends_on "simdjson"
depends_on "xz"
depends_on "yaml-cpp"
depends_on "zstd"
Expand All @@ -44,33 +45,38 @@
uses_from_macos "krb5"
uses_from_macos "zlib"

def install

Check failure on line 48 in Formula/m/micromamba.rb

View workflow job for this annotation

GitHub Actions / Linux

`brew install --verbose --formula --build-bottle micromamba` failed on Linux!

/usr/include/c++/11/bits/hashtable_policy.h:1004:12: required from ‘struct std::__detail::_Insert<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, mamba::specs::Channel>, std::allocator<std::pair<const std::__cxx11::basic_string<char>, mamba::specs::Channel> >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char> >, std::hash<std::__cxx11::basic_string<char> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true>, false>’ /usr/include/c++/11/bits/hashtable.h:180:11: required from ‘class std::_Hashtable<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, mamba::specs::Channel>, std::allocator<std::pair<const std::__cxx11::basic_string<char>, mamba::specs::Channel> >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char> >, std::hash<std::__cxx11::basic_string<char> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >’ /usr/include/c++/11/bits/unordered_map.h:105:18: required from ‘class std::unordered_map<std::__cxx11::basic_string<char>, mamba::specs::Channel, std::hash<std::__cxx11::basic_string<char> >, std::equal_to<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, mamba::specs::Channel> > >’ /tmp/micromamba-20241025-5716-906661/mamba-micromamba-2.0.1/libmamba/include/mamba/util/weakening_map.hpp:26:11: required from ‘class mamba::util::weakening_map<std::unordered_map<std::__cxx11::basic_string<char>, mamba::specs::Channel, std::hash<std::__cxx11::basic_string<char> >, std::equal_to<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, mamba::specs::Channel> > >, mamba::specs::ChannelResolveParams::NameWeakener>’ /tmp/micromamba-20241025-5716-906661/mamba-micromamba-2.0.1/libmamba/include/mamba/specs/channel.hpp:56:40: required from here /usr/include/c++/11/bits/stl_pair.h:218:11: error: ‘std::pair<_T1, _T2>::second’ has incomplete type 218 | _T2 second; ///< The second member | ^~~~~~ In file included from /tmp/micromamba-20241025-5716-906661/mamba-micromamba-2.0.1/libmamba/src/specs/channel.cpp:11: /tmp/micromamba-20241025-5716-906661/mamba-micromamba-2.0.1/libmamba/include/mamba/specs/channel.hpp:25:11: note: forward declaration of ‘class mamba::specs::Channel’ 25 | class Channel; | ^~~~~~~ /tmp/micromamba-20241025-5716-906661/mamba-micromamba-2.0.1/libmamba/src/specs/channel.cpp: In function ‘mamba::specs::Channel::channel_list mamba::specs::{anonymous}::resolve_name(mamba::specs::UnresolvedChannel&&, mamba::specs::ChannelResolveParamsView)’: /tmp/micromamba-20241025-5716-906661/mamba-micromamba-2.0.1/libmamba/src/specs/channel.cpp:471:103: error: could not convert ‘{<expression error>}’ from ‘<brace-enclosed initializer list>’ to ‘mamba::specs::Channel::channel_list’ {aka ‘std::vector<mamba::specs::Channel>’} 471 | return { resolve_name_in_custom_channel(std::move(uc), params, it->first, it->second) }; | ^ | | | <brace-enclosed initializer list> [ 26%] Building CXX object libmamba/CMakeFiles/libmamba-dyn.dir/src/specs/glob_spec.cpp.o cd /tmp/micromamba-20241025-5716-906661/mamba-micromamba-2.0.1/build/libmamba && /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-11 -DFMT_SHARED -DLIBMAMBA_EXPORTS -DMAMBA_USE_INSTALL_PREFIX_AS_BASE -DSIMDJSON_THREADS_ENABLED=1 -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -DSPDLOG_FMT_EXTERNAL -Dlibmamba_dyn_EXPORTS -I/tmp/micromamba-2

Check failure on line 48 in Formula/m/micromamba.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

`brew install --verbose --formula --build-bottle micromamba` failed on macOS Ventura (13) on Apple Silicon!

cd /tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/build/libmamba && /opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -DFMT_SHARED -DLIBMAMBA_EXPORTS -DMAMBA_USE_INSTALL_PREFIX_AS_BASE -DSIMDJSON_THREADS_ENABLED=1 -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -DSPDLOG_FMT_EXTERNAL -Dlibmamba_dyn_EXPORTS -I/tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/include -I/tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/src -I/tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/ext/solv-cpp/include -isystem /opt/homebrew/share -O3 -DNDEBUG -std=gnu++17 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -fPIC -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wunreachable-code -Wuninitialized -MD -MT libmamba/CMakeFiles/libmamba-dyn.dir/src/core/transaction.cpp.o -MF CMakeFiles/libmamba-dyn.dir/src/core/transaction.cpp.o.d -o CMakeFiles/libmamba-dyn.dir/src/core/transaction.cpp.o -c /tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/src/core/transaction.cpp [ 64%] Building CXX object libmamba/CMakeFiles/libmamba-dyn.dir/src/core/util.cpp.o cd /tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/build/libmamba && /opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -DFMT_SHARED -DLIBMAMBA_EXPORTS -DMAMBA_USE_INSTALL_PREFIX_AS_BASE -DSIMDJSON_THREADS_ENABLED=1 -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -DSPDLOG_FMT_EXTERNAL -Dlibmamba_dyn_EXPORTS -I/tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/include -I/tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/src -I/tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/ext/solv-cpp/include -isystem /opt/homebrew/share -O3 -DNDEBUG -std=gnu++17 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -fPIC -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wunreachable-code -Wuninitialized -MD -MT libmamba/CMakeFiles/libmamba-dyn.dir/src/core/util.cpp.o -MF CMakeFiles/libmamba-dyn.dir/src/core/util.cpp.o.d -o CMakeFiles/libmamba-dyn.dir/src/core/util.cpp.o -c /tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/src/core/util.cpp [ 65%] Building CXX object libmamba/CMakeFiles/libmamba-dyn.dir/src/core/fsutil.cpp.o cd /tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/build/libmamba && /opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -DFMT_SHARED -DLIBMAMBA_EXPORTS -DMAMBA_USE_INSTALL_PREFIX_AS_BASE -DSIMDJSON_THREADS_ENABLED=1 -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -DSPDLOG_FMT_EXTERNAL -Dlibmamba_dyn_EXPORTS -I/tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/include -I/tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/src -I/tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/ext/solv-cpp/include -isystem /opt/homebrew/share -O3 -DNDEBUG -std=gnu++17 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -fPIC -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wunreachable-code -Wuninitialized -MD -MT libmamba/CMakeFiles/libmamba-dyn.dir/src/core/fsutil.cpp.o -MF CMakeFiles/libmamba-dyn.dir/src/core/fsutil.cpp.o.d -o CMakeFiles/libmamba-dyn.dir/src/core/fsutil.cpp.o -c /tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/src/core/fsutil.cpp /tmp/micromamba-20241025-6758-psgcn7/mamba-micromamba-2.0.1/libmamba/src/core/transaction.cpp:703:36: error: no viable constructor or deduction guide for deduction of template arguments of 'packaged_task' std::packaged_task task{ [=] { return it->run(); } }; ^ /Li

Check failure on line 48 in Formula/m/micromamba.rb

View workflow job for this annotation

GitHub Actions / macOS 13-x86_64

`brew install --verbose --formula --build-bottle micromamba` failed on macOS Ventura (13)!

cd /tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/build/libmamba && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DFMT_SHARED -DLIBMAMBA_EXPORTS -DMAMBA_USE_INSTALL_PREFIX_AS_BASE -DSIMDJSON_THREADS_ENABLED=1 -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -DSPDLOG_FMT_EXTERNAL -Dlibmamba_dyn_EXPORTS -I/tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/include -I/tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/src -I/tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/ext/solv-cpp/include -isystem /usr/local/share -O3 -DNDEBUG -std=gnu++17 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -fPIC -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wunreachable-code -Wuninitialized -MD -MT libmamba/CMakeFiles/libmamba-dyn.dir/src/core/thread_utils.cpp.o -MF CMakeFiles/libmamba-dyn.dir/src/core/thread_utils.cpp.o.d -o CMakeFiles/libmamba-dyn.dir/src/core/thread_utils.cpp.o -c /tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/src/core/thread_utils.cpp [ 64%] Building CXX object libmamba/CMakeFiles/libmamba-dyn.dir/src/core/transaction.cpp.o cd /tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/build/libmamba && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DFMT_SHARED -DLIBMAMBA_EXPORTS -DMAMBA_USE_INSTALL_PREFIX_AS_BASE -DSIMDJSON_THREADS_ENABLED=1 -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -DSPDLOG_FMT_EXTERNAL -Dlibmamba_dyn_EXPORTS -I/tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/include -I/tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/src -I/tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/ext/solv-cpp/include -isystem /usr/local/share -O3 -DNDEBUG -std=gnu++17 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -fPIC -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wunreachable-code -Wuninitialized -MD -MT libmamba/CMakeFiles/libmamba-dyn.dir/src/core/transaction.cpp.o -MF CMakeFiles/libmamba-dyn.dir/src/core/transaction.cpp.o.d -o CMakeFiles/libmamba-dyn.dir/src/core/transaction.cpp.o -c /tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/src/core/transaction.cpp [ 64%] Building CXX object libmamba/CMakeFiles/libmamba-dyn.dir/src/core/util.cpp.o cd /tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/build/libmamba && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DFMT_SHARED -DLIBMAMBA_EXPORTS -DMAMBA_USE_INSTALL_PREFIX_AS_BASE -DSIMDJSON_THREADS_ENABLED=1 -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -DSPDLOG_FMT_EXTERNAL -Dlibmamba_dyn_EXPORTS -I/tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/include -I/tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/src -I/tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/ext/solv-cpp/include -isystem /usr/local/share -O3 -DNDEBUG -std=gnu++17 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -fPIC -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wunreachable-code -Wuninitialized -MD -MT libmamba/CMakeFiles/libmamba-dyn.dir/src/core/util.cpp.o -MF CMakeFiles/libmamba-dyn.dir/src/core/util.cpp.o.d -o CMakeFiles/libmamba-dyn.dir/src/core/util.cpp.o -c /tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/src/core/util.cpp /tmp/micromamba-20241026-6762-a76vry/mamba-micromamba-2.0.1/libmamba/src/core/transaction.cpp:703:36: error: no viable constructor or deduction guide for deduction of template arguments of 'packaged_task' std::packaged_task task{ [=] { return it->run(); } }; ^ /
args = %W[
-DBUILD_LIBMAMBA=ON
-DBUILD_SHARED=ON
-DBUILD_MICROMAMBA=ON
carlocab marked this conversation as resolved.
Show resolved Hide resolved
-DMICROMAMBA_LINKAGE=DYNAMIC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just ship mamba instead if that's the binary that supports shared linkage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the formula be named mamba then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we could do that. Though maybe we should just add a new mamba formula and deprecate this one.

I'd have suggested a formula rename, but you've said that micromamba and mamba do not expose the same interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm only interested in the new interface, the old "conda-compatible" one doesn't really have any reason to exist, IMO, now that conda has a (default) libmamba solver. But the micromamba interface is cleaner and using it is better in CI. I'll see if I can get any devs to comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I'm now wrong:

Mamba 2.0 Changes
Command Line Executables

Mamba (executable)

mamba, previously a Python executable mixing libmambapy, conda, and code to bridge both project is being replace by a fully C++ executable based on libmamba solely.

It now presents the same user interface and experience as micromamba.

https://mamba.readthedocs.io/en/latest/developer_zone/changes-2.0.html

Okay, that's a breaking change, and so I think renaming to mamba and just providing mamba is likely the correct path forward.

In my defense, the docs still claim it has a different interface in several places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I just rename the formula in the PR? Or is there more to do?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's just the same now can't we just build mamba and create a symlink?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but should the formula still be renamed? Or an alias added (since both are shipped in one formula, that seems best?)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alias is probably simpler.

-DBUILD_STATIC=OFF
-DBUILD_MAMBA=ON
-DCMAKE_INSTALL_RPATH=#{rpath}
]

system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
# Upstream chooses names based on static or dynamic linking,
# but as of 2.0 they provide identical interfaces.
bin.install_symlink "mamba" => "micromamba"
end

def caveats
<<~EOS
Please run the following to setup your shell:
#{opt_bin}/micromamba shell init -s <your-shell> -p ~/micromamba
#{opt_bin}/mamba shell init -s <your-shell> -p ~/mamba
and restart your terminal.
EOS
end

test do
ENV["MAMBA_ROOT_PREFIX"] = testpath.to_s
assert_match version.to_s, shell_output("#{bin}/mamba --version").strip
henryiii marked this conversation as resolved.
Show resolved Hide resolved
assert_match version.to_s, shell_output("#{bin}/micromamba --version").strip

python_version = "3.9.13"
system bin/"micromamba", "create", "-n", "test", "python=#{python_version}", "-y", "-c", "conda-forge"
assert_match "Python #{python_version}", shell_output("#{bin}/micromamba run -n test python --version").strip
system bin/"mamba", "create", "-n", "test", "python=#{python_version}", "-y", "-c", "conda-forge"
assert_match "Python #{python_version}", shell_output("#{bin}/mamba run -n test python --version").strip
end
end
Loading