JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.52k stars 5.46k forks source link

Standardize stdlib dependency knowledge location #50684

Open staticfloat opened 1 year ago

staticfloat commented 1 year ago

We should have a single source of truth for stdlib dependency knowledge. As it stands, we have 2.5 separate places where this knowledge is encoded:

  1. In stdlib Project.toml such as here
  2. In pkgimage.mk, such as here. 2.5. In sysimg.jl, such as here (Note, this one counts as 1/2 because only topological sort order is recorded, rather than a full dependency graph).

This makes it needlessly difficult to alter stdlib dependencies. Instead, we should automatically compute this from the Project.toml files in all cases. We should also record the sysimg/pkgimage decision in the same place, perhaps by setting a preference in the Project.toml?

bkamins commented 1 year ago

CC @nalimilan - the key points are:

vchuravy commented 1 year ago

https://github.com/JuliaLang/julia/pull/51368 did part of this and after #51399 we have much fewer listed in sysimg.jl.

For the last step we do need a toml parser and then convert that to Makefiles variables. That seems obnoxious. Or we have something that autogenerated stdlib.mk for us...