-
Notifications
You must be signed in to change notification settings - Fork 76
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 graph_algorithm for API changes in igraph 0.10 #487
Conversation
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.
@szhorvat Thank you very much for your contribution. I like the API changes provided by igraph 0.10 and using the new find_package() mechanism provided by igraph is very neat.
However, a lot of hal user are still using ubuntu 20.04 which comes with out-of-the-box igraph version 0.7. Cloning the igraph 0.10 repository does not seem an option since it won't build with out-of-the-box cmake version 3.16.
I am suggesting that we use a preprocessor flag like #if FOUND_IGRAPH_0_10 to use your tweaks if the igraph 0.10 version was installed on the system.
Do you have any better ideas ?
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.
@szhorvat Thank you very much for your contribution. I like the API changes provided by igraph 0.10 and using the new find_package() mechanism provided by igraph is very neat.
However, a lot of hal user are still using ubuntu 20.04 which comes with out-of-the-box igraph version 0.7. Cloning the igraph 0.10 repository does not seem an option since it won't build with out-of-the-box cmake version 3.16.
I am suggesting that we use a preprocessor flag like #if FOUND_IGRAPH_0_10 to use your tweaks if the igraph 0.10 version was installed on the system.
Do you have any better ideas ?
I thought a bit about this, and I would not recommend trying to write code which is compatible both with igraph 0.9 and 0.10. The API has changed significantly in 0.10. Previous versions used the All this means that it's not practical to use My recommendation is to delay merging this PR until you are ready to bump the requirements for HAL. It seems reasonable that at some point people have to either upgrade their operating system, or accept that they are stuck with using older software (including an older version of HAL). I'm in this situation too as I still use macOS 10.14 due to needing to use some 32-bit programs. Thus I'm stuck with older versions of most non-free software I use, and also some of the free software. It's up to you to decide when the time is ripe to start requiring newer versions of depdencies. You are right that Ubuntu 20.04 is still more popular than 22.04. Some potential solutions for Ubuntu 20.04: Ubuntu comes with Once the CMake problem is solved, there's still the issue of current Ubuntu versions not having igraph 0.10. To make the life of your users easy, you might choose to bundle igraph as a git submodule, like in We use a similar approach in igraph: all non-optional dependencies are bundled, and so are some of the optional ones. If an external version of the dependency is not found, the internal copy is used. The target audience of igraph is mainly researchers, not programmers, and we wanted to make it as easy as possible for them to install it. Of course igraph is not a small package, so you might consider it too heavy for bundling ... what some packages do is that they auto-download dependencies when they are not present on the system (e.g. |
@szhorvat your ideas about the best way how to integrate igraph under Ubuntu 20.04 are well thought out and very convincing. I have only two comments to add:
|
@joern274 I'm sorry about the late response. Unfortunately I'm overwhelmed at the moment and wouldn't have time to make such as Unfortunately from here on I need to leave it to you do use this PR now or use it as a reference at a later time. I hope it'll be useful for upgrading the code to igraph 0.10 whenever you choose to make that move. If you have any igraph specific questions, feel free to ask.
That's definitely easiest for users (and what I prefer in the role of a user 🙂 ), but for producing ready-to-use binaries, moving to an igraph version not included in Ubuntu 20.04 is not a problem, since you are in full control of the machine where binaries are produced. Or am I misunderstanding what you mean? |
will (finally) be solved in feature/latest_igraph by rewriting / cleaning up the entire plugin |
Let me know if you want feedback on the update / igraph API use. Note that igraph 1.0 is coming in a few months, and will bring more breaking changes. These changes will be mostly localized to specific functions, an adapting using |
This PR is intended to help with updating HAL for the API changes in igraph 0.10.
The basics are there, and it should work, but I would like to ask for a HAL developer to take over and finalize this PR. I hope this is useful, but feel free to do with it as you please.
Changes:
edges
vector was not destroyed).FindIGraph.cmake
with igraph's native CMake supportTODO:
install_dependencies.sh
.