-
Notifications
You must be signed in to change notification settings - Fork 112
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
Make u_str work with precompilation #201
Conversation
We can check that the unit extension module is loaded into the current module in which the u_str macro is invoked. This should allow `u_str` to be safely used with precompilation.
c68c0e4
to
7724fd4
Compare
Codecov Report
@@ Coverage Diff @@
## master #201 +/- ##
==========================================
+ Coverage 74.76% 78.94% +4.17%
==========================================
Files 14 14
Lines 947 964 +17
==========================================
+ Hits 708 761 +53
+ Misses 239 203 -36
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #201 +/- ##
==========================================
+ Coverage 74.76% 78.94% +4.17%
==========================================
Files 14 14
Lines 947 964 +17
==========================================
+ Hits 708 761 +53
+ Misses 239 203 -36
Continue to review full report at Codecov.
|
Updated tests to fix a difference in the exception type thrown in 0.7 vs 1.0. |
Thanks for looking at this. It seems like it should work, so after the tests pass I'll merge and we can see if there's any unexpected fallout :) |
This seems to have broken a few packages. Closer to the end of the week I hope to get a chance to look closer but it looks like your error message is popping up frequently, so some packages must not be doing what you think they should. |
Hmm, darn. Nothing like trying it out to find your assumptions are a little broken... or alternatively that your implementation has become part of your public API against your best intentions. There's a bit of both here I think ;-) The The The Can't tell what's wrong with |
Fixing Also, I think it would be good to mention this new restriction on |
I just tagged UnitfulAtomic 0.2.0 (which is compatible with the new |
I was a little disheartened to see that the (hugely convenient and awesome)
u_str
is not recommended for use with precompilation when used with unit plugin modules. I think the following approach fixes that: I've just added a check that the desired unit extension module is explicitly loaded into the module before the u_str macro is invoked.Demo: