# LightGraphs.jl Transition

**URL:** <https://discourse.julialang.org/t/lightgraphs-jl-transition/69526>\
**Category:** Graphs\
**Tags:** package, announcement, lightgraphs, graphs\
**Created:** [October 10, 2021, 11:04pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526 "2021-10-10T23:04:43Z")\
**Posts on this page:** 14\
**Page:** 4

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [October 23, 2021, 7:18pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/62 "2021-10-23T19:18:13Z")

</div>

> [@CameronBieganek](#):
>
> With any luck, @cscherrer is the only package author who depended on the old Graphs.jl. 😉
> 
> However, I can’t verify that on JuliaHub now, since JuliaHub now shows the dependents of the new Graphs.jl, rather than the dependents of the old Graphs.jl.

On October 8, the following 10 packages in General had a direct dependency on Graphs:

```julia
Adjacently
Arena
Caesar
CloudGraphs
CriticalDifferenceDiagrams
DistributedFactorGraphs
IncrementalInference
RoME
RoMEPlotting
Soss

```

Correction: Had `Graphs` listed in `Deps.toml` in the registry, but not necessarily for the latest version.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [October 23, 2021, 10:05pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/63 "2021-10-23T22:05:06Z")

</div>

> [@CameronBieganek](#):
>
> However, I can’t verify that on JuliaHub now, since JuliaHub now shows the dependents of the new Graphs.jl, rather than the dependents of the old Graphs.jl.

[https://juliahub.com/ui/Packages/Graphs/VJ6vx/0.10.3?page=2](https://juliahub.com/ui/Packages/Graphs/VJ6vx/0.10.3?page=2)

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [October 24, 2021, 9:11am UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/64 "2021-10-24T09:11:20Z")

</div>

Out of these 10 packages:

- `Soss` has already been discussed.
- `CriticalDifferenceDiagrams` still depends on `Graphs 0.10` and would be good to get upgraded so it can be used together with packages depending on `Graphs 1.4`.
- The remaining 8 packages belong to the JuliaRobotics organization. 6 packages have migrated away from `Graphs 0.10` at various points in time. `Arena` and `CloudGraphs` still depend on `Graphs 0.10`.

---

<div class="post-metadata">

**Author:** ![gpucce](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gpucce/32/21995_2.png) [@gpucce](https://discourse.julialang.org/u/gpucce)\
**Post date:** [January 4, 2022, 5:30pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/65 "2022-01-04T17:30:51Z")

</div>

Hi I have a much smaller issue than compats, I hope it is fine if I post it here in case someone else has a similar one.

I can’t load a MetaGraph I saved while using LightGraphs.jl in the past using the new Graphs.jl.

Is this expected or am I doing something wrong? In case it is, is there anything I can do about it?

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [January 4, 2022, 5:51pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/66 "2022-01-04T17:51:15Z")

</div>

How did you save it?

---

<div class="post-metadata">

**Author:** ![gpucce](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gpucce/32/21995_2.png) [@gpucce](https://discourse.julialang.org/u/gpucce)\
**Post date:** [January 4, 2022, 6:03pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/67 "2022-01-04T18:03:09Z")

</div>

Hi thanks for replying!

I saved it with the `savegraph` function. I have fixed my issue by rebuilding it from the start using Graphs.jl, however I think it was a compat issue because the error said that it is impossible to convert from `LightGraphs.SimpleGraph` to `MetaGraph.MetaGraph` because I had `MetaGraph` updated to 0.7.1 I think.

I hope this is helpful to someone somehow

---

<div class="post-metadata">

**Author:** ![eaubanel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eaubanel/32/13327_2.png) [@eaubanel](https://discourse.julialang.org/u/eaubanel)\
**Post date:** [May 5, 2022, 12:37pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/68 "2022-05-05T12:37:33Z")

</div>

I just found out about this, and have noticed that SimpleWeightedGraph isn’t working anymore. Using the example from [https://github.com/JuliaGraphs/SimpleWeightedGraphs.jl](https://github.com/JuliaGraphs/SimpleWeightedGraphs.jl):

```julia
g = SimpleWeightedGraph(3) # or use `SimpleWeightedDiGraph` for directed graphs
add_edge!(g, 1, 2, 0.5)

```

`add_edge!` gives an error:

```julia
ERROR: MethodError: no method matching add_edge!(::SimpleWeightedDiGraph{Int64, Float64}, ::Int64, ::Int64, ::Float64)
Closest candidates are:
  add_edge!(::LightGraphs.SimpleGraphs.AbstractSimpleGraph, ::Any, ::Any) at ~/.julia/packages/LightGraphs/IgJif/src/SimpleGraphs/SimpleGraphs.jl:90
  add_edge!(::LightGraphs.SimpleGraphs.AbstractSimpleGraph, ::Any) at ~/.julia/packages/LightGraphs/IgJif/src/SimpleGraphs/SimpleGraphs.jl:86

```

Has anyone been using weighted graphs sucessfully?

---

<div class="post-metadata">

**Author:** ![etienne\_dg](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etienne\_dg](https://discourse.julialang.org/u/etienne_dg)\
**Post date:** [May 5, 2022, 1:16pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/69 "2022-05-05T13:16:57Z")

</div>

Works normally for me, can you output the content of `]status` ?  
You should do `using Graphs, SimpleWeightedGraphs` and not importing any package of `LightGraphs`, that may cause many incompatibilities.

---

<div class="post-metadata">

**Author:** ![Kirby\_Zhang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kirby_zhang/32/36204_2.png) [@Kirby\_Zhang](https://discourse.julialang.org/u/Kirby_Zhang)\
**Post date:** [July 3, 2022, 4:58pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/70 "2022-07-03T16:58:34Z")

</div>

does this mean packages are keyed on their names, not on UUID?

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [July 3, 2022, 7:55pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/71 "2022-07-03T19:55:41Z")

</div>

I don’t know how you reach that conclusion or how it’s relevant to this discussion. No package has changed name, nor UUID. `LightGraphs` has only changed its URL. `Graphs` has completely changed it’s contents, a hugely breaking change and the version number has been bumped to reflect that.

---

<div class="post-metadata">

**Author:** ![Kirby\_Zhang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kirby_zhang/32/36204_2.png) [@Kirby\_Zhang](https://discourse.julialang.org/u/Kirby_Zhang)\
**Post date:** [July 4, 2022, 5:01am UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/72 "2022-07-04T05:01:25Z")

</div>

He’s saying you need to bound the versions after name change. If packages were lookedup by UUID, you wouldn’t need to know any of this saga or look up in forums. You’d try to update and it would say you can no longer import this UUID by Graphs you need to change to OldGraph, you cannot no longer import LightGraphs you need to import Graphs.

---

<div class="post-metadata">

**Author:** ![suavesito](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/suavesito/32/34386_2.png) [@suavesito](https://discourse.julialang.org/u/suavesito)\
**Post date:** [July 4, 2022, 6:28am UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/73 "2022-07-04T06:28:38Z")

</div>

I think you might be misunderstanding. Packages _are_ looked up by UUID. From [here](https://docs.julialang.org/en/v1/manual/code-loading/)

> packages are identified by universally unique identifiers (UUIDs), which get assigned when each package is created.

The code was copied from one package (`LightGraphs.jl`) to a _different_ one (`Graph.jl`). Now the code of the former lives under the UUID of the latter. You can think of this as a simple major rework of `Graphs.jl`. Doing this needed `Graphs.jl` to get a major version update, which it did to `v1.4`.

Stephan said the users of the _old design_ of `Graphs.jl` need to bound the dependency of the package to avoid the major update breaking their code. It has nothing to do to how the Packages are identified. No package changed their name, neither UUID’s.

---

<div class="post-metadata">

**Author:** ![Kirby\_Zhang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kirby_zhang/32/36204_2.png) [@Kirby\_Zhang](https://discourse.julialang.org/u/Kirby_Zhang)\
**Post date:** [July 4, 2022, 6:53am UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/74 "2022-07-04T06:53:08Z")

</div>

Why would people have to do that instead of keeping the original UUID’s valid? What happened to OldGraphs in your view then?

---

<div class="post-metadata">

**Author:** ![rapus95](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rapus95/32/3773_2.png) [@rapus95](https://discourse.julialang.org/u/rapus95)\
**Post date:** [July 4, 2022, 12:20pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526/75 "2022-07-04T12:20:39Z")

</div>

It faced a breaking rework in its entirety. The package wasn’t renamed, just the repo was. The UUID didn’t change. it’s kinda like for the first v1 release of Graphs.jl (where it faced the major rework) it was moved to a new repository. That now coincides to be extremely similar to the now-abandoned LightGraphs.jl repository and package. And the general rule holds, if you want to rely on the pre-v1 of Graphs.jl, you need to set the compat bound for the package to \<v1.

And without any actual insight, I guess that a pure name change while keeping the same UUID also has some complexity to it because out of a sudden several identifiers of modules/packages are replaced. Technically that’s breaking and would’ve needed a major version increase. That is, the option to simply have a silent update of LightGraphs with its own UUID would’ve been breaking aswell. So it’s the same amount of work, but you cannot run into it accidentally. And a major release to rename a package would’ve been overkill in my opinion. Just recreating it in a new package feels more like a fresh and clean restart. In the situation right now, you’re just stuck to LightGraphs 1.3.5 until you notice that it was moved and renamed.

And just for the record, none of the UUIDs became invalid. It’s just, that the package behind the LightGraphs UUID was abandoned after 1.3.5 from the technical UUID point of view.

[Previous page](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526.md?page=3)
