Skip to content

Commit

Permalink
Merge pull request #130 from czocher/syn2
Browse files Browse the repository at this point in the history
Migrate to `syn` version `2.0`
  • Loading branch information
anish-1p authored Feb 14, 2024
2 parents c3ee2ad + 558c1fb commit 3f7527a
Show file tree
Hide file tree
Showing 10 changed files with 253 additions and 292 deletions.
48 changes: 24 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion annotation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ repository = "https://github.com/1Password/typeshare"
proc-macro = true

[dependencies]
syn = { version = "1.0", features = ["parsing", "proc-macro"] }
syn = { version = "2.0.18", features = ["parsing", "proc-macro"] }
quote = "1.0"
2 changes: 1 addition & 1 deletion annotation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn strip_configuration_attribute(item: &mut DeriveInput) {
fn remove_configuration_from_attributes(attributes: &mut Vec<Attribute>) {
const CONFIG_ATTRIBUTE_NAME: &str = "typeshare";

attributes.retain(|x| x.path.to_token_stream().to_string() != CONFIG_ATTRIBUTE_NAME);
attributes.retain(|x| x.path().to_token_stream().to_string() != CONFIG_ATTRIBUTE_NAME);
}

fn remove_configuration_from_fields(fields: &mut Fields) {
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ clap_complete_command = "0.3"
ignore = "0.4"
once_cell = "1"
rayon = "1.5"
serde = { version = "1.0", features = ["derive"] }
serde = { version = "1.0.164", features = ["derive"] }
toml = "0.5"
typeshare-core = { path = "../core", version = "1.7.0" }
4 changes: 2 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ repository = "https://github.com/1Password/typeshare"
[dependencies]
proc-macro2 = "1"
quote = "1"
syn = { version = "1.0", features = ["full"] }
thiserror = "1"
syn = { version = "2.0.18", features = ["full"] }
thiserror = "1.0.40"
itertools = "0.10"
lazy_format = "1.8"
joinery = "2"
Expand Down
2 changes: 1 addition & 1 deletion core/src/language/kotlin.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use super::Language;
use crate::language::SupportedLanguage;
use crate::parser::remove_dash_from_identifier;
use crate::rust_types::{RustTypeFormatError, SpecialRustType};
use crate::{
parser::remove_dash_from_identifier,
rename::RenameExt,
rust_types::{RustEnum, RustEnumVariant, RustField, RustStruct, RustTypeAlias},
};
Expand Down
7 changes: 2 additions & 5 deletions core/src/language/scala.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
use super::Language;
use crate::language::SupportedLanguage;
use crate::parser::ParsedData;
use crate::parser::{remove_dash_from_identifier, ParsedData};
use crate::rust_types::{RustEnum, RustEnumVariant, RustField, RustStruct, RustTypeAlias};
use crate::rust_types::{RustType, RustTypeFormatError, SpecialRustType};
use crate::{
parser::remove_dash_from_identifier,
rust_types::{RustEnum, RustEnumVariant, RustField, RustStruct, RustTypeAlias},
};
use itertools::Itertools;
use joinery::JoinableIterator;
use lazy_format::lazy_format;
Expand Down
2 changes: 1 addition & 1 deletion core/src/language/swift.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::parser::remove_dash_from_identifier;
use crate::rust_types::{RustTypeFormatError, SpecialRustType};
use crate::{
language::{Language, SupportedLanguage},
parser::remove_dash_from_identifier,
rename::RenameExt,
rust_types::{RustEnum, RustEnumVariant, RustStruct, RustTypeAlias},
};
Expand Down
Loading

0 comments on commit 3f7527a

Please sign in to comment.