Dynamic unit conversions - #588
Conversation
tmilnthorp
commented
Jan 25, 2019
This isn't completely fleshed out yet. Just to show an idea, so don't merge it yet. Comments in #478 |
angularsen
left a comment
There was a problem hiding this comment.
Interesting approach, it definitely unlocks the ability to add explicit unit-to-unit conversions even across quantities. I'll comment further in the issue #478 instead.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Inline initialization and style update for field
PR feedback updates
angularsen
left a comment
There was a problem hiding this comment.
New changes looks good, but still need to digest how and why this will be used. Continuing discussion in issue.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
angularsen
commented
Jan 30, 2019
Adding a summary from prior discussion here: As for direct conversions, I think that sounds like a good idea regardless:
|
angularsen
commented
Feb 23, 2019
Re-reading this now. |
It was looked up and wrapped N times
They became a bit unwieldy. Move fields to top of class.
Since this is the most commonly used call path by far, it made sense to handle this case separately. The advantage is that the callback quantity is strongly typed.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
angularsen
commented
Feb 26, 2019
When this is merged, this wiki should be updated on the new capability to add unit conversions: |
tmilnthorp
commented
Mar 1, 2019
More work to do here (including doc obviously after warnings-as-errors). Just merging to keep up to date. |
Header update
…m quantity conversions
angularsen
commented
Apr 22, 2019
@tmilnthorp I took this for spin locally and added some improvements. I think this is ready to merge now, but waiting for you to check out the latest changes. I was specifically interested in seeing how we can improve support for third party quantities and units and added some test cases for that. It works pretty well by now, you can parse units, parse quantities and convert between quantities using only custom types. We still enforce the requirement of implementing I think there is definitely an opportunity to support simple POCO classes and structs without them having to implement If you have time, I'd also love to merge #656 . |
angularsen
left a comment
There was a problem hiding this comment.
Looks good to me, waiting for you to review my latest improvements.
This needs to port the powershell changes to the new C# codegen scripts. Update: Fixed. |
The only difference is fixing the header of a file.
angularsen
commented
Jul 17, 2019
@tmilnthorp I think this one is good to go. Two months ago I made some changes to it and I'd like you to look over them whenever you find the time so we can get this puppy merged :) |
tmilnthorp
commented
Jul 18, 2019
Looks good to me! |
angularsen
commented
Jul 18, 2019
Sweet! |
Idea for #478. I'll add more commentary there.