Skip to content

Upgrade builder-pattern-macro to syn v2 / bitflags v2 and align macro parsing APIs#31

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/upgrade-dependency-versions
Draft

Upgrade builder-pattern-macro to syn v2 / bitflags v2 and align macro parsing APIs#31
Copilot wants to merge 5 commits intomainfrom
copilot/upgrade-dependency-versions

Conversation

Copy link

Copilot AI commented Mar 26, 2026

This update advances builder-pattern-macro dependency versions and adapts the derive macro implementation to current upstream APIs. The goal is to modernize dependency constraints while preserving existing macro behavior.

  • Dependency upgrades

    • builder-pattern-macro/Cargo.toml
      • syn: 1.02
      • bitflags: 1.32
  • syn v2 migration in macro parsing

    • Replaced deprecated/changed syn access patterns:
      • attr.pathattr.path()
      • VisPublic construction → parse_quote!(pub)
      • parse_meta/NestedMeta parsing path replaced with token parsing from attr.meta.require_list()
    • Updated setter attribute parsing to accept identifiers including Rust keywords used in attribute context (e.g. async) via Ident::parse_any.
  • bitflags v2 compatibility

    • Added derives on Setters (Clone, Copy, PartialEq, Eq) to preserve operator/pattern usage semantics used across builder generation code.
  • Clippy-oriented cleanup in touched paths

    • Removed unnecessary .into_iter() on ranges.
    • Canonicalized PartialOrd implementation (Some(self.cmp(other))).
    • Removed redundant .to_string() in format! args.
    • Improved setter parse failure messages with descriptive .expect(...).
    • Fixed doc-list continuation formatting in crate docs to satisfy current clippy rules.
// before (syn 1 style)
if attr.path.is_ident("setter") { ... }

// after (syn 2 style)
if attr.path().is_ident("setter") { ... }
Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade dependency versions</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update dependency versions to the latest stable releases Upgrade Rust dev-dependencies to current major versions (uuid, tokio) Mar 26, 2026
Copilot AI requested a review from SeokminHong March 26, 2026 00:52
Copilot AI changed the title Upgrade Rust dev-dependencies to current major versions (uuid, tokio) Upgrade builder-pattern-macro to syn v2 / bitflags v2 and align macro parsing APIs Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade dependency versions

2 participants