Skip to content
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

make MKL_jll a BuildDependency only for SCS_MKL #6766

Merged
merged 3 commits into from
Jun 10, 2023

Conversation

kalmarek
Copy link
Contributor

so that MKL_jll is a truly optional dependency for SCS ;)

@giordano does that require version bump, or is +1 fine?

cc: @odow

@giordano
Copy link
Member

I don't understand this: if this package has a package which requires MKL (I don't know), how's this optional?

@kalmarek
Copy link
Contributor Author

kalmarek commented May 19, 2023

  • SCS_jll.jl provides the default solvers for SCS.jl
  • SCS_GPU_jll.jl provides cuda-based solver, which is hidden behind @requires CUDA_jll
  • SCS_MKL_jll.jl used pardiso solver from MKL, which is hidden behind @requires MKL_jll.

SCS.jl is a very small package which is <1MB; The last two solvers depend on libs which are over 1GB in size so we thought shipping those by default is an overkill.

But we were still unconditionally forcing users to download and install MKL_jll due to Dependency in the build script (and then hiding the solver behind @require). This pull is supposed to rectify this bug/unintentional behaviour.

@giordano
Copy link
Member

giordano commented May 19, 2023

MKL is a lazy artifact, it won't be downloaded until it's using'ed:

build_tarballs(args, name, version, [source], script, [platform], products, dependencies; lazy_artifacts = true, autofix = autofix)

@kalmarek
Copy link
Contributor Author

well if I do

JULIA_DEPOT_PATH=/tmp/julia_tmp_depot julia --project=.

and then Pkg.instantiate() in SCS folder now I see

dust /tmp/julia_tmp_depot 
 33M         ┌── 833b9_8gJVM.so                      │                                                        ▒▒▒▒▒▒██ │   2%
 33M       ┌─┴ Parsers                               │                                                        ▒▒▒▒▒▒██ │   2%
 95M       │ ┌── tyub8_8gJVM.so                      │                                                        ▒▒▒▓████ │   6%
 98M       ├─┴ MathOptInterface                      │                                                        ▒▒▒█████ │   6%
170M     ┌─┴ v1.9                                    │                                                        ████████ │  11%
170M   ┌─┴ compiled                                  │                                                        ████████ │  11%
 30M   │     ┌── julia                               │                                           ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ │   2%
 43M   │   ┌─┴ share                                 │                                           ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ │   3%
 31M   │   │   ┌── libopenblas64_.0.3.21.so          │                                           ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   2%
 55M   │   │   ├── libjulia-codegen.so.1.9           │                                           ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ │   4%
 83M   │   │   ├── libLLVM-14jl.so                   │                                           ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ │   5%
217M   │   │   ├── sys.so                            │                                           ▒▒▓▓▓▓▓▓▓▓▓▓█████████ │  14%
444M   │   │ ┌─┴ julia                               │                                           ▒▒███████████████████ │  29%
444M   │   ├─┴ lib                                   │                                           ▒▒███████████████████ │  29%
497M   │ ┌─┴ julia-1.9.0+0.x64.linux.gnu             │                                           █████████████████████ │  32%
497M   ├─┴ juliaup                                   │                                           █████████████████████ │  32%
 30M   │     ┌── libopenblas.0.3.17.so               │                            ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██ │   2%
 30M   │   ┌─┴ lib                                   │                            ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██ │   2%
 31M   │ ┌─┴ 7fca6a59f5903d74ab82fd8c36b7656125da4318│                            ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██ │   2%
 67M   │ │ ┌── lib                                   │                            ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███ │   4%
 68M   │ ├─┴ a2e1b408224738d429e9a65b8ad5d94ff58cc1a7│                            ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███ │   4%
 20M   │ │   ┌── libmkl_intel_lp64.so.2              │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ │   1%
 27M   │ │   ├── libmkl_sequential.so.2              │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   2%
 29M   │ │   ├── libmkl_gnu_thread.so.2              │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   2%
 36M   │ │   ├── libmkl_pgi_thread.so.2              │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   2%
 38M   │ │   ├── libmkl_tbb_thread.so.2              │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   3%
 40M   │ │   ├── libmkl_def.so.2                     │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   3%
 46M   │ │   ├── libmkl_mc.so.2                      │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   3%
 47M   │ │   ├── libmkl_avx2.so.2                    │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   3%
 48M   │ │   ├── libmkl_mc3.so.2                     │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   3%
 50M   │ │   ├── libmkl_avx.so.2                     │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ │   3%
 62M   │ │   ├── libmkl_intel_thread.so.2            │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ │   4%
 63M   │ │   ├── libmkl_avx512.so.2                  │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ │   4%
 70M   │ │   ├── libmkl_core.so.2                    │                            ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ │   5%
760M   │ │ ┌─┴ lib                                   │                            ░░░░████████████████████████████████ │  49%
760M   │ ├─┴ 347e4bf25d69805922225ce6bf819ef0b8715426│                            ░░░░████████████████████████████████ │  49%
864M   ├─┴ artifacts                                 │                            ████████████████████████████████████ │  56%
1.5G ┌─┴ julia_tmp_depot

So it seems that MKL_jll has been eagerly downloaded; How to make it truly lazy then?

Note that we import SCS_MKL_jll within @requrie block:

    Requires.@require(
        MKL_jll = "856f044c-d86e-5d09-b602-aeab76dc8ba7",
        begin
            import SCS_MKL_jll
            if SCS_MKL_jll.is_available()
                import SCS_MKL_jll.MKL_jll
                global mkldirect = SCS_MKL_jll.libscsmkl
                push!(available_solvers, MKLDirectSolver)
            end
        end
    )

@giordano
Copy link
Member

So it seems that MKL_jll has been eagerly downloaded

Because something has done using MKL_jll somewhere somewhere.

@giordano
Copy link
Member

giordano commented May 19, 2023

More direct example:

% JULIA_PKG_SERVER="pkg.julialang.org" JULIA_DEPOT_PATH=$(mktemp -d) ./julia --startup-file=no --project=/tmp -q
(tmp) pkg> add MKL_jll
  Installing known registries into `/tmp/tmp.ZGDfNuRhok`
    Updating registry at `/tmp/tmp.ZGDfNuRhok/registries/General.toml`
   Resolving package versions...
   Installed IntelOpenMP_jll ─ v2023.1.0+0
   Installed MKL_jll ───────── v2023.1.0+0
   Installed TimerOutputs ──── v0.5.23
   Installed ExprTools ─────── v0.1.9
   Installed Preferences ───── v1.4.0
   Installed JLLWrappers ───── v1.4.1
  Downloaded artifact: IntelOpenMP
    Updating `/tmp/Project.toml`
  [856f044c] + MKL_jll v2023.1.0+0
    Updating `/tmp/Manifest.toml`
  [692b3bcd] + JLLWrappers v1.4.1
  [21216c6a] + Preferences v1.4.0
  [1d5cc7b8] + IntelOpenMP_jll v2023.1.0+0
  [856f044c] + MKL_jll v2023.1.0+0
  [0dad84c5] + ArgTools v1.1.1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [4af54fe1] + LazyArtifacts
  [b27032c2] + LibCURL v0.6.4
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.10.0
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [cf7118a7] + UUIDs
  [deac9b47] + LibCURL_jll v8.0.1+0
  [29816b5a] + LibSSH2_jll v1.10.2+0
  [c8ffd9c3] + MbedTLS_jll v2.28.2+0
  [14a3606d] + MozillaCACerts_jll v2023.1.10
  [83775a58] + Zlib_jll v1.2.13+0
  [8e850ede] + nghttp2_jll v1.52.0+0
  [3f19e933] + p7zip_jll v17.4.0+0
Precompiling project...
  10 dependencies successfully precompiled in 2 seconds

julia> using MKL_jll
  Downloaded artifact: MKL

This shows that

But we were still unconditionally forcing users to download and install MKL_jll due to Dependency in the build script

is false and the motivation of this PR is ill-based.

@kalmarek
Copy link
Contributor Author

hmm, I see your point but it's precisely SCS_MKL_jll downloading MKL_jll which I'd like to change with this PR:

$ JULIA_DEPOT_PATH=/tmp/julia_tmp_depot julia --project=.
Installing Julia 1.9.0+0.x64.linux.gnu
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.0 (2023-05-07)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(tmp) pkg> st
  Installing known registries into `/tmp/julia_tmp_depot`
Status `/tmp/Project.toml` (empty project)

(tmp) pkg> add SCS_MKL_jll
    Updating registry at `/tmp/julia_tmp_depot/registries/General.toml`
   Resolving package versions...
   Installed SCS_MKL_jll ───── v3.2.3+0
   Installed MKL_jll ───────── v2022.2.0+0
   Installed IntelOpenMP_jll ─ v2023.1.0+0
   Installed Preferences ───── v1.4.0
   Installed JLLWrappers ───── v1.4.1
  Downloaded artifact: IntelOpenMP
  Downloaded artifact: SCS_MKL
    Updating `/tmp/Project.toml`
  [3f2553a9] + SCS_MKL_jll v3.2.3+0
    Updating `/tmp/Manifest.toml`
  [692b3bcd] + JLLWrappers v1.4.1
  [21216c6a] + Preferences v1.4.0
  [1d5cc7b8] + IntelOpenMP_jll v2023.1.0+0
⌅ [856f044c] + MKL_jll v2022.2.0+0
  [3f2553a9] + SCS_MKL_jll v3.2.3+0
  [0dad84c5] + ArgTools v1.1.1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [4af54fe1] + LazyArtifacts
  [b27032c2] + LibCURL v0.6.3
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.9.0
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [deac9b47] + LibCURL_jll v7.84.0+0
  [29816b5a] + LibSSH2_jll v1.10.2+0
  [c8ffd9c3] + MbedTLS_jll v2.28.2+0
  [14a3606d] + MozillaCACerts_jll v2022.10.11
  [83775a58] + Zlib_jll v1.2.13+0
  [8e850ede] + nghttp2_jll v1.48.0+0
  [3f19e933] + p7zip_jll v17.4.0+0
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
Precompiling project...
  8 dependencies successfully precompiled in 37 seconds
  1 dependency had warnings during precompilation:
┌ SCS_MKL_jll [3f2553a9-4106-52be-b7dd-865123654657]
│   Downloading artifact: MKL
└
$ dust /tmp/julia_tmp_depot
 30M         ┌── julia                               │                                        ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓██ │   2%
 43M       ┌─┴ share                                 │                                        ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███ │   3%
 17M       │   ┌── libstdc++.so.6.0.30               │                                        ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ │   1%
 31M       │   ├── libopenblas64_.0.3.21.so          │                                        ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   2%
 55M       │   ├── libjulia-codegen.so.1.9           │                                        ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ │   4%
 83M       │   ├── libLLVM-14jl.so                   │                                        ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████ │   6%
217M       │   ├── sys.so                            │                                        ▒▒▓▓▓▓▓▓▓▓▓▓▓███████████ │  16%
444M       │ ┌─┴ julia                               │                                        ▒▒██████████████████████ │  33%
444M       ├─┴ lib                                   │                                        ▒▒██████████████████████ │  33%
497M     ┌─┴ julia-1.9.0+0.x64.linux.gnu             │                                        ████████████████████████ │  37%
497M   ┌─┴ juliaup                                   │                                        ████████████████████████ │  37%
 14M   │     ┌── libomptarget.rtl.opencl.so          │                        ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓█ │   1%
 16M   │     ├── libomptarget.rtl.level0.so          │                        ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓█ │   1%
 67M   │   ┌─┴ lib                                   │                        ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████ │   5%
 68M   │ ┌─┴ a2e1b408224738d429e9a65b8ad5d94ff58cc1a7│                        ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████ │   5%
 13M   │ │   ┌── libmkl_vml_mc3.so.2                 │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ │   1%
 14M   │ │   ├── libmkl_vml_mc.so.2                  │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ │   1%
 14M   │ │   ├── libmkl_vml_avx2.so.2                │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ │   1%
 15M   │ │   ├── libmkl_vml_avx.so.2                 │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ │   1%
 16M   │ │   ├── libmkl_intel_ilp64.so.2             │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ │   1%
 16M   │ │   ├── libmkl_gf_lp64.so.2                 │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ │   1%
 20M   │ │   ├── libmkl_intel_lp64.so.2              │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ │   2%
 27M   │ │   ├── libmkl_sequential.so.2              │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   2%
 29M   │ │   ├── libmkl_gnu_thread.so.2              │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   2%
 36M   │ │   ├── libmkl_pgi_thread.so.2              │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   3%
 38M   │ │   ├── libmkl_tbb_thread.so.2              │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   3%
 40M   │ │   ├── libmkl_def.so.2                     │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ │   3%
 46M   │ │   ├── libmkl_mc.so.2                      │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ │   3%
 47M   │ │   ├── libmkl_avx2.so.2                    │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ │   4%
 48M   │ │   ├── libmkl_mc3.so.2                     │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ │   4%
 50M   │ │   ├── libmkl_avx.so.2                     │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ │   4%
 62M   │ │   ├── libmkl_intel_thread.so.2            │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ │   5%
 63M   │ │   ├── libmkl_avx512.so.2                  │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ │   5%
 70M   │ │   ├── libmkl_core.so.2                    │                        ░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ │   5%
760M   │ │ ┌─┴ lib                                   │                        ░░░█████████████████████████████████████ │  57%
760M   │ ├─┴ 347e4bf25d69805922225ce6bf819ef0b8715426│                        ░░░█████████████████████████████████████ │  57%
829M   ├─┴ artifacts                                 │                        ████████████████████████████████████████ │  62%
1.3G ┌─┴ julia_tmp_depot

@giordano
Copy link
Member

But this PR still doesn't make any sense to me. Generating a broken JLL is a no-go. I believe you're trying to address the problem at the wrong level.

@kalmarek
Copy link
Contributor Author

SCS_GPU_jll also has CUDA_full_jll only as BuildDependency, and you may say that it is broken on face value. Since we're the only consumers of those jlls we know when to enable them so that the users experience non-broken code.

If this is not the right way of achieving this, what are other possibilities?
I believed that hiding import SCS_MKL_jll behind @requires does the trick, but apparently it doesn't, hence this pull request.

for reference this is our __init__():
https://github.com/jump-dev/SCS.jl/blob/master/src/SCS.jl#L13-L38

@odow
Copy link
Contributor

odow commented May 23, 2023

This PR

So this PR is breaking if people to use SCS_MKL_jll directly, and they haven't also run using MKL_jll.

But @kalmarek's point is that no one is using SCS_MKL_jll outside of SCS.jl, and that SCS.jl doesn't load SCS_MKL_jll unless MKL_jll is already loaded.

This is also the case for SCS_GPU_jll, which only loads if CUDA.jl is also loaded:

BuildDependency(PackageSpec(name="CUDA_full_jll", version=cuda_version))

Alternative

@giordano's suggestion is to remove SCS_MKL_jll and SCS_GPU_jll from
https://github.com/jump-dev/SCS.jl/blob/ae9186d7f45ef809c3075fa57df3c314d68fe263/Project.toml#L17-L18
and make them the "requires" packages instead of MKL_jll and CUDA_jll. That would break existing users of SCS.jl, but that's okay. And it might even be a good excuse to try out the weak dependency stuff in Julia v1.9. But to do this we'd first have to fix the SCS_GPU_jll build.

Conclusion

To be honest, I'd prefer this PR for now. But we'll need to bump the MAJOR version number because it's a breaking change. Then once Julia 1.9 or 1.10 is the LTS, we can switch to a weakdep and fix this properly?

@kalmarek
Copy link
Contributor Author

I see, I didn't think of asking users to using SCS_MKL_jll directly, but that's also a possible solution.

S/SCS_MKL/build_tarballs.jl Outdated Show resolved Hide resolved
@kalmarek
Copy link
Contributor Author

To be honest, I'd prefer this PR for now. But we'll need to bump the MAJOR version number because it's a breaking change. Then once Julia 1.9 or 1.10 is the LTS, we can switch to a weakdep and fix this properly?

@odow So this is a breaking change for SCS_MKL_jll, but I'd argue this is a bugfix for SCS.jl i.e. the intended behaviour was not to download MKL_jll just because somebody does add SCS. Are we on the same page?

As I said, since we're the only users of SCS_MKL_jll I was tempted not to bump the MAJOR, but maybe that's the easiest thing; The other one is (to keep in sync with version of scs is to make it into v301.200.300 as some people here do). but I'm fine with 4.0.0 as well

@odow
Copy link
Contributor

odow commented May 31, 2023

The other one is (to keep in sync with version of scs is to make it into v301.200.300 as some people here do)

This is what I had in mind.

since we're the only users of SCS_MKL_jll I was tempted not to bump the MAJOR,

But yes, I'd agree that this is a bug fix, so I'm okay if you want to leave as-is.

@kalmarek
Copy link
Contributor Author

@giordano We're happy to merge this, as @odow summarised above;
If you have any further objections please let us know.

@giordano
Copy link
Member

I can't say I am happy. This won't even work in the registration in General.

But @kalmarek's point is that no one is using SCS_MKL_jll outside of SCS.jl

My point is that you can't control that. You can't forbid users from using this package directly.

I hope it's clear on record that I don't like this and I don't agree with the change. I'm going to merge this just to move on but I won't deal with any breakage this should cause.

@giordano giordano merged commit b8e358c into JuliaPackaging:master Jun 10, 2023
@kalmarek kalmarek deleted the mk/scs_mkl_build_dep branch June 10, 2023 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants