[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:
parent
9b0cd6263c
commit
3a9f62610f
|
@ -22,7 +22,7 @@ doctest = false
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["config"]
|
default = ["config"]
|
||||||
# enable configuration file (sailfish.yml) support
|
# enable configuration file (sailfish.toml) support
|
||||||
config = ["sailfish-compiler/config"]
|
config = ["sailfish-compiler/config"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
@ -13,7 +13,9 @@ workspace = ".."
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["derive", "perf-inline"]
|
default = ["config", "derive", "perf-inline"]
|
||||||
|
# enable configuration file (sailfish.toml) support
|
||||||
|
config = ["sailfish-macros/config"]
|
||||||
# automatically import derive macro
|
# automatically import derive macro
|
||||||
derive = ["sailfish-macros"]
|
derive = ["sailfish-macros"]
|
||||||
# enable json filter
|
# enable json filter
|
||||||
|
@ -30,6 +32,7 @@ serde_json = { version = "1.0.95", optional = true }
|
||||||
[dependencies.sailfish-macros]
|
[dependencies.sailfish-macros]
|
||||||
path = "../sailfish-macros"
|
path = "../sailfish-macros"
|
||||||
version = "0.6.1"
|
version = "0.6.1"
|
||||||
|
default-features = false
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
Loading…
Reference in New Issue