mirror of https://github.com/mamba-org/mamba.git
Enforce space between definitions (#3049)
This commit is contained in:
parent
f36c3f222e
commit
21675b6517
|
@ -69,6 +69,7 @@ PointerAlignment: Left
|
|||
QualifierAlignment: Custom # Experimental
|
||||
QualifierOrder: [inline, static, constexpr, const, volatile, type]
|
||||
ReflowComments: 'true'
|
||||
SeparateDefinitionBlocks: Always
|
||||
SortIncludes: CaseInsensitive
|
||||
SortUsingDeclarations: Never
|
||||
SpaceAfterCStyleCast: 'true'
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#ifndef MAMBA_API_CLEAN_HPP
|
||||
#define MAMBA_API_CLEAN_HPP
|
||||
|
||||
|
||||
namespace mamba
|
||||
{
|
||||
const int MAMBA_CLEAN_ALL = 1 << 0;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#ifndef MAMBA_API_CONFIG_HPP
|
||||
#define MAMBA_API_CONFIG_HPP
|
||||
|
||||
|
||||
namespace mamba
|
||||
{
|
||||
class Configuration;
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "mamba/fs/filesystem.hpp"
|
||||
#include "mamba/util/environment.hpp"
|
||||
|
||||
|
||||
namespace mamba
|
||||
{
|
||||
class Configuration;
|
||||
|
@ -407,6 +406,7 @@ namespace mamba
|
|||
{
|
||||
return m_context;
|
||||
}
|
||||
|
||||
const Context& context() const
|
||||
{
|
||||
return m_context;
|
||||
|
|
|
@ -27,22 +27,27 @@ namespace mamba
|
|||
storage_type m_storage;
|
||||
|
||||
cli_config() = default;
|
||||
|
||||
cli_config(const T& value)
|
||||
: m_storage(value)
|
||||
{
|
||||
}
|
||||
|
||||
storage_type& storage()
|
||||
{
|
||||
return m_storage;
|
||||
}
|
||||
|
||||
bool has_value() const
|
||||
{
|
||||
return m_storage.has_value();
|
||||
}
|
||||
|
||||
const T& value() const
|
||||
{
|
||||
return m_storage.value();
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
m_storage.reset();
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#ifndef MAMBA_API_UPDATE_HPP
|
||||
#define MAMBA_API_UPDATE_HPP
|
||||
|
||||
|
||||
namespace mamba
|
||||
{
|
||||
class Configuration;
|
||||
|
|
|
@ -112,6 +112,7 @@ namespace mamba
|
|||
: Activator(context)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~PosixActivator() = default;
|
||||
|
||||
std::string script(const EnvironmentTransform& env_transform) override;
|
||||
|
@ -133,6 +134,7 @@ namespace mamba
|
|||
: Activator(context)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~CshActivator() = default;
|
||||
|
||||
std::string script(const EnvironmentTransform& env_transform) override;
|
||||
|
@ -154,6 +156,7 @@ namespace mamba
|
|||
: Activator(context)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~CmdExeActivator() = default;
|
||||
|
||||
std::string script(const EnvironmentTransform& env_transform) override;
|
||||
|
@ -175,6 +178,7 @@ namespace mamba
|
|||
: Activator(context)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~PowerShellActivator() = default;
|
||||
|
||||
std::string script(const EnvironmentTransform& env_transform) override;
|
||||
|
@ -196,6 +200,7 @@ namespace mamba
|
|||
: Activator(context)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~XonshActivator() = default;
|
||||
|
||||
std::string script(const EnvironmentTransform& env_transform) override;
|
||||
|
@ -217,6 +222,7 @@ namespace mamba
|
|||
: Activator(context)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~FishActivator() = default;
|
||||
|
||||
std::string script(const EnvironmentTransform& env_transform) override;
|
||||
|
@ -238,6 +244,7 @@ namespace mamba
|
|||
: Activator(context)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~NuActivator() = default;
|
||||
|
||||
std::string script(const EnvironmentTransform& env_transform) override;
|
||||
|
|
|
@ -100,6 +100,7 @@ namespace mamba
|
|||
{
|
||||
return m_packages;
|
||||
}
|
||||
|
||||
const Meta& get_metadata() const
|
||||
{
|
||||
return m_metadata;
|
||||
|
|
|
@ -99,7 +99,6 @@ namespace mamba
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Closes this executor:
|
||||
// Only returns once all tasks scheduled before this call are finished
|
||||
// and all owned execution resources (aka threads) are released.
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace mamba
|
|||
{
|
||||
class Context;
|
||||
class TransactionContext;
|
||||
|
||||
namespace fs
|
||||
{
|
||||
class u8path;
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace mamba
|
|||
class Context;
|
||||
class ChannelContext;
|
||||
class PrefixData;
|
||||
|
||||
namespace fs
|
||||
{
|
||||
class u8path;
|
||||
|
|
|
@ -22,6 +22,7 @@ namespace mamba
|
|||
LockFile lock_proc_dir();
|
||||
|
||||
void daemonize();
|
||||
|
||||
class ScopedProcFile
|
||||
{
|
||||
const fs::u8path location;
|
||||
|
|
|
@ -76,12 +76,15 @@ namespace mamba
|
|||
struct RootNode
|
||||
{
|
||||
};
|
||||
|
||||
struct PackageNode : PackageInfo
|
||||
{
|
||||
};
|
||||
|
||||
struct UnresolvedDependencyNode : MatchSpec
|
||||
{
|
||||
};
|
||||
|
||||
struct ConstraintNode : MatchSpec
|
||||
{
|
||||
};
|
||||
|
|
|
@ -27,29 +27,35 @@ namespace mamba
|
|||
{
|
||||
PackageInfo what;
|
||||
};
|
||||
|
||||
struct Upgrade
|
||||
{
|
||||
PackageInfo remove;
|
||||
PackageInfo install;
|
||||
};
|
||||
|
||||
struct Downgrade
|
||||
{
|
||||
PackageInfo remove;
|
||||
PackageInfo install;
|
||||
};
|
||||
|
||||
struct Change
|
||||
{
|
||||
PackageInfo remove;
|
||||
PackageInfo install;
|
||||
};
|
||||
|
||||
struct Reinstall
|
||||
{
|
||||
PackageInfo what;
|
||||
};
|
||||
|
||||
struct Remove
|
||||
{
|
||||
PackageInfo remove;
|
||||
};
|
||||
|
||||
struct Install
|
||||
{
|
||||
PackageInfo install;
|
||||
|
|
|
@ -55,7 +55,6 @@ namespace mamba
|
|||
std::string description;
|
||||
};
|
||||
|
||||
|
||||
class MSolver
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -42,6 +42,7 @@ namespace mamba
|
|||
public:
|
||||
|
||||
thread_interrupted() = default;
|
||||
|
||||
const char* what() const throw()
|
||||
{
|
||||
return "Thread interrupted";
|
||||
|
|
|
@ -99,7 +99,6 @@ namespace mamba
|
|||
// result == must_persist && must_persist_temporary_directories() == must_persist
|
||||
bool set_persist_temporary_directories(bool will_persist);
|
||||
|
||||
|
||||
class TemporaryDirectory
|
||||
{
|
||||
public:
|
||||
|
@ -327,7 +326,6 @@ namespace mamba
|
|||
tl::expected<std::shared_ptr<LockFileOwner>, mamba_error> impl;
|
||||
};
|
||||
|
||||
|
||||
void split_package_extension(const std::string& file, std::string& name, std::string& extension);
|
||||
|
||||
std::string
|
||||
|
|
|
@ -295,7 +295,6 @@ namespace mamba::fs
|
|||
return *this;
|
||||
}
|
||||
|
||||
|
||||
//---- Conversions ----
|
||||
|
||||
// Returns an utf-8 string.
|
||||
|
@ -519,7 +518,6 @@ namespace mamba::fs
|
|||
return left.m_path != right;
|
||||
}
|
||||
|
||||
|
||||
//---- State ----
|
||||
|
||||
bool empty() const noexcept
|
||||
|
@ -763,6 +761,7 @@ namespace mamba::fs
|
|||
{
|
||||
return iter;
|
||||
}
|
||||
|
||||
inline directory_iterator end(directory_iterator) noexcept
|
||||
{
|
||||
return {};
|
||||
|
@ -934,7 +933,6 @@ namespace mamba::fs
|
|||
return std::filesystem::create_directory(path, attributes, std::forward<OtherArgs>(args)...);
|
||||
}
|
||||
|
||||
|
||||
// void create_directory_symlink(const path& to, const path& new_symlink);
|
||||
// void create_directory_symlink(const path& to, const path& new_symlink, error_code& ec)
|
||||
// noexcept;
|
||||
|
@ -980,7 +978,6 @@ namespace mamba::fs
|
|||
std::filesystem::current_path(path, std::forward<OtherArgs>(args)...);
|
||||
}
|
||||
|
||||
|
||||
// bool equivalent(const path& p1, const path& p2);
|
||||
// bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
|
||||
template <typename... OtherArgs>
|
||||
|
|
|
@ -169,7 +169,6 @@ namespace mamba::specs
|
|||
*/
|
||||
void from_json(const nlohmann::json& j, RepoDataPackage& p);
|
||||
|
||||
|
||||
/** Information about subdirectory of channel in the Conda RepoData. */
|
||||
struct ChannelInfo
|
||||
{
|
||||
|
|
|
@ -32,12 +32,14 @@ namespace mamba::util
|
|||
|
||||
using branch_type = Branch;
|
||||
using leaf_type = Leaf;
|
||||
|
||||
struct branch_node
|
||||
{
|
||||
branch_type data;
|
||||
std::size_t left_child = 0;
|
||||
std::size_t right_child = 0;
|
||||
};
|
||||
|
||||
using leaf_node = leaf_type;
|
||||
using node_type = std::variant<branch_node, leaf_node>;
|
||||
using node_list = std::vector<node_type>;
|
||||
|
|
|
@ -105,9 +105,11 @@ namespace mamba::util
|
|||
private:
|
||||
|
||||
using postfix_parser_type = PostfixParser<variable_type, operator_type>;
|
||||
|
||||
struct LeftParenthesis
|
||||
{
|
||||
};
|
||||
|
||||
using operator_or_parenthesis_type = std::variant<operator_type, LeftParenthesis>;
|
||||
using operator_stack_type = std::vector<operator_or_parenthesis_type>;
|
||||
|
||||
|
|
|
@ -144,6 +144,7 @@ namespace mamba::util
|
|||
void start_node(node_id, const graph_t&)
|
||||
{
|
||||
}
|
||||
|
||||
void finish_node(node_id, const graph_t&)
|
||||
{
|
||||
}
|
||||
|
@ -151,15 +152,19 @@ namespace mamba::util
|
|||
void start_edge(node_id, node_id, const graph_t&)
|
||||
{
|
||||
}
|
||||
|
||||
void tree_edge(node_id, node_id, const graph_t&)
|
||||
{
|
||||
}
|
||||
|
||||
void back_edge(node_id, node_id, const graph_t&)
|
||||
{
|
||||
}
|
||||
|
||||
void forward_or_cross_edge(node_id, node_id, const graph_t&)
|
||||
{
|
||||
}
|
||||
|
||||
void finish_edge(node_id, node_id, const graph_t&)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -67,7 +67,6 @@ namespace mamba::util
|
|||
using difference_type = D;
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
|
||||
|
||||
friend derived_type operator--(derived_type& d, int)
|
||||
{
|
||||
derived_type tmp(d);
|
||||
|
@ -217,7 +216,6 @@ namespace mamba::util
|
|||
template <class Predicate, class Iterator>
|
||||
using select_filter_iterator_base_t = typename select_filter_iterator_base<Predicate, Iterator>::type;
|
||||
|
||||
|
||||
template <class Predicate, class Iterator>
|
||||
class filter_iterator : public select_filter_iterator_base_t<Predicate, Iterator>
|
||||
{
|
||||
|
|
|
@ -522,11 +522,13 @@ namespace mamba::util
|
|||
struct has_reserve : std::false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct has_reserve<T, std::void_t<decltype(std::declval<T>().reserve(std::size_t()))>>
|
||||
: std::true_type
|
||||
{
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline constexpr bool has_reserve_v = has_reserve<T>::value;
|
||||
|
||||
|
@ -534,6 +536,7 @@ namespace mamba::util
|
|||
std::size_t length(const wchar_t* s);
|
||||
std::size_t length(const char c);
|
||||
std::size_t length(const wchar_t c);
|
||||
|
||||
template <class T>
|
||||
std::size_t length(const T& s)
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@ namespace mamba::util
|
|||
inline static constexpr struct yes_type
|
||||
{
|
||||
} yes = {};
|
||||
|
||||
inline static constexpr struct no_type
|
||||
{
|
||||
} no = {};
|
||||
|
@ -46,6 +47,7 @@ namespace mamba::util
|
|||
inline static constexpr struct yes_type
|
||||
{
|
||||
} yes = {};
|
||||
|
||||
inline static constexpr struct no_type
|
||||
{
|
||||
} no = {};
|
||||
|
|
|
@ -29,7 +29,6 @@ namespace mamba::validation
|
|||
void to_json(nlohmann::json& j, const Key& k);
|
||||
void from_json(const nlohmann::json& j, Key& k);
|
||||
|
||||
|
||||
/**
|
||||
* Representation of a role signature.
|
||||
*
|
||||
|
@ -48,7 +47,6 @@ namespace mamba::validation
|
|||
|
||||
[[nodiscard]] auto operator<(const RoleSignature& rs1, const RoleSignature& rs2) -> bool;
|
||||
|
||||
|
||||
/**
|
||||
* Store key IDs and threshold for a role.
|
||||
*
|
||||
|
@ -63,7 +61,6 @@ namespace mamba::validation
|
|||
void to_json(nlohmann::json& j, const RoleKeys& rk);
|
||||
void from_json(const nlohmann::json& j, RoleKeys& rk);
|
||||
|
||||
|
||||
/**
|
||||
* Store key values and threshold for role. Assumes key scheme/type is `ed25519`.
|
||||
*/
|
||||
|
@ -78,7 +75,6 @@ namespace mamba::validation
|
|||
void to_json(nlohmann::json& j, const RolePubKeys& rk);
|
||||
void from_json(const nlohmann::json& j, RolePubKeys& rk);
|
||||
|
||||
|
||||
/**
|
||||
* Store full keys and threshold for role.
|
||||
*/
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <nlohmann/json_fwd.hpp>
|
||||
|
||||
#include "mamba/fs/filesystem.hpp"
|
||||
|
||||
namespace mamba
|
||||
{
|
||||
class Context;
|
||||
|
|
|
@ -77,7 +77,6 @@ namespace mamba::validation
|
|||
auto operator==(const SpecBase& sv1, const SpecBase& sv2) -> bool;
|
||||
auto operator!=(const SpecBase& sv1, const SpecBase& sv2) -> bool;
|
||||
|
||||
|
||||
/**
|
||||
* Base class for role implementation.
|
||||
*/
|
||||
|
@ -192,7 +191,6 @@ namespace mamba::validation
|
|||
virtual auto create_update(const nlohmann::json& j) -> std::unique_ptr<RootRole> = 0;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Interface that performs validity checks
|
||||
* on a repository packages index.
|
||||
|
|
|
@ -39,7 +39,6 @@ namespace mamba::validation::v0_6
|
|||
[[nodiscard]] auto upgradable() const -> bool override;
|
||||
};
|
||||
|
||||
|
||||
class V06RoleBaseExtension
|
||||
{
|
||||
public:
|
||||
|
@ -154,7 +153,6 @@ namespace mamba::validation::v0_6
|
|||
void set_defined_roles(std::map<std::string, RolePubKeys> keys);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The Update Framework 'pkg_mgr' role implementation.
|
||||
*
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "mamba/api/configuration.hpp"
|
||||
#include "mamba/util/path_manip.hpp"
|
||||
|
||||
|
||||
namespace mamba
|
||||
{
|
||||
void config_describe(Configuration& config)
|
||||
|
|
|
@ -74,7 +74,6 @@ namespace mamba
|
|||
return m_rc_configured && !m_config->context().src_params.no_rc;
|
||||
}
|
||||
|
||||
|
||||
bool ConfigurableImplBase::is_config_loading() const
|
||||
{
|
||||
return m_config == nullptr || m_config->is_loading();
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "mamba/core/context.hpp"
|
||||
#include "mamba/core/util.hpp"
|
||||
|
||||
|
||||
namespace mamba
|
||||
{
|
||||
void create(Configuration& config)
|
||||
|
|
|
@ -353,6 +353,7 @@ namespace mamba
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
EnvironmentTransform Activator::build_reactivate()
|
||||
{
|
||||
std::string conda_prefix;
|
||||
|
@ -910,7 +911,6 @@ namespace mamba
|
|||
return { "prompt", conda_prompt_modifier + prompt };
|
||||
}
|
||||
|
||||
|
||||
std::string CshActivator::shell_extension()
|
||||
{
|
||||
return ".csh";
|
||||
|
@ -936,7 +936,6 @@ namespace mamba
|
|||
return m_context.prefix_params.root_prefix / "etc" / "profile.d" / "micromamba.csh";
|
||||
}
|
||||
|
||||
|
||||
std::string CmdExeActivator::shell_extension()
|
||||
{
|
||||
return ".bat";
|
||||
|
|
|
@ -51,6 +51,7 @@ namespace mamba
|
|||
struct ZstdStream
|
||||
{
|
||||
static constexpr size_t BUFFER_SIZE = 256000;
|
||||
|
||||
ZstdStream(curl_write_callback lwrite_callback, void* write_callback_data)
|
||||
: stream(ZSTD_createDCtx())
|
||||
, m_write_callback(lwrite_callback)
|
||||
|
|
|
@ -294,7 +294,6 @@ namespace mamba
|
|||
m_authentication_infos_loaded = true;
|
||||
}
|
||||
|
||||
|
||||
std::string env_name(const Context& context, const fs::u8path& prefix)
|
||||
{
|
||||
if (prefix.empty())
|
||||
|
@ -321,7 +320,6 @@ namespace mamba
|
|||
return env_name(context, context.prefix_params.target_prefix);
|
||||
}
|
||||
|
||||
|
||||
void Context::debug_print() const
|
||||
{
|
||||
#define PRINT_CTX(xout, xname) fmt::print(xout, "{}: {}\n", #xname, xname)
|
||||
|
|
|
@ -561,7 +561,6 @@ namespace mamba
|
|||
p_handle = nullptr;
|
||||
}
|
||||
|
||||
|
||||
CURLMultiHandle::CURLMultiHandle(CURLMultiHandle&& rhs)
|
||||
: p_handle(rhs.p_handle)
|
||||
, m_max_parallel_downloads(rhs.m_max_parallel_downloads)
|
||||
|
|
|
@ -46,7 +46,6 @@ namespace mamba
|
|||
maybe_dump_backtrace(m_error_code);
|
||||
}
|
||||
|
||||
|
||||
mamba_error_code mamba_error::error_code() const noexcept
|
||||
{
|
||||
return m_error_code;
|
||||
|
@ -81,7 +80,6 @@ namespace mamba
|
|||
return m_aggregated_message.c_str();
|
||||
}
|
||||
|
||||
|
||||
tl::unexpected<mamba_error> make_unexpected(const char* msg, mamba_error_code ec)
|
||||
{
|
||||
return tl::make_unexpected(mamba_error(msg, ec));
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "mamba/core/transaction_context.hpp"
|
||||
#include "mamba/util/string.hpp"
|
||||
|
||||
|
||||
namespace mamba
|
||||
{
|
||||
namespace detail
|
||||
|
|
|
@ -312,13 +312,11 @@ namespace mamba
|
|||
clear_singleton();
|
||||
}
|
||||
|
||||
|
||||
const Context& Console::context() const
|
||||
{
|
||||
return p_data->m_context;
|
||||
}
|
||||
|
||||
|
||||
ConsoleStream Console::stream()
|
||||
{
|
||||
return ConsoleStream();
|
||||
|
|
|
@ -445,7 +445,6 @@ namespace mamba
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
fs::u8path MultiPackageCache::get_extracted_dir_path(const PackageInfo& s, bool return_empty)
|
||||
{
|
||||
const std::string pkg(s.str());
|
||||
|
|
|
@ -403,6 +403,7 @@ namespace mamba
|
|||
safe_invoke(*cb, event);
|
||||
}
|
||||
}
|
||||
|
||||
/***************************
|
||||
* PackageFetcherSemaphore *
|
||||
***************************/
|
||||
|
|
|
@ -34,7 +34,6 @@ namespace mamba
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
class extraction_guard
|
||||
{
|
||||
public:
|
||||
|
@ -76,6 +75,7 @@ namespace mamba
|
|||
|
||||
scoped_archive_read()
|
||||
: scoped_archive_read(archive_read_new()){};
|
||||
|
||||
static scoped_archive_read read_disk()
|
||||
{
|
||||
return scoped_archive_read(archive_read_disk_new());
|
||||
|
@ -171,7 +171,6 @@ namespace mamba
|
|||
archive_entry* m_entry;
|
||||
};
|
||||
|
||||
|
||||
void stream_extract_archive(
|
||||
scoped_archive_read& a,
|
||||
const fs::u8path& destination,
|
||||
|
@ -610,7 +609,6 @@ namespace mamba
|
|||
fs::current_path(prev_path);
|
||||
}
|
||||
|
||||
|
||||
static la_ssize_t file_read(archive*, void* client_data, const void** buff)
|
||||
{
|
||||
conda_extract_context* mine = static_cast<conda_extract_context*>(client_data);
|
||||
|
@ -634,7 +632,6 @@ namespace mamba
|
|||
return archive_read_open1(a);
|
||||
}
|
||||
|
||||
|
||||
void extract_conda(
|
||||
const fs::u8path& file,
|
||||
const fs::u8path& dest_dir,
|
||||
|
@ -824,7 +821,6 @@ namespace mamba
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool validate(const fs::u8path& pkg_folder, const ValidationOptions& options)
|
||||
{
|
||||
auto safety_checks = options.safety_checks;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "mamba/core/prefix_data.hpp"
|
||||
#include "mamba/util/string.hpp"
|
||||
|
||||
|
||||
namespace mamba
|
||||
{
|
||||
std::string python_pin(PrefixData& prefix_data, const std::vector<std::string>& specs)
|
||||
|
|
|
@ -174,7 +174,6 @@ namespace mamba
|
|||
return o.str();
|
||||
}
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
void print_formatted_field_repr(
|
||||
|
|
|
@ -248,10 +248,8 @@ namespace mamba
|
|||
void sort_bars(bool max_height_exceeded);
|
||||
};
|
||||
|
||||
|
||||
std::unique_ptr<ProgressBarManager> make_progress_bar_manager(ProgressBarMode);
|
||||
|
||||
|
||||
/*********************************
|
||||
* Internal use of progress bars *
|
||||
*********************************/
|
||||
|
|
|
@ -798,9 +798,11 @@ namespace mamba
|
|||
void tree_edge(node_id, node_id, const graph_type&)
|
||||
{
|
||||
}
|
||||
|
||||
void back_edge(node_id, node_id, const graph_type&)
|
||||
{
|
||||
}
|
||||
|
||||
void forward_or_cross_edge(node_id, node_id to, const graph_type& g)
|
||||
{
|
||||
print_prefix(to);
|
||||
|
|
|
@ -329,7 +329,6 @@ namespace mamba
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void set_solvables_url(solv::ObjRepoView repo, const std::string& repo_url)
|
||||
{
|
||||
// WARNING cannot call ``url()`` at this point because it has not been internalized.
|
||||
|
|
|
@ -40,7 +40,6 @@ extern "C"
|
|||
#include "mamba/util/environment.hpp"
|
||||
#include "mamba/util/string.hpp"
|
||||
|
||||
|
||||
namespace mamba
|
||||
{
|
||||
|
||||
|
|
|
@ -272,11 +272,13 @@ namespace mamba
|
|||
struct has_name : std::false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct has_name<T, std::void_t<decltype(std::invoke(&T::name, std::declval<T>()))>>
|
||||
: std::true_type
|
||||
{
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline constexpr bool has_name_v = has_name<T>::value;
|
||||
|
||||
|
@ -1104,7 +1106,6 @@ namespace mamba
|
|||
return out_status;
|
||||
}
|
||||
|
||||
|
||||
auto TreeDFS::visit_node_impl(node_id id, const TreeNode& ongoing, TreeNodeIter out)
|
||||
-> std::pair<TreeNodeIter, Status>
|
||||
{
|
||||
|
|
|
@ -283,7 +283,6 @@ namespace mamba
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
std::string
|
||||
rcfile_content(const fs::u8path& env_prefix, const std::string& shell, const fs::u8path& mamba_exe)
|
||||
{
|
||||
|
|
|
@ -837,6 +837,7 @@ namespace mamba
|
|||
namespace
|
||||
{
|
||||
using FetcherList = std::vector<PackageFetcher>;
|
||||
|
||||
// Free functions instead of private method to avoid exposing downloaders
|
||||
// and package fetchers in the header. Ideally we may want a pimpl or
|
||||
// a private implementation header when we refactor this class.
|
||||
|
|
|
@ -80,6 +80,7 @@ namespace mamba
|
|||
{
|
||||
return persist_temporary_files;
|
||||
}
|
||||
|
||||
bool set_persist_temporary_files(bool new_value)
|
||||
{
|
||||
return persist_temporary_files.exchange(new_value);
|
||||
|
@ -89,6 +90,7 @@ namespace mamba
|
|||
{
|
||||
return persist_temporary_directories;
|
||||
}
|
||||
|
||||
bool set_persist_temporary_directories(bool new_value)
|
||||
{
|
||||
return persist_temporary_directories.exchange(new_value);
|
||||
|
@ -654,7 +656,6 @@ namespace mamba
|
|||
return prepend(p.c_str(), start, newline);
|
||||
}
|
||||
|
||||
|
||||
class LockFileOwner
|
||||
{
|
||||
public:
|
||||
|
@ -985,6 +986,7 @@ namespace mamba
|
|||
{
|
||||
return m_is_file_locking_allowed;
|
||||
}
|
||||
|
||||
bool allow_file_locking(bool allow)
|
||||
{
|
||||
return m_is_file_locking_allowed.exchange(allow);
|
||||
|
@ -994,6 +996,7 @@ namespace mamba
|
|||
{
|
||||
return m_default_lock_timeout;
|
||||
}
|
||||
|
||||
std::chrono::seconds set_file_locking_timeout(const std::chrono::seconds& new_timeout)
|
||||
{
|
||||
return m_default_lock_timeout.exchange(new_timeout);
|
||||
|
@ -1109,6 +1112,7 @@ namespace mamba
|
|||
{
|
||||
return files_locked_by_this_process.default_file_locking_timeout();
|
||||
}
|
||||
|
||||
std::chrono::seconds set_file_locking_timeout(const std::chrono::seconds& new_timeout)
|
||||
{
|
||||
return files_locked_by_this_process.set_file_locking_timeout(new_timeout);
|
||||
|
@ -1330,7 +1334,6 @@ namespace mamba
|
|||
return infile;
|
||||
}
|
||||
|
||||
|
||||
WrappedCallOptions WrappedCallOptions::from_context(const Context& context)
|
||||
{
|
||||
return {
|
||||
|
|
|
@ -47,7 +47,6 @@ namespace mamba::solv
|
|||
return m_pool.get();
|
||||
}
|
||||
|
||||
|
||||
auto ObjPool::disttype() const -> DistType
|
||||
{
|
||||
return raw()->disttype;
|
||||
|
|
|
@ -58,7 +58,6 @@ namespace mamba::solv
|
|||
return const_cast<::Solvable*>(ObjSolvableViewConst::raw());
|
||||
}
|
||||
|
||||
|
||||
/******************************************
|
||||
* Implementation of getter and setters *
|
||||
******************************************/
|
||||
|
|
|
@ -146,7 +146,6 @@ namespace mamba::solv
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void ObjSolver::SolverDeleter::operator()(::Solver* ptr)
|
||||
{
|
||||
::solver_free(ptr);
|
||||
|
|
|
@ -50,6 +50,7 @@ namespace mamba::solv
|
|||
nullptr
|
||||
) };
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
void
|
||||
|
|
|
@ -91,7 +91,6 @@ namespace mamba::specs
|
|||
return (url() / platform);
|
||||
}
|
||||
|
||||
|
||||
auto Channel::platforms() const -> const platform_list&
|
||||
{
|
||||
return m_platforms;
|
||||
|
@ -385,7 +384,6 @@ namespace mamba::specs
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
auto Channel::resolve(ChannelSpec spec, ChannelResolveParamsView params) -> channel_list
|
||||
{
|
||||
switch (spec.type())
|
||||
|
|
|
@ -150,7 +150,6 @@ namespace mamba::util
|
|||
return static_cast<wchar_t>(std::towupper(static_cast<wint_t>(c)));
|
||||
}
|
||||
|
||||
|
||||
/***************************************************
|
||||
* Implementation of to_lower to_upper functions *
|
||||
***************************************************/
|
||||
|
@ -405,6 +404,7 @@ namespace mamba::util
|
|||
using Char = decltype(input)::value_type;
|
||||
return rstrip_if(input, [](Char c) { return !is_graphic(c); });
|
||||
}
|
||||
|
||||
std::wstring_view rstrip(std::wstring_view input)
|
||||
{
|
||||
using Char = decltype(input)::value_type;
|
||||
|
@ -544,14 +544,17 @@ namespace mamba::util
|
|||
{
|
||||
return strip_parts_impl(input, c);
|
||||
}
|
||||
|
||||
std::array<std::wstring_view, 3> strip_parts(std::wstring_view input, wchar_t c)
|
||||
{
|
||||
return strip_parts_impl(input, c);
|
||||
}
|
||||
|
||||
std::array<std::string_view, 3> strip_parts(std::string_view input, std::string_view chars)
|
||||
{
|
||||
return strip_parts_impl(input, chars);
|
||||
}
|
||||
|
||||
std::array<std::wstring_view, 3> strip_parts(std::wstring_view input, std::wstring_view chars)
|
||||
{
|
||||
return strip_parts_impl(input, chars);
|
||||
|
@ -615,7 +618,6 @@ namespace mamba::util
|
|||
return rsplit_once_impl(str, sep);
|
||||
}
|
||||
|
||||
|
||||
/***************************************
|
||||
* Implementation of split functions *
|
||||
***************************************/
|
||||
|
@ -909,14 +911,17 @@ namespace mamba::util
|
|||
{
|
||||
return std::strlen(s);
|
||||
}
|
||||
|
||||
std::size_t length(const wchar_t* s)
|
||||
{
|
||||
return std::wcslen(s);
|
||||
}
|
||||
|
||||
std::size_t length(const char /*c*/)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::size_t length(const wchar_t /*c*/)
|
||||
{
|
||||
return 1;
|
||||
|
|
|
@ -82,6 +82,7 @@ namespace mamba::validation
|
|||
{
|
||||
std::size_t key_len = MAMBA_ED25519_KEYSIZE_BYTES;
|
||||
::EVP_PKEY* pkey = nullptr;
|
||||
|
||||
struct EVPContext
|
||||
{
|
||||
::EVP_PKEY_CTX* pctx = ::EVP_PKEY_CTX_new_id(EVP_PKEY_ED25519, nullptr);
|
||||
|
@ -93,7 +94,6 @@ namespace mamba::validation
|
|||
|
||||
} evp_context;
|
||||
|
||||
|
||||
int gen_status = ::EVP_PKEY_keygen_init(evp_context.pctx);
|
||||
if (gen_status != 1)
|
||||
{
|
||||
|
@ -294,7 +294,6 @@ namespace mamba::validation
|
|||
return verify(data, MAMBA_SHA256_SIZE_BYTES, pk, signature);
|
||||
}
|
||||
|
||||
|
||||
auto
|
||||
verify_gpg_hashed_msg(const std::string& data, const std::byte* pk, const std::byte* signature)
|
||||
-> int
|
||||
|
|
|
@ -660,6 +660,7 @@ namespace mamba::validation::v0_6
|
|||
throw index_error();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PkgMgrRole::verify_package(const nlohmann::json& signed_data, const nlohmann::json& signatures) const
|
||||
{
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "mamba/version.hpp"
|
||||
|
||||
|
||||
namespace mamba
|
||||
{
|
||||
std::string version()
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include "mambatests.hpp"
|
||||
|
||||
|
||||
TEST_SUITE("ChannelContext")
|
||||
{
|
||||
using namespace mamba;
|
||||
|
|
|
@ -92,6 +92,7 @@ namespace mamba
|
|||
{
|
||||
return util::shrink_home(config.valid_sources()[position].string());
|
||||
}
|
||||
|
||||
std::unique_ptr<TemporaryFile> tempfile_ptr = std::make_unique<TemporaryFile>(
|
||||
"mambarc",
|
||||
".yaml"
|
||||
|
|
|
@ -45,6 +45,7 @@ namespace mamba
|
|||
fs::remove(aux_file_path);
|
||||
fs::copy(history_file_path, aux_file_path);
|
||||
}
|
||||
|
||||
~ScopedHistoryFileBackup()
|
||||
{
|
||||
fs::remove(history_file_path);
|
||||
|
|
|
@ -56,7 +56,6 @@ namespace mamba
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
TEST_SUITE("LockDirTest")
|
||||
{
|
||||
TEST_CASE_FIXTURE(LockDirTest, "basics")
|
||||
|
|
|
@ -91,6 +91,7 @@ namespace
|
|||
{
|
||||
fs::create_directories(path);
|
||||
}
|
||||
|
||||
~dir_guard()
|
||||
{
|
||||
fs::remove_all(path);
|
||||
|
@ -110,7 +111,6 @@ namespace
|
|||
return pkg;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create the repodata.json file containing the package information.
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,7 @@ namespace mamba::test
|
|||
return std::tie(p.name, p.version, p.dependencies);
|
||||
}
|
||||
}
|
||||
|
||||
auto operator==(const SimplePkg& a, const SimplePkg& b) -> bool
|
||||
{
|
||||
return attrs(a) == attrs(b);
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
using namespace mamba::util;
|
||||
|
||||
|
||||
TEST_SUITE("util::compare")
|
||||
{
|
||||
TEST_CASE("equal")
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
using namespace mamba::util;
|
||||
|
||||
|
||||
TEST_SUITE("util::tuple_hash")
|
||||
{
|
||||
TEST_CASE("hash_tuple")
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
using namespace mamba::util;
|
||||
|
||||
|
||||
TEST_SUITE("util::type_traits")
|
||||
{
|
||||
struct NotOStreamable
|
||||
|
@ -22,6 +21,7 @@ TEST_SUITE("util::type_traits")
|
|||
struct OStreamable
|
||||
{
|
||||
};
|
||||
|
||||
auto operator<<(std::ostream& s, const OStreamable&)->std::ostream&;
|
||||
|
||||
TEST_CASE("ostreamable")
|
||||
|
|
|
@ -704,7 +704,6 @@ TEST_SUITE("validation::v0_6::SpecImpl")
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class KeyMgrT_v06 : public RootImplT_v0_6
|
||||
{
|
||||
public:
|
||||
|
@ -1144,7 +1143,6 @@ TEST_SUITE("validation::v0_6::PkgMgr")
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class RepoCheckerT : public PkgMgrT_v06
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -117,10 +117,12 @@ namespace mambapy
|
|||
{
|
||||
return m_main_executor;
|
||||
}
|
||||
|
||||
mamba::Context& context()
|
||||
{
|
||||
return m_context;
|
||||
}
|
||||
|
||||
mamba::Console& console()
|
||||
{
|
||||
return m_console;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "utils.hpp"
|
||||
#include "weakening_map_bind.hpp"
|
||||
|
||||
|
||||
namespace mambapy
|
||||
{
|
||||
void bind_submodule_specs(pybind11::module_ m)
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include "package.hpp"
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,6 @@ init_rc_options(CLI::App* subcom, Configuration& config)
|
|||
subcom->add_flag("--no-env", no_env.get_cli_config<bool>(), no_env.description())->group(cli_group);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
init_general_options(CLI::App* subcom, Configuration& config)
|
||||
{
|
||||
|
@ -129,7 +128,6 @@ init_prefix_options(CLI::App* subcom, Configuration& config)
|
|||
->group(cli_group);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
init_network_options(CLI::App* subcom, Configuration& config)
|
||||
{
|
||||
|
@ -173,7 +171,6 @@ init_network_options(CLI::App* subcom, Configuration& config)
|
|||
->group(cli_group);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
init_channel_parser(CLI::App* subcom, Configuration& config)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "mamba/fs/filesystem.hpp"
|
||||
#include "mamba/util/string.hpp"
|
||||
|
||||
|
||||
void
|
||||
complete_options(
|
||||
CLI::App* app,
|
||||
|
@ -195,7 +194,6 @@ add_ps_completion(
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
get_completions(CLI::App* app, mamba::Configuration& config, int argc, char** argv)
|
||||
{
|
||||
|
|
|
@ -65,7 +65,6 @@ set_constructor_command(CLI::App* subcom, mamba::Configuration& config)
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
construct(Configuration& config, const fs::u8path& prefix, bool extract_conda_pkgs, bool extract_tarball)
|
||||
{
|
||||
|
@ -187,7 +186,6 @@ construct(Configuration& config, const fs::u8path& prefix, bool extract_conda_pk
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
read_binary_from_stdin_and_write_to_file(fs::u8path& filename)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,6 @@ get_env_name(const Context& ctx, const mamba::fs::u8path& px)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
set_env_command(CLI::App* com, Configuration& config)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
using namespace mamba; // NOLINT(build/namespaces)
|
||||
|
||||
|
||||
void
|
||||
set_install_command(CLI::App* subcom, Configuration& config)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "mamba/util/string.hpp"
|
||||
#include "mamba/util/url.hpp"
|
||||
|
||||
|
||||
std::string
|
||||
read_stdin()
|
||||
{
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
using namespace mamba; // NOLINT(build/namespaces)
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
|
|
|
@ -107,6 +107,7 @@ namespace microserver
|
|||
: m_logger(logger)
|
||||
{
|
||||
}
|
||||
|
||||
void get(std::string, callback_function_t);
|
||||
void post(std::string, callback_function_t);
|
||||
void all(std::string, callback_function_t);
|
||||
|
|
|
@ -167,6 +167,7 @@ set_repoquery_whoneeds_command(CLI::App* subcmd, mamba::Configuration& config)
|
|||
{
|
||||
set_repoquery_subcommand<mamba::QueryType::WhoNeeds>(subcmd, config);
|
||||
}
|
||||
|
||||
void
|
||||
set_repoquery_depends_command(CLI::App* subcmd, mamba::Configuration& config)
|
||||
{
|
||||
|
|
|
@ -41,7 +41,6 @@ extern "C"
|
|||
|
||||
using namespace mamba; // NOLINT(build/namespaces)
|
||||
|
||||
|
||||
void
|
||||
set_ps_command(CLI::App* subcom, Context& context)
|
||||
{
|
||||
|
|
|
@ -168,7 +168,6 @@ handle_solve_request(
|
|||
pool_set_installed(*cache_entry.pool, nullptr);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
run_server(int port, mamba::Context& ctx, mamba::ChannelContext& channel_context, Configuration& config)
|
||||
{
|
||||
|
|
|
@ -16,7 +16,6 @@ namespace mamba
|
|||
class Configuration;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
set_clean_command(CLI::App* subcom, mamba::Configuration& config);
|
||||
|
||||
|
|
|
@ -163,7 +163,6 @@ update_self(Configuration& config, const std::optional<std::string>& version)
|
|||
return ec ? ec.value() : status;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
set_update_command(CLI::App* subcom, Configuration& config)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "version.hpp"
|
||||
|
||||
|
||||
namespace umamba
|
||||
{
|
||||
std::string version()
|
||||
|
|
Loading…
Reference in New Issue