Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change how system.rs imports blocks to avoid merge conflicts #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions lib/protoflow-blocks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ pub use types::*;

pub use protoflow_core::{SystemBuilding, SystemExecution};

include!("blocks/core.rs"); // CoreBlocks
include!("blocks/flow.rs"); // FlowBlocks
include!("blocks/hash.rs"); // HashBlocks
include!("blocks/io.rs"); // IoBlocks
include!("blocks/math.rs"); // MathBlocks
include!("blocks/sys.rs"); // SysBlocks
include!("blocks/text.rs"); // TextBlocks
pub mod blocks {
use super::*;

include!("blocks/core.rs"); // CoreBlocks
include!("blocks/flow.rs"); // FlowBlocks
include!("blocks/hash.rs"); // HashBlocks
include!("blocks/io.rs"); // IoBlocks
include!("blocks/math.rs"); // MathBlocks
include!("blocks/sys.rs"); // SysBlocks
include!("blocks/text.rs"); // TextBlocks
}
pub use blocks::*;

pub trait AllBlocks:
CoreBlocks + FlowBlocks + HashBlocks + IoBlocks + MathBlocks + SysBlocks + TextBlocks
Expand Down
6 changes: 2 additions & 4 deletions lib/protoflow-blocks/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
#![allow(dead_code)]

use crate::{
blocks::*,
prelude::{fmt, Arc, Box, Bytes, FromStr, Rc, String, ToString},
types::{DelayType, Encoding},
AllBlocks, Buffer, ConcatStrings, Const, CoreBlocks, Count, Decode, DecodeCsv, DecodeHex,
DecodeJson, Delay, Drop, Encode, EncodeCsv, EncodeHex, EncodeJson, FlowBlocks, HashBlocks,
IoBlocks, MathBlocks, Random, ReadDir, ReadEnv, ReadFile, ReadStdin, SplitString, SysBlocks,
TextBlocks, WriteFile, WriteStderr, WriteStdout,
AllBlocks, CoreBlocks, FlowBlocks, HashBlocks, IoBlocks, MathBlocks, SysBlocks, TextBlocks,
};
#[cfg(all(feature = "std", feature = "serde"))]
use crate::{ReadSocket, WriteSocket};
Expand Down
Loading