Comments (11)
I am happy to announce that the underlying issue with NormalizeWhitespace
API has been resolved. The fix will be available in the next version of roslyn SDK. If you find any broken cases or other bugs in this area, feel free to open new issues at dotnet/roslyn
from mapperly.
I recognize the issue, but will probably wait until something better is available from Microsoft. Implementing something custom to fix this issue is not in scope for Mapperly.
from mapperly.
As far as I know, MS.CA.* packages are bound to Visual Studio releases. So 4.5 version should become available as soon as VS 17.5 releases. But I am not completely sure about that
from mapperly.
Mapperly uses NormalizeWhitespace of roslyn which produces this formatting. Either an issue needs to be opened in the roslyn repo or Mapperly would need to implement a formatter which is applied after NormalizeWhitespace is called 🤔
from mapperly.
NormalizeWhitespace
has several issues, like this one, and the fact that it's very slow, so it's not ideal for use in source generators the way things currently are. Inserting trivia manually and not using NormalizeWhitespace
is another option. If using NormalizeWhitespace
you either have to insert trivia manually after anyway, or use the formatting stuff. I think that needs a workspace, though, and that sounds even slower which isn't great for a source generator.
from mapperly.
That's totally fair. Unfortunately it's not an issue for Microsoft either, so I wouldn't expect anything from them. There's a PR for a slight performance improvement in NormalizeWhitespace
, but that's the only thing I'm aware of. Now that source generators are becoming so popular I would expect the community to come up with something before MS does.
from mapperly.
Good point. We will certainly use solutions provided by the community, not only from Microsoft themselves.
from mapperly.
This is being tracked in dotnet/roslyn#61204. There are also some open issues about the poor performance of NormalizeWhitespace
, as it is being used more often in source generators for a lack of a better alternative.
from mapperly.
This project uses Roslyn APIs which you would think would make perfect sense. But if you look at MS's generators, they don't even use them, they just write strings out directly. I guess they already knew their code generation API was crappy.
from mapperly.
@DoctorKrolic do you know when Microsoft.CodeAnalysis.CSharp
4.5 is released? I couldn't find any information on the release schedule of the roslyn sdk. Is it going to be released with dotnet 7.0.3
? or not until 7.1
/ 8.0
?
from mapperly.
🎉 This issue has been resolved in version 2.7.0 🎉
The release is available on:
- GitHub release
v2.7.0
Your semantic-release bot 📦🚀
from mapperly.
Related Issues (20)
- Ignoring a property based on the attribute on the property instead of the mapper attribute HOT 5
- Add the GeneratedCodeAttribute to generated code HOT 3
- Add support for dynamic object mapping
- Bug in nullability and external mappers HOT 2
- UseDeepCloning with Action Properties
- `EnumMappingStrategy.ByName` not working for `IQueryable` mapping
- Duplicate source generated mapping methods for collection properties HOT 5
- Add support for EnumMemberAttribute HOT 3
- Consider adding strong name signing HOT 2
- 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
- IReadOnlyCollection as interface param uses Length instead of Count when source is an array HOT 11
- 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
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.