MapsterMapper / Mapster

A fast, fun and stimulating object to object Mapper
MIT License
4.25k stars 326 forks source link

Unable to update to 7.4.0 in a net 4.8 project #639

Open Jojoshua opened 9 months ago

Jojoshua commented 9 months ago

Nuget says the package doesn't contain any assembly reference compatible with netframework version 4.8. Previous version of mapster installed fine.

andrerav commented 9 months ago

Mapster only targets .NET 6 and newer starting with v7.4.0. It's theoretically possible to target netstandard2.0 again, but some code will have to be rewritten since there are some features being used now that are not available in netstandard2.0. PR's are welcome for this one.

Jojoshua commented 9 months ago

Thanks for the clarification on what happened @andrerav. I just recently converted from Automapper to Mapster so kind of a bummer to see this change of direction. I have a few more questions if that's okay.

LeaFrock commented 8 months ago

Agree with @Jojoshua . Why do you drop the support of netstandard2.0? This is a huge break change as you drop the support for NFX which is still in maintenance, especially for widely-use libs like Mapster.

some code will have to be rewritten since there are some features being used now that are not available in netstandard2.0

With conditional compilation, it's originally easy to keep a fallback block for netstandard2.0. But now we have to wait for a total PR process until the next version release.

andrerav commented 8 months ago

Hi @Jojoshua,

Thanks for the clarification on what happened @andrerav. I just recently converted from Automapper to Mapster so kind of a bummer to see this change of direction. I have a few more questions if that's okay.

I can definitely understand that :)

  • This wasn't only a breaking change but a major EOL scenario. Does the project follow semantic versioning?

That is the intention, but I agree that this is an example of breaking with that.

  • Do you think only a small percentage of users need netstandard 2.0 support? In other words, would a PR to bring back its support be worthwhile?

I don't have any data on that outside of issues being reported here. As far as I can tell, there is this issue and #527 that have reported the end of support for .NET Framework as problematic.

Mapster already uses preprocessor directives numerous places (albeit some are redundant now). PR's with preprocessor directives will be as welcome as any other PR :)

andrerav commented 8 months ago

Agree with @Jojoshua . Why do you drop the support of netstandard2.0? This is a huge break change as you drop the support for NFX which is still in maintenance, especially for widely-use libs like Mapster.

some code will have to be rewritten since there are some features being used now that are not available in netstandard2.0

With conditional compilation, it's originally easy to keep a fallback block for netstandard2.0. But now we have to wait for a total PR process until the next version release.

Hi @LeaFrock,

.netstandard2.0 was dropped as a compromise related to maintainability of this project. I don't principally mind adding it back in and have already signaled that PR's are welcome for this. But the final decision can only be made when we see the scale of the required change to make this happen, and how it might affect future maintainability.

With regards to preprocessor directives, we already have many of those in Mapster. So I have no qualms accepting more PR's with that. The bigger question is how it will affect future maintainability/complexity.

Jojoshua commented 8 months ago

Hey @andrerav , I really don't know if this will work for you but here's my attempt at adding this support back https://github.com/MapsterMapper/Mapster/pull/655

cblaze22 commented 6 months ago

Let's add this back and get a valid PR.