Skip to content

Subtle change in how ty fragments get stringified #128992

Closed as not planned
Closed as not planned
@workingjubilee

Description

@workingjubilee

Something in lexing, parsing, or even stringification or pretty-printing is now causing code that previously yielded strings like "Component1" to serde, based on the type name, to now emit strings like " Component1". This has been extracted from #128899 because many of the regressions there proved to be unrelated to each other, and it was hard to triage out what the "real" problem was. We have and most of them depended on unstable library details, but the bbarker/bevy_serde_macros case was distinct.

See @Nemo157's comment:

Equality doesn't care about which order you check the keys in, the debug output is different but that shouldn't affect the comparison result. There seem to be extra spaces in the keys on one side, which I assume means the test itself is broken. EDIT: looking at it a little more, seems to be related to not accounting for whitespace in stringify! of ty fragments, so tests :: Component1 gets split at the :: and given the name Component1 instead of the expected Component1, maybe #125174 related.

Originally posted by @Nemo157 in #128899 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-discussionCategory: Discussion or questions that doesn't represent real issues.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions