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

Inferred TypeName & TypeName fails the derivation #673

Open
andyczerwonka opened this issue Jan 20, 2025 · 2 comments
Open

Inferred TypeName & TypeName fails the derivation #673

andyczerwonka opened this issue Jan 20, 2025 · 2 comments
Labels
bug Erroneous behavior in existing features

Comments

@andyczerwonka
Copy link

andyczerwonka commented Jan 20, 2025

This could very well be a user error, so I apologize in advance, but I'm seeing a strange error during auto derivation that I can't seem to track down

Chimney can't derive transformation from theca.staging.model.Substance & theca.staging.model.Substance to theca.staging.model.grpcgen.Substance.

If we focus on the source, we see the error message is reporting two types with an & between them: theca.staging.model.Substance & theca.staging.model.Substance to theca.staging.model.grpcgen.Substance. The internal case class is a mirror of the grpcgen one, plus I have preserve_unknown_fields: false. I was expecting a trivial conversion.

I'm not quite tracking as to why we're seeing theca.staging.model.Substance & theca.staging.model.Substance instead of a single theca.staging.model.Substance. Has anyone run into this before?

@andyczerwonka
Copy link
Author

andyczerwonka commented Jan 20, 2025

Interesting... transformInto seems to work, so this is clearly user error

  • self.into[pb.Substance].transform // generate the above compile-time error
  • self.transformInto[pb.Substance] // works as expected

@MateuszKubuszok
Copy link
Member

Is it possible to minimize the reproduction? Ideally as Scala CLI script?

@MateuszKubuszok MateuszKubuszok added the bug Erroneous behavior in existing features label Jan 21, 2025
@MateuszKubuszok MateuszKubuszok changed the title double source transformation in src error Inferred TypeName & TypeName fails the derivation Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Erroneous behavior in existing features
Projects
None yet
Development

No branches or pull requests

2 participants