Coder Social home page Coder Social logo

Comments (11)

kockicica avatar kockicica commented on June 16, 2024 1

Just tried and yes, i think that we can finally mark this as resolved for good. 😃 Thanks a lot.

from mapperly.

latonz avatar latonz commented on June 16, 2024

Thank you for opening this issue, looks like a regression. I‘ll look into it.

from mapperly.

TimothyMakkison avatar TimothyMakkison commented on June 16, 2024

Probably line 208 in EnumerableMappingBuilder, uses the correct base types but uses the original source types count property.

from mapperly.

github-actions avatar github-actions commented on June 16, 2024

🎉 This issue has been resolved in version 3.4.0-next.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

from mapperly.

kockicica avatar kockicica commented on June 16, 2024

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.

latonz avatar latonz commented on June 16, 2024

@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.

kockicica avatar kockicica commented on June 16, 2024

Oh' I've restarted everything, several times - without effect unfortunately. 😄 Here's is a simple example: https://github.com/kockicica/mapperly-test

from mapperly.

latonz avatar latonz commented on June 16, 2024

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.

github-actions avatar github-actions commented on June 16, 2024

🎉 This issue has been resolved in version 3.4.0-next.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

from mapperly.

latonz avatar latonz commented on June 16, 2024

This is hopefully really fixed in 3.4.0-next.5. Could you (@kockicica) verify this?

from mapperly.

github-actions avatar github-actions commented on June 16, 2024

🎉 This issue has been resolved in version 3.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from mapperly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.