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

refactor!: Unsplit and removal of *-internal crates #185

Merged
merged 18 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
9 changes: 1 addition & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
[workspace]
members = [
"borsh",
"borsh-derive",
"borsh-derive-internal",
"borsh-schema-derive-internal",
"fuzz/fuzz-run",
"benchmarks",
]
members = ["borsh", "borsh-derive", "fuzz/fuzz-run", "benchmarks"]

[workspace.package]
# shared version of all public crates in the workspace
Expand Down
30 changes: 0 additions & 30 deletions borsh-derive-internal/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion borsh-derive-internal/README.md

This file was deleted.

55 changes: 0 additions & 55 deletions borsh-derive-internal/src/attribute_helpers/field/bounds.rs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

26 changes: 0 additions & 26 deletions borsh-derive-internal/src/lib.rs

This file was deleted.

13 changes: 10 additions & 3 deletions borsh-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@ Binary Object Representation Serializer for Hashing
proc-macro = true

[dependencies]
borsh-derive-internal = { path = "../borsh-derive-internal", version = "0.11.0" }
frol marked this conversation as resolved.
Show resolved Hide resolved
borsh-schema-derive-internal = { path = "../borsh-schema-derive-internal", version = "0.11.0", optional = true }
syn = { version = "2", features = ["full", "fold"] }
proc-macro-crate = "1"
proc-macro2 = "1"
quote = "1"
once_cell = "1.18.0"
syn_derive = "0.1.6"

[dev-dependencies]
syn = { version = "2", features = ["full", "fold", "parsing"] }
prettyplease = "0.2.9"
insta = "1.29.0"

dj8yfo marked this conversation as resolved.
Show resolved Hide resolved

[features]
default = []
schema = ["borsh-schema-derive-internal"]
schema = []
force_exhaustive_checks = []
15 changes: 15 additions & 0 deletions borsh-derive/src/internals.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
pub mod attributes;
frol marked this conversation as resolved.
Show resolved Hide resolved
pub mod deserialize;
mod enum_discriminant_map;
mod generics;
#[cfg(feature = "schema")]
pub mod schema;
pub mod serialize;

#[cfg(feature = "schema")]
pub use schema::{process_enum, process_struct};

pub use deserialize::{enum_de, struct_de, union_de};
pub use serialize::{enum_ser, struct_ser, union_ser};
dj8yfo marked this conversation as resolved.
Show resolved Hide resolved
#[cfg(test)]
mod test_helpers;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use super::{

pub mod bounds;
pub mod schema;

enum Variants {
Schema(schema::Attributes),
Bounds(bounds::Bounds),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::BTreeMap;

use syn::{meta::ParseNestedMeta, WherePredicate};

use crate::attribute_helpers::{parsing::parse_lit_into_vec, Symbol, DESERIALIZE, SERIALIZE};
use crate::internals::attributes::{parsing::parse_lit_into_vec, Symbol, DESERIALIZE, SERIALIZE};
use once_cell::sync::Lazy;

pub(crate) enum Variants {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::collections::BTreeMap;

use crate::attribute_helpers::{
use crate::internals::attributes::{
parsing::{meta_get_by_symbol_keys, parse_lit_into_vec},
Symbol, DECLARATION, DEFINITIONS, PARAMS, WITH_FUNCS,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::BTreeMap;
use once_cell::sync::Lazy;
use syn::meta::ParseNestedMeta;

use crate::attribute_helpers::{parsing::parse_lit_into, Symbol, DECLARATION, DEFINITIONS};
use crate::internals::attributes::{parsing::parse_lit_into, Symbol, DECLARATION, DEFINITIONS};

pub(crate) enum Variants {
Declaration(syn::ExprPath),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
source: borsh-derive/src/internals/attributes/field.rs
expression: debug_print_vec_of_tokenizable(attrs.deserialize)
---
K : Hash + Ord
V : Eq + Ord

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
source: borsh-derive/src/internals/attributes/field.rs
expression: debug_print_vec_of_tokenizable(attrs.serialize)
---
K : Hash + Eq + Ord
V : Ord

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
source: borsh-derive/src/internals/attributes/field.rs
expression: debug_print_vec_of_tokenizable(attrs.deserialize)
---
K : Hash + Eq + borsh :: de :: BorshDeserialize
V : borsh :: de :: BorshDeserialize

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
source: borsh-derive/src/internals/attributes/field.rs
expression: debug_print_vec_of_tokenizable(attrs.serialize)
---
K : Hash + Eq + borsh :: ser :: BorshSerialize
V : borsh :: ser :: BorshSerialize

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
source: borsh-derive/src/internals/attributes/field.rs
expression: debug_print_vec_of_tokenizable(attrs.deserialize)
---
K : Hash + Eq + borsh :: de :: BorshDeserialize
V : borsh :: de :: BorshDeserialize

Loading
Loading