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 Integration test - System.ArgumentException: 'Cannot generate a hash code for ValueTuple`3 Arg_ParamName_Name' #613

Open
baseTwo opened this issue Oct 18, 2024 · 0 comments · May be fixed by #614

Comments

@baseTwo
Copy link
Collaborator

baseTwo commented Oct 18, 2024

Error

The Integration Test running is failing with the following exception:

System.ArgumentException
  HResult=0x80070057
  Message=Cannot generate a hash code for ValueTuple`3 Arg_ParamName_Name
  Source=Hl7.Cql.Comparers
  StackTrace:
   at Hl7.Cql.Comparers.CqlComparers.GetHashCode(Object x) in C:\Dev\firely-cql-sdk\Cql\Cql.Comparers\CqlComparers.cs:line 321

at

Measures.CMS.dll!UrinarySymptomScoreChangeAfterBenignProstaticHyperplasiaFHIR_1_3_000.Urinary_Symptom_Score_Assessment(Hl7.Cql.Runtime.CqlContext context) Line 707
	at C:\Dev\firely-cql-sdk\Demo\Measures.CMS\CSharp\UrinarySymptomScoreChangeAfterBenignProstaticHyperplasiaFHIR-1.3.000.g.cs(707)

while running this test

UrinarySymptomScoreChangeAfterBenignProstaticHyperplasiaFHIR.Population_FromResource(testCaseId: "051c5977-9f2c-4e8b-8e02-ac3ec0c718d6")

Background

Tuples emitted to C# have recently changed from being derived from TupleBaseType to just value tuples (ValueTuple<,,,...> at runtime).

Solution

  • The CqlComparer must be updated to support value tuples
  • Add unit tests
  • TupleBaseType is part of the Cql.Primitives project. It is no longer used at runtime, consider making this internal. It is only used to generate the expression LINQ tree as a temporary placeholder until C# generates value tuples.
@baseTwo baseTwo self-assigned this Oct 18, 2024
@baseTwo baseTwo added this to the NCQA Summit 2024 milestone Oct 18, 2024
@baseTwo baseTwo changed the title Fix Integration test - System.ArgumentException: 'Cannot generate a hash code for ValueTuple3 Arg_ParamName_Name`' Fix Integration test - System.ArgumentException: 'Cannot generate a hash code for ValueTuple`3 Arg_ParamName_Name' Oct 18, 2024
@baseTwo baseTwo linked a pull request Oct 18, 2024 that will close this issue
@baseTwo baseTwo linked a pull request Oct 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant