-
Notifications
You must be signed in to change notification settings - Fork 149
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
Use new inner constructor and type declaration syntax #107
Conversation
LGTM. Thanks Andreas. Just so you know, I was planning on merging and releasing #105 first, before merging this one. This plus major changes due to #106 are required before this package is usable on v0.6. Those other changes are backward compatible so maybe they should be released for v0.5 too (otherwise it would block backporting). Would a |
CI is complaint about |
The problem is that the syntax doesn't parse at all so we'll end up with a lot of definitions like https://github.com/Evizero/UnicodePlots.jl/blob/master/src/graphics/bargraphics.jl#L1-L44 which I think is ugly. Personally, I think it is better to focus development hours on 0.6 and thereafter instead of compatibility. There is a problem with the build bots so CI is running with old binaries that don't have the latest syntax changes. Tests pass locally on latest master. |
I think merging this might be a bit premature - are the change here required to make the package work on 0.6, or are they syntactic niceties? If possible it would be nice for master to continue working with 0.5 for a while. |
The inner constructor syntax is deprecated so it gives warnings on master. The only way to make it work across 0.5 and 0.6 is to write that code as strings and use |
There is always the |
Thanks for pointing that out. I wasn't aware of that. I'll update the PR. |
d340f7d
to
a33600e
Compare
Thanks Andreas (and good idea, Tim). I still think it would be better to delay this for just the moment and first address #106, which completely and utterly destroys any custom subtypes of At that point we can base development on v0.6 (and backport crucial fixes to v0.5 - but not fixing #106 first will make any backports less trivial). This will let us (in no particular order):
Basically, this package is unusually low-level and reliant on certain compiler behavior - I'd rather not have this package be artificially limited by continuing to support two versions of Julia. I do apologize about the deprecation warning noise between now and then - I would suggest to keep rebasing this branch on the other changes for the next little while, and use this branch for downstream development work targeting v0.6 in the meantime. I am also open to dropping v0.5 support now if people think this is a better route (how many backports will there really be?). But please, do keep in mind how completely broken custom static arrays are - deprecation warnings might be a good warning-sign for users :) |
Based on JuliaArrays/StaticArrays.jl#107 (comment). fix mistake in TreeVertex constructor
Based on JuliaArrays/StaticArrays.jl#107 (comment). fix mistake in TreeVertex constructor Fix MechanismState constructor
Based on JuliaArrays/StaticArrays.jl#107 (comment). fix mistake in TreeVertex constructor Fix MechanismState constructor
Based on JuliaArrays/StaticArrays.jl#107 (comment). fix mistake in TreeVertex constructor Fix MechanismState constructor
I don't really understand why merging these small deprecation warning fixes could be a problem for fixing custom static arrays. Notice, that the PR doesn't drop 0.5 anymore. |
I suppose it should be OK now that I'm tagging the @andreasnoack this PR now has conflicts (my fault) |
consequently drop 0.5 support.
Nice, thanks for putting up with 0.5 for a little longer :-) |
typealias Mat2d Mat{2,2, Float64, 4} | ||
typealias Mat3d Mat{3,3, Float64, 9} | ||
typealias Mat4d Mat{4,4, Float64, 16} | ||
@compat const Vec1d = Vec{1, Float64} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sometimes const
and sometimes not syntax isn't really great (not your fault, mind you).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, I noticed this syntax quirk too. Hard to know what to do about it. In packages, it would be nice if all bindings at global scope were implicitly const by default. But for simple scripting that would be fairly horrible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be a special property of Main
? (Or some property that could be set on a module-by-module basis).
Travis errors are odd... |
@@ -66,7 +66,7 @@ end | |||
SMatrix{S1, S2, $T, L}(x) | |||
end | |||
end | |||
typealias SMatrixNoType{S1, S2, L, T} SMatrix{S1, S2, T, L} | |||
@compat SMatrixNoType{S1, S2, L, T} = SMatrix{S1, S2, T, L} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why, but I don't remember this existing, which is why I couldn't fathom the test failure... In theory, MMatrix
should be symmetric. But don't worry about this for this PR.
On 0.6, there seems to be an issue with |
I made an issue for that |
Oh, I missed that one. |
I just merged this, Andreas. I still plan to remove Compat and v0.5 support sometime soonish. |
Could you make a release first? |
Yes, let's make a release before we break everything with #113 (I guess this will end up dropping 0.5 support... honestly I was hoping to last a little longer!) |
I was wondering who the target audience was? There is no functional changes for v0.5 users and v0.6 users will be using quite a different codebase soon... @andreasnoack is using |
Using a release is slightly simpler in a larger group of collaborators but the main reason is Travis testing where it is pretty inconvenient to use master. |
Yes, Travis. That makes sense. |
The new syntax for inner constructors doesn't parse on 0.5 so it will be ugly and more demanding to support on both versions. Furthermore, 0.6 will be out soon and nobody will care about 0.5. If they care anyway and we add features then we can backport those features to a 0.5 branch.