Repository: oxidecomputer/typify
Pull request #235 (2023-03-20 14:04:10)

Bump schema from 0.0.1 to 0.1.0
Bumps [schema](https://github.com/ahl/schema) from 0.0.1 to 0.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/ahl/schema/releases">schema's releases</a>.</em></p>
<blockquote>
<h2>v0.1.0</h2>
<p>Breaking change: update to <code>syn</code> 2.0</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/ahl/schema/commits/v0.1.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=schema&package-manager=cargo&previous-version=0.0.1&new-version=0.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index 11b6568..0a46798 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -735,26 +735,26 @@ dependencies = [
 
 [[package]]
 name = "schema"
-version = "0.0.1"
+version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c264b3fd73f2b0b7360f7ae10779dbcb3a3d0f2b1326347c16cd4da32a0db43"
+checksum = "96422023a2fbf8c618a005a24bcbe01d1f3159e5ea7c8881120fa25227e39a2c"
 dependencies = [
  "proc-macro2",
  "quote",
  "schema-derive",
- "syn 1.0.109",
+ "syn 2.0.3",
 ]
 
 [[package]]
 name = "schema-derive"
-version = "0.0.1"
+version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c5081f42984166c05c533e4ae3a75e8c1f973071be7ef442912d7f83fc9e762"
+checksum = "325e57fb235cb8b19d922a8d28c5d22d705b8fe41a27cc6c189b851e0d1cba6f"
 dependencies = [
  "paste",
  "proc-macro2",
  "quote",
- "syn 1.0.109",
+ "syn 2.0.3",
 ]
 
 [[package]]
@@ -844,13 +844,14 @@ dependencies = [
 
 [[package]]
 name = "serde_tokenstream"
-version = "0.1.7"
+version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9"
+checksum = "8a00ffd23fd882d096f09fcaae2a9de8329a328628e86027e049ee051dc1621f"
 dependencies = [
  "proc-macro2",
+ "quote",
  "serde",
- "syn 1.0.109",
+ "syn 2.0.3",
 ]
 
 [[package]]
@@ -1078,7 +1079,7 @@ dependencies = [
  "schemars",
  "serde",
  "serde_json",
- "syn 1.0.109",
+ "syn 2.0.3",
  "thiserror",
  "unicode-ident",
  "uuid",
@@ -1094,7 +1095,7 @@ dependencies = [
  "serde",
  "serde_json",
  "serde_tokenstream",
- "syn 1.0.109",
+ "syn 2.0.3",
  "typify-impl",
 ]
 
diff --git a/typify-impl/Cargo.toml b/typify-impl/Cargo.toml
index e949b6b..2ebc7de 100644
--- a/typify-impl/Cargo.toml
+++ b/typify-impl/Cargo.toml
@@ -15,7 +15,7 @@ quote = "1.0"
 regress = "0.5.0"
 schemars = "0.8.12"
 serde_json = "1.0"
-syn = { version = "1.0", features = ["full"] }
+syn = { version = "2.0", features = ["full"] }
 thiserror = "1.0"
 unicode-ident = "1.0.8"
 
@@ -23,7 +23,7 @@ unicode-ident = "1.0.8"
 expectorate = "1.0"
 paste = "1.0"
 rustfmt-wrapper = "0.2"
-schema = "0.0.1"
+schema = "0.1.0"
 schemars = { version = "0.8.12", features = ["uuid1"] }
 serde = "1.0"
 uuid = "1.3.0"
diff --git a/typify-macro/Cargo.toml b/typify-macro/Cargo.toml
index e5b5c84..f316b52 100644
--- a/typify-macro/Cargo.toml
+++ b/typify-macro/Cargo.toml
@@ -16,6 +16,6 @@ quote = "1.0"
 schemars = "0.8.12"
 serde = { version = "1.0", features = ["derive"] }
 serde_json = "1.0"
-serde_tokenstream = "0.1.7"
-syn = "1.0"
+serde_tokenstream = "0.2.0"
+syn = { version = "2.0", features = ["full", "extra-traits"] }
 typify-impl = { version = "0.0.12-dev", path = "../typify-impl" }
diff --git a/typify-macro/src/token_utils.rs b/typify-macro/src/token_utils.rs
index 5f8d9e3..d159db9 100644
--- a/typify-macro/src/token_utils.rs
+++ b/typify-macro/src/token_utils.rs
@@ -6,7 +6,7 @@ use quote::ToTokens;
 use syn::{
     parse::Parse,
     punctuated::Punctuated,
-    token::{Add, Colon},
+    token::{Colon, Plus},
     Ident, Path, Token, TraitBoundModifier,
 };
 use typify_impl::TypeSpaceImpl;
@@ -15,7 +15,7 @@ use typify_impl::TypeSpaceImpl;
 pub struct TypeAndImpls {
     pub type_name: Path,
     pub colon_token: Option<Colon>,
-    pub impls: Punctuated<ImplTrait, Add>,
+    pub impls: Punctuated<ImplTrait, Plus>,
 }
 
 impl TypeAndImpls {


Test patch:
diff --git a/typify-impl/src/test_util.rs b/typify-impl/src/test_util.rs
index 1c65e24..7d0f831 100644
--- a/typify-impl/src/test_util.rs
+++ b/typify-impl/src/test_util.rs
@@ -91,7 +91,7 @@ fn validate_output_impl<T: JsonSchema + Schema>(ignore_variant_names: bool) {
 #[macro_export]
 macro_rules! validate_builtin {
     ($t:ty) => {
-        crate::test_util::validate_builtin_impl::<$t>(stringify!($t))
+        $crate::test_util::validate_builtin_impl::<$t>(stringify!($t))
     };
 }
 
@@ -161,9 +161,9 @@ fn get_serde(attrs: &[Attribute]) -> HashSet<String> {
     attrs
         .iter()
         .filter_map(|attr| {
-            let name = attr.path.segments.first()?.ident.to_string();
+            let name = attr.path().segments.first()?.ident.to_string();
             if name == "serde" {
-                let mut iter = attr.tokens.clone().into_iter();
+                let mut iter = attr.clone().to_token_stream().into_iter();
                 if let Some(proc_macro2::TokenTree::Group(group)) = iter.next() {
                     // Serde options have a single item.
                     assert!(iter.next().is_none());
@@ -174,7 +174,13 @@ fn get_serde(attrs: &[Attribute]) -> HashSet<String> {
                             .into_iter()
                             .collect::<Vec<_>>()
                             // Split into comma-delimited groups.
-                            .split(|token| matches!(token, proc_macro2::TokenTree::Punct(punct) if punct.as_char() == ','))
+                            .split(|token| {
+                                matches!(
+                                    token,
+                                    proc_macro2::TokenTree::Punct(punct)
+                                        if punct.as_char() == ','
+                                )
+                            })
                             // Join the tokens into a string.
                             .map(|tokens| {
                                 tokens.iter().cloned().collect::<TokenStream>().to_string()