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

Fixes mapping for C# tuples with more than seven elements #1242

Merged
merged 3 commits into from
Jun 12, 2019

Conversation

jnm2
Copy link
Contributor

@jnm2 jnm2 commented Apr 20, 2019

Fixes #982. I think I made the minimum change possible.

/cc @mgravell

Dapper/SqlMapper.cs Outdated Show resolved Hide resolved
@jnm2
Copy link
Contributor Author

jnm2 commented May 4, 2019

@mgravell Would you be able to set my expectations for an ETA on the review? I hate to bug you.

@mgravell
Copy link
Member

mgravell commented May 5, 2019 via email

Dapper/SqlMapper.cs Outdated Show resolved Hide resolved
Dapper/SqlMapper.cs Outdated Show resolved Hide resolved
@mgravell
Copy link
Member

mgravell commented May 9, 2019

I've given it a once over - looks kinda great, which is nice; I'm cautious about the int.Parse because: culture, so that might need a check; it is also possible that I'm wrong and it works fine already. I want to read it from scratch a second time, and look through the tests - but: looking very promising.

@jnm2
Copy link
Contributor Author

jnm2 commented May 9, 2019

Awesome! I'll write that nullable tuple test and fix the culture sensitivity either late tonight or sometime tomorrow and ping you when I'm finished.

After you get a chance to do the final review, I'll be curious if there's a prerelease feed.

@mgravell
Copy link
Member

mgravell commented May 9, 2019 via email

@jnm2 jnm2 force-pushed the valuetuple_nesting branch from 31bf76f to 93245d2 Compare May 10, 2019 22:46
@jnm2 jnm2 force-pushed the valuetuple_nesting branch from 93245d2 to f61c3ce Compare May 10, 2019 23:58
@jnm2
Copy link
Contributor Author

jnm2 commented May 10, 2019

@mgravell Ready for the second round!

@jnm2
Copy link
Contributor Author

jnm2 commented May 24, 2019

The force pushes above are adding CultureInfo.InvariantCulture and removing returnNullIfFirstMissing, addressing both your comments.

Do you think you might have a chance coming up next week to review again? I appreciate the time you've been able to give.

@jnm2
Copy link
Contributor Author

jnm2 commented Jun 4, 2019

@mgravell The workaround at the moment is to introduce new private throwaway structs, so this keeps coming up. Is this PR a very risky one? Would it help if I added more tests?

@mgravell
Copy link
Member

let's do this...

@mgravell mgravell merged commit 33d974a into DapperLib:master Jun 12, 2019
@jnm2
Copy link
Contributor Author

jnm2 commented Jun 12, 2019

We'll start using the MyGet feed right away! Thank you so much! 🎉

@mgravell
Copy link
Member

No: thank you. It was your contribution, and it is very much appreciated. Delay here was mostly my time juggling. Thanks again.

@jnm2
Copy link
Contributor Author

jnm2 commented Jun 12, 2019

As an OSS maintainer, I know PRs are also demanding. I appreciate you reviewing and getting this through.

il.Emit(OpCodes.Ldarg_0); // stack is now [...][reader]
EmitInt32(il, index); // stack is now [...][reader][index]
il.Emit(OpCodes.Dup);// stack is now [...][reader][index][index]
il.Emit(OpCodes.Stloc_0);// stack is now [...][reader][index]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line introduced bug #1279, fixed in #1280.

rhubley pushed a commit to rhubley/Dapper that referenced this pull request Jan 29, 2020
…1242)

* Failing tests for tuples larger than 7

* Special-case IL generation for ValueTuple

* Make value-processing logic available to ValueTuple generation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mapping to a ValueTuple with 8 or more elements only retrieves some columns
2 participants