Big refactor to adopt idiomatic Rust patterns and improve the existing public API.
Breaking Changes
Config file
The config file (whichever has a [dependencies] table between foundry.toml and soldeer.toml) now has a [soldeer] section with the following format and defaults:
[soldeer]
# whether soldeer manages remappings
remappings_generated = true
# whether soldeer re-generates all remappings when installing, updating or uninstalling deps
remappings_regenerate = false
# whether to suffix the remapping with the version: `name-a.b.c`
remappings_version = true
# a prefix to add to the remappings ("@" would give `@name`)
remappings_prefix = ""
# where to store the remappings ("txt" for `remappings.txt` or "config" for `foundry.toml`)
# ignored when `soldeer.toml` is used as config (uses `remappings.txt`)
remappings_location = "txt"
Remappings
Remappings are now properly managed by Soldeer if desired. They can be updated inside the foundry.toml file if that file is also used for [dependencies].
Remappings in the [profile.default] are always managed if remappings_generated = true. Other profiles only get managed if they already contain a remappings array.
If remappings_regenerate = false, then existing remappings are not modified by Soldeer, unless a dependency is removed. This allows for remappings customization.
Auth
fallible functions now return an AuthError
Commands
subcommand VersionDryRun renamed to Version
flag clean for subcommand Init is now a bool
flag dry_run for subcommand Push is now a bool
flag skip_warnings for subcommand Push is now a bool
Config
fallible functions now return a ConfigError
Dependency is now an enum with variants Http and Git
read_config renamed to read_config_deps and takes a AsRef<Path> parameter
define_config_file renamed to get_config_path
add_to_config: removed params custom_url and via_git, param config_file now named config_path of type AsRef<Path>
remappings replaced by remappings_txt and remappings_foundry
get_foundry_setup replaced with read_soldeer_config which returns a SoldeerConfig struct
delete_config now takes a AsRef<Path> second param
Dependency Downloader
fallible functions now return a DownloadError
download_dependencies returns a Vec<DownloadResult>
download_dependency has a second argument skip_folder_check of type bool and returns a DownloadResult
unzip_dependency now takes a single &HttpDependency parameter
download_via_git now takes a &GitDependency
download_via_http now takes a IntoUrl first param, and &HttpDependency second param
Janitor
fallible functions now return a JanitorError
cleanup_dependency now takes a full: bool as second parameter which removes the entire dependencies folder and lockfile when true
Soldeer (lib)
run returns a SoldeerError in case of issues
re-export errors::SoldeerError
re-export commands::Subcommands
Lock
fallible functions now return a LockError
Remote
fallible functions now return a DownloadError
get_dependency_url_remote now takes a single &Dependency parameter
get_project_id now accepts &str as input
Utils
define_security_file_location now returns a Result<PathBuf, std::io::Error>
check_dotfiles now accepts AsRef<Path> as input
check_dotfiles_recursive now accepts AsRef<Path> as input
get_download_tunnel replaced with get_url_type
sha256_digestnow takes a single &HttpDependency as input
Versioning
fallible functions now return a PublishError
push_version takes &str as first and second parameters
Big refactor to adopt idiomatic Rust patterns and improve the existing public API.
Breaking Changes
Config file
The config file (whichever has a
[dependencies]
table betweenfoundry.toml
andsoldeer.toml
) now has a[soldeer]
section with the following format and defaults:Remappings
Remappings are now properly managed by Soldeer if desired. They can be updated inside the
foundry.toml
file if that file is also used for[dependencies]
.Remappings in the
[profile.default]
are always managed ifremappings_generated = true
. Other profiles only get managed if they already contain aremappings
array.If
remappings_regenerate = false
, then existing remappings are not modified by Soldeer, unless a dependency is removed. This allows for remappings customization.Auth
AuthError
Commands
VersionDryRun
renamed toVersion
clean
for subcommandInit
is now abool
dry_run
for subcommandPush
is now abool
skip_warnings
for subcommandPush
is now abool
Config
ConfigError
Dependency
is now an enum with variantsHttp
andGit
read_config
renamed toread_config_deps
and takes aAsRef<Path>
parameterdefine_config_file
renamed toget_config_path
add_to_config
: removed paramscustom_url
andvia_git
, paramconfig_file
now namedconfig_path
of typeAsRef<Path>
remappings
replaced byremappings_txt
andremappings_foundry
get_foundry_setup
replaced withread_soldeer_config
which returns aSoldeerConfig
structdelete_config
now takes aAsRef<Path>
second paramDependency Downloader
DownloadError
download_dependencies
returns aVec<DownloadResult>
download_dependency
has a second argumentskip_folder_check
of typebool
and returns aDownloadResult
unzip_dependency
now takes a single&HttpDependency
parameterdownload_via_git
now takes a&GitDependency
download_via_http
now takes aIntoUrl
first param, and&HttpDependency
second paramJanitor
JanitorError
cleanup_dependency
now takes afull: bool
as second parameter which removes the entiredependencies
folder and lockfile when trueSoldeer (lib)
run
returns aSoldeerError
in case of issueserrors::SoldeerError
commands::Subcommands
Lock
LockError
Remote
DownloadError
get_dependency_url_remote
now takes a single&Dependency
parameterget_project_id
now accepts&str
as inputUtils
define_security_file_location
now returns aResult<PathBuf, std::io::Error>
check_dotfiles
now acceptsAsRef<Path>
as inputcheck_dotfiles_recursive
now acceptsAsRef<Path>
as inputget_download_tunnel
replaced withget_url_type
sha256_digest
now takes a single&HttpDependency
as inputVersioning
PublishError
push_version
takes&str
as first and second parametersCloses #106 Closes #107 Closes #117 Closes #119 Closes #121