[Breaking] Add `config` feature for `sailfish` crate

This is for enabling the corresponding `config` feature in
`sailfish-macros` and `sailfish-compiler`. If it is disabled,
configuration files (sailfish.toml) will be ignored. More than 10 cargo
build steps can be avoided this way, since the `toml` and `serde`
dependencies in `sailfish-compiler` are no longer needed.

This change will break applications that use sailfish.toml and
`default-features = false` for the `sailfish` dependency. They need to
add `config` to the list of enabled `sailfish` features in Cargo.toml.

Closes #123
This commit is contained in:
Florian Will 2023-06-21 09:01:43 +02:00
parent 9b0cd6263c
commit 3a9f62610f
2 changed files with 5 additions and 2 deletions

View File

@ -22,7 +22,7 @@ doctest = false
[features]
default = ["config"]
# enable configuration file (sailfish.yml) support
# enable configuration file (sailfish.toml) support
config = ["sailfish-compiler/config"]
[dependencies]

View File

@ -13,7 +13,9 @@ workspace = ".."
edition = "2018"
[features]
default = ["derive", "perf-inline"]
default = ["config", "derive", "perf-inline"]
# enable configuration file (sailfish.toml) support
config = ["sailfish-macros/config"]
# automatically import derive macro
derive = ["sailfish-macros"]
# enable json filter
@ -30,6 +32,7 @@ serde_json = { version = "1.0.95", optional = true }
[dependencies.sailfish-macros]
path = "../sailfish-macros"
version = "0.6.1"
default-features = false
optional = true
[build-dependencies]