-
Notifications
You must be signed in to change notification settings - Fork 6
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
Upgrade to clipper2? #20
Comments
We have indeed discussed upgrading to Clipper2 when we first noticed the new version on GitHub about a year ago. Other projects have kept us back from attacking it. I will meet @baddstats in another connection next week, so we can try to find a bit of time to discuss your idea. Can you elaborate a bit more on the cpp11 idea? As I understand it:
Is that correct? If not could you try to spell out a similar bullet point list? Edit: Clipper2 says "C++: Requires C++17 (but could be modified to C++11 with only minor changes)". Do you have any thoughts on the minor changes? |
@rubak Thanks for the quick response. Those points are exactly as I would have written them so yes, your understanding there is bang-on. I find the defined cpp11 types for I did have an idea of the C++17 specifics of clipper2, which was what originally prevented me from directly integrating that within my own code, but I didn't document the issues. I'll have a look at my prototype clipper2 integration and get back to you if anything comes back to me in the meantime. Thanks! Edit: It's somewhere in CPP/Clipper2Lib/include/clipper2/clipper.export.h introduced in this commit. I suspect the C++17 dependency is related to the construction of the |
@rubak and @mpadge Thank you both for spending time and energy on this. A couple of constraints to think about:
|
Regarding the first point there is no problem as far as I can see. The cpp11 headers are MIT license which is very permissive and you are allowed to put them in a GPL project and release all the code as GPL (with copyright attribution to the cpp11 code). The second point I didn't think about. I do like this feature, so maybe that is an argument for first trying to fix the configure file of the current polyclip, which hopefully isn't a huge task. @mpadge do you have some specific pointers to what we should change to avoid compiler conflicts? Then it could be a second task to try to make a GitHub-only |
I agree - using a system version of clipper if available is very advantageous, and cpp11 would remove that ability. So i suggest retracting the cpp11 suggestions. There is one further important advantage of not using cpp11, through that strictly requiring linking to code in the As for configure, the strict C++17 requirement of clipper2 would make updating for CRAN easier. Updating current clipper1 version may be a bit trickier. I got a direct email from Uwe L confirming that they simply check |
I sounds nice to move headers to An important question before editing configure files is whether we want to still support R <= 3.5 with new versions of polyclip? Everything is much easier from R 3.6 because C++11 is default. I'm a bit in doubt what to do, but I lean towards only supporting R >= 3.6. If you have a really old system you then have to download an old version of polyclip and install that manually. Updating configure is a bit more urgent as the current version does create a |
Just wondering if you've considered upgrading to clipper2. It really is a huge improvement! If so, I would also like to ask whether you'd consider a large-scale restructure through bundling a vendored version of cpp11, instead of current configure files? I would argue the sole advantage there that any bugs in compiling and/or installing would then become effectively shared bugs through being traced back to cpp11, so any problems with your build system would be shared within a much larger community than this package alone.
Here is an example of it in action (using old clipper1). Direct interfaces with
ClipperLib
remain very similar to your current ones, but no longer need any of the C interfaces to SEXP objects. Your code would be considerably simpler, the package could still remain dependency-free, and as far I see it, there'd only be one potential disadvantage of relying on ongoing functionality of external cpp11 code, but that has the advantage described above, and alleviates the disadvantages of currently fragile build system. Interested to hear your thoughts?The text was updated successfully, but these errors were encountered: