-
Notifications
You must be signed in to change notification settings - Fork 387
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
Update abbreviations #691
Update abbreviations #691
Conversation
Codecov Report
@@ Coverage Diff @@
## master #691 +/- ##
=======================================
Coverage 58.34% 58.34%
=======================================
Files 165 165
Lines 37450 37450
=======================================
Hits 21852 21852
Misses 15598 15598 Continue to review full report at Codecov.
|
While this is a good change, it is a breaking one. I think that's easily remedied by adding the new abbreviations to the list rather than replacing them (like you did for VolumeFlow). |
@tmilnthorp You got me. I completely neglected the PR is breaking. Some of my thoughts for my PR:
Anyhow, I aggree with you that adding abbrevations to the list is reasonable for avoiding breaking changes. |
If you add the abbreviation to the beginning, it should make it the new default. That would be a behavior change, but at least is would still allow parsing of the old units. @angularsen what are you thoughts on this kind of behavior change? I believe it should be ok as these changes are more standard. It would only break applications that do something with the default abbreviation (say parsing it themselves for whatever reason). But that we can't help. Any code doing round-trip ToString and Parse within UnitsNet will still work so long as the old abbreviations are kept at the end of the list. |
@tmilnthorp @lingyunyumo Yup, I'm fine with changing default abbreviation. I don't consider that a breaking change. Consumers should not depend on ToString() never changing in my opinion, we have unit enums they can rely on instead. |
@angularsen I re-pushed some commits to this PR. Could you have a look if this PR can be merged? |
Looks good to me, although it looks like you did not run the code generator. The build does not automatically do that and commit the generated files, so it must still be done manually |
I just merged this anyway, will fix on master. |
Regenerate source code missing in PR.
Sounds good. I wonder if we could set up the builds to automatically commit generated code to the source branch if any were found. |
It should be possible by doing a local git diff on the build agent. Would be a nice addition. |
No description provided.