Skip to content

Commit

Permalink
Minor workspace improvements. (#462)
Browse files Browse the repository at this point in the history
* Fix some warnings/lints.

* Allow contributors to configure their own vscode tasks.

* Add configurable workspace lints.
  • Loading branch information
Greatness7 authored and geom3trik committed Mar 22, 2024
1 parent 356ea9d commit 0be0894
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Allow contributors to configure their own vscode tasks.
.vscode/tasks.json

# Generated by Cargo
# will have compiled files and executables
/target/
Expand Down
15 changes: 15 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,18 @@ chrono = "0.4.34"
reqwest = { version = "0.11.18", features = ["blocking"] }
log = "0.4.19"
fern = { version = "0.6" }

[workspace.lints.rust]
# future_incompatible = "allow"
# let_underscore = "allow"
# nonstandard_style = "allow"
# rust_2018_compatibility = "allow"
# rust_2018_idioms = "allow"
# rust_2021_compatibility = "allow"
# unused = "allow"

[workspace.lints.clippy]
# cargo = "allow"
# pedantic = "allow"
# nursery = "allow"
# separated_literal_suffix = "allow"
3 changes: 3 additions & 0 deletions crates/vizia_baseview/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ vizia_id = { path = "../vizia_id" }
baseview = { git = "https://github.com/RustAudio/baseview.git", rev = "2c1b1a7b0fef1a29a5150a6a8f6fef6a0cbab8c4", features = ["opengl"] }
raw-window-handle = "0.5.2"
lazy_static = "1.4.0"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/vizia_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ doctest = false

[target.'cfg(target_arch = "wasm32")'.dependencies]
web_sys = { version = "0.3", package = "web-sys", features = ["console"] }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/vizia_core/src/systems/hover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub(crate) fn hover_system(cx: &mut Context) {

if hovered != cx.hovered {
// Useful for debugging
println!(
debug!(
"Hover changed to {:?} parent: {:?}, view: {}, posx: {}, posy: {} width: {} height: {}",
hovered,
cx.tree.get_parent(hovered),
Expand Down
3 changes: 3 additions & 0 deletions crates/vizia_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ proc-macro = true
syn = "2.0"
quote = "1.0"
proc-macro2 = "1.0"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/vizia_id/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ description = "Core components of vizia"
rust-version = "1.65"

[dependencies]

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/vizia_input/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ vizia_id = { path = "../vizia_id" }

keyboard-types = { version = "0.6", default-features = false }
bitflags = "2.4"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/vizia_storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ vizia_id = { path = "../vizia_id" }
# morphorm = {path = "../../../morphorm" }
morphorm = {git = "https://github.com/vizia/morphorm.git", branch = "auto-min-size2"}
# morphorm = "0.6.4"

[lints]
workspace = true
5 changes: 4 additions & 1 deletion crates/vizia_style/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ selectors = { version = "0.23.0", path = "./selectors" }
morphorm = {git = "https://github.com/vizia/morphorm.git", branch = "auto-min-size2"}
# morphorm = "0.6.4"
smallvec = "1.0"
bitflags = "2.1.0"
bitflags = "2.1.0"

[lints]
workspace = true
1 change: 1 addition & 0 deletions crates/vizia_style/selectors/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "selectors"
version = "0.23.0"
edition = "2021"
authors = ["The Servo Project Developers"]
documentation = "https://docs.rs/selectors/"
description = "CSS Selectors matching for Rust"
Expand Down
3 changes: 3 additions & 0 deletions crates/vizia_window/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ vizia_style = { path = "../vizia_style" }
morphorm = {git = "https://github.com/vizia/morphorm.git", branch = "auto-min-size2"}
# morphorm = "0.6.4"
accesskit = "0.12.0"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/vizia_winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ console_error_panic_hook = "0.1.5"

[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3.9", default-features = false, features = ["minwindef", "dwmapi"] }

[lints]
workspace = true
3 changes: 0 additions & 3 deletions examples/widget_gallery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ vizia = {path = "../../../vizia"}
fern = "0.6.2"
log = "0.4.19"
chrono = "0.4.34"

[profile.dev.package."*"]
opt-level = 3

0 comments on commit 0be0894

Please sign in to comment.