OpenRIAServices / OpenRiaServices

The Open RIA Services project continues what was previously known as WCF RIA Services.
https://openriaservices.gitbook.io/openriaservices/
Apache License 2.0
54 stars 48 forks source link

Fix .NET7+ code generation crash for RegularExpressionAttribute #449

Closed Daniel-Svensson closed 11 months ago

Daniel-Svensson commented 11 months ago

Fix #443

  1. Don't try to copy over MatchTimeout attribute to client (it has no setter)
  2. Log whole exception (hopefully with stack trace on error)

One reason that this was a problem is that the attribute does not have a ctor with no parameters so the code to figure out default property values is "broken". These types of properties should not be a problem if it would be fixed.

This specific issue seems to only happen when running on .net7 so we should make sure that code generation tests run on net7 (and net8 as well) to be sure that things work as expected

Daniel-Svensson commented 11 months ago

@SandstromErik have you already solved this issue (and potentially others) in your .NET 8 branch or should we merge this ?

SandstromErik commented 11 months ago

@SandstromErik have you already solved this issue (and potentially others) in your .NET 8 branch or should we merge this ?

@Daniel-Svensson Yes I ran into the same problem and I have made the same fix in my .Net 8 branch so it is not necessary but we might aswell merge this now since that branch is not ready yet

Daniel-Svensson commented 11 months ago

@SandstromErik there is still a tools test failing with .net7 so I had to remove thee target framework again (something with different versions of system.runtime when compiling code).

If you have fixes for this I think it would be a good idea to create a PR with your different code fixes which might make sense for .net7 and enable the codegen tests to run on .net7 in a first step.

sonarcloud[bot] commented 11 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

83.3% 83.3% Coverage
0.0% 0.0% Duplication