Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix .NET7+ code generation crash for RegularExpressionAttribute #449

Merged
merged 6 commits into from
Oct 31, 2023

Conversation

Daniel-Svensson
Copy link
Member

@Daniel-Svensson Daniel-Svensson commented Oct 25, 2023

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
Copy link
Member Author

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

@SandstromErik
Copy link
Contributor

SandstromErik commented Oct 30, 2023

@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
Copy link
Member Author

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

Copy link

sonarcloud bot commented Oct 31, 2023

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

@Daniel-Svensson Daniel-Svensson merged commit 7232897 into OpenRIAServices:main Oct 31, 2023
6 checks passed
@Daniel-Svensson Daniel-Svensson deleted the regex_codegen branch October 31, 2023 19:13
@Daniel-Svensson Daniel-Svensson added this to the 5.4.1 milestone Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants