mario-eth / soldeer

Solidity Package Manager written in rust
MIT License
188 stars 19 forks source link

refactor!: big rewrite #118

Closed beeb closed 1 month ago

beeb commented 1 month ago

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

Closes #106 Closes #107 Closes #117 Closes #119 Closes #121