You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, mapping to records emits code that passes the source values to the constructor of the destination record type, but it does so all in a single line, like so:
Given that one of Mapperly's main claims to fame is generating readable code, it would go a long way in terms of improving readability if the constructor arguments in this case were each on a separate line.
The text was updated successfully, but these errors were encountered:
Thanks for reporting, Mapperly doesn't differentiate between records and other constructors. This should target all constructors. I adjusted the title.
latonz
changed the title
Emit more readable record (constructor) mapping codeJun 10, 2024
Would be happy to accept a PR implementing this. A good starting point to contribute is the contributors documentation. Let us know if you plan to work on this 😊
Some hints / affected code:
SyntaxFactoryHelper.CreateObject in src/Riok.Mapperly/Emit/Syntax/SyntaxFactoryHelper.New.cs
Currently, mapping to records emits code that passes the source values to the constructor of the destination record type, but it does so all in a single line, like so:
Given that one of Mapperly's main claims to fame is generating readable code, it would go a long way in terms of improving readability if the constructor arguments in this case were each on a separate line.
The text was updated successfully, but these errors were encountered: