Comments (11)
Just tried and yes, i think that we can finally mark this as resolved for good. 😃 Thanks a lot.
from mapperly.
Thank you for opening this issue, looks like a regression. I‘ll look into it.
from mapperly.
Probably line 208 in EnumerableMappingBuilder
, uses the correct base types but uses the original source types count property.
from mapperly.
🎉 This issue has been resolved in version 3.4.0-next.4 🎉
The release is available on:
- GitHub release
v3.4.0-next.4
Your semantic-release bot 📦🚀
from mapperly.
I dont know should I open new issue or update this, so let's try former: something similar still exists in 3.4.0/next.4.
private partial IList<Data.PagerContact>? _MapDtoPagerContactsToPagerContacts(Model.PagerContact[]? source);
Actual generated code
[global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "3.4.0.0")]
private partial global::System.Collections.Generic.IList<global::Tekelija.TAPaging.Data.PagerContact>? _MapDtoPagerContactsToPagerContacts(global::Tekelija.Model.Dardo.PagerContact[]? source)
{
if (source == null)
return default;
var target = new global::System.Collections.Generic.List<global::Tekelija.TAPaging.Data.PagerContact>(source.Count);
foreach (var item in source)
{
target.Add(_MapPagerContactDtoToPagerContact(item));
}
return target;
}
Expected generated code
[global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "3.4.0.0")]
private partial global::System.Collections.Generic.IList<global::Tekelija.TAPaging.Data.PagerContact>? _MapDtoPagerContactsToPagerContacts(global::Tekelija.Model.Dardo.PagerContact[]? source)
{
if (source == null)
return default;
var target = new global::System.Collections.Generic.List<global::Tekelija.TAPaging.Data.PagerContact>(source.Length);
foreach (var item in source)
{
target.Add(_MapPagerContactDtoToPagerContact(item));
}
return target;
}
from mapperly.
@kockicica I cannot reproduce it with the latest next release 😞 Sometimes when upgrading a source generator package the IDE does not correctly regenerate the code with the new source generator. Have you restarted your IDE after upgrading the Mapperly package?
from mapperly.
Oh' I've restarted everything, several times - without effect unfortunately. 😄 Here's is a simple example: https://github.com/kockicica/mapperly-test
from mapperly.
Thank you for the repro, now I got it. The issue still exists when the parameter of the user defined mapping method is an array. I onl tested enumerables/arrays as object properties which is fixed. I‘ll look into it in the next days.
from mapperly.
🎉 This issue has been resolved in version 3.4.0-next.5 🎉
The release is available on:
- GitHub release
v3.4.0-next.5
Your semantic-release bot 📦🚀
from mapperly.
This is hopefully really fixed in 3.4.0-next.5. Could you (@kockicica) verify this?
from mapperly.
🎉 This issue has been resolved in version 3.4.0 🎉
The release is available on:
- GitHub release
v3.4.0
Your semantic-release bot 📦🚀
from mapperly.
Related Issues (20)
- Mapperly does not work on .NET Framework 4.x. HOT 8
- Mapping a collection property of nullable type elements affects other non-related mapping methods HOT 2
- Property specific static mapper HOT 1
- Partial select based on column names HOT 8
- Mention contributors in the release notes
- Mapperly does not properly map DateTimeOffset to gRPC entities HOT 3
- Emit warning when a mapping doesn't use the source value. HOT 2
- Support `From` and `To` static factory methods HOT 1
- OrderBy for properties in IQueryable Projection HOT 3
- Proposed breaking changes for Mapperly 4.0 HOT 4
- argument null exception on list even with allow nulls set HOT 1
- Selecting user implemented mapping method HOT 2
- Mapping DateTime to a specific TimeZone on the fly HOT 2
- Allow assembly-wide usage of UseStaticMapper HOT 3
- Dictionary value type parameter generalisation leads to unassignable types HOT 2
- Enabled reference handling does not resolve user-defined mapping methods correctly HOT 2
- Generated mappings for collection properties do not respect [MapperRequiredMapping] attribute HOT 3
- Mapping from the source object
- Mapping from the source object HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapperly.