FedeClaudi / Term.jl

Julia library for stylized terminal output
MIT License
447 stars 37 forks source link

Package incompatibility with SciML Benchmarks #177

Closed TorkelE closed 1 year ago

TorkelE commented 1 year ago

Hello, I wanted to use this package, however, I do some development on SciML Benchmarks. It seemed unexpected, but it seems these two packages are incompatible due to package requirements. I realise it might be hard to fix this, but seems like there shouldn't be anything preventing these from fitting together?

Here's the error message:

╭──────────────────────────────────────────────────────── Pkg.Resolve.ResolverError ───────────────────────────────────────────────────────╮
│                                                                                                                                          │
│  Unsatisfiable requirements detected for package Weave [44d3d7a6]:                                                                       │
│   Weave [44d3d7a6] log:                                                                                                                  │
│   ├─possible versions are: 0.6.0-0.10.10 or uninstalled                                                                                  │
│   ├─restricted by compatibility requirements with SciMLBenchmarks [31c91b34] to versions: 0.10.0-0.10.10                                 │
│   │ └─SciMLBenchmarks [31c91b34] log:                                                                                                    │
│   │   ├─possible versions are: 0.1.0-0.1.1 or uninstalled                                                                                │
│   │   └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.1.1                                           │
│   └─restricted by compatibility requirements with Highlights [eafb193a] to versions: uninstalled — no versions left                      │
│     └─Highlights [eafb193a] log:                                                                                                         │
│       ├─possible versions are: 0.3.0-0.5.2 or uninstalled                                                                                │
│       └─restricted by compatibility requirements with Term [22787eb5] to versions: 0.5.0-0.5.2                                           │
│         └─Term [22787eb5] log:                                                                                                           │
│           ├─possible versions are: 0.1.0-1.0.6 or uninstalled                                                                            │
│           └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-1.0.6                                       │
│                                                                                                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
FedeClaudi commented 1 year ago

mmm I've never seen this happen before. Does it occur even in a fresh environment with only SciML and Term? What Julia version, Term version?

TorkelE commented 1 year ago

Latest version of Julia and Term, when trying to add SciMLBecnhmarks. Here is the result:

julia> versioninfo()
Julia Version 1.8.3
Commit 0434deb161e (2022-11-14 20:14 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × 12th Gen Intel(R) Core(TM) i7-1260P
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, goldmont)
  Threads: 1 on 16 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 

(Julia Temporary Environment) pkg> status
Status `~/Desktop/Julia Temporary Environment/Project.toml`
  [22787eb5] Term v1.0.6

(Julia Temporary Environment) pkg> add SciMLBenchmarks
   Resolving package versions...
ERROR: 

ERROR: 

──────────────────────────────────────────────────────────────────────────── UndefVarError ────────────────────────────────────────────────────────────────────────────
╭──── Error Stack ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                          │
│                                                                                                                                          │
│  ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮        │
│  │                                                                                                                              │        │
│  │  (1) top-level scope                                                                                                         │        │
│  │      /home/torkelloman/Desktop/Julia Temporary Environment/playground.jl:28                                                  │        │
│  │         ╭──────────────────────────────────────────────────────────╮                                                         │        │
│  │         │    26                                                    │                                                         │        │
│  │         │    27 using Pkg                                          │                                                         │        │
│  │         │  ❯ 28 Pkg.add("SciMLBenchmarks")                         │                                                         │        │
│  │         │    29 Pkg.dev("Catalyst")                                │                                                         │        │
│  │         ╰─────────────────────── error line ───────────────────────╯                                                         │        │
│  │                                                                                                                              │        │
│  ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────── TOP LEVEL ───╯        │
│                                                                                                                                          │
╰──── Error Stack ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭────────────────────────────────────────────────────────────── UndefVarError ─────────────────────────────────────────────────────────────╮
│                                                                                                                                          │
│  Undefined variable `Pkg`.                                                                                                               │
│                                                                                                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

(Julia Temporary Environment) pkg> 

(The error is repeated because I have to rerun the add command in a VSCode window to actually get the full message to show up, per previous report)

FedeClaudi commented 1 year ago

mmm Undefined variablePkg` doesn't seem to be a problem with Term, though I'm confused why it happens since you're importing Pkg.

A few questions to help me understand.

  1. What's installed in Julia Temporary Environment?
  2. are you using term in your startup.jl? What if you don't?
  3. do you have Term installed in the environment? What if you remove it prior to installing SciMLBenchmarks?
TorkelE commented 1 year ago

So, in the status, I only have

Status `~/Desktop/Julia Temporary Environment/Project.toml`
  [22787eb5] Term v1.0.6

This is my startup file:

using OhMyREPL
using Revise
import Term: install_term_stacktrace
install_term_stacktrace()

If I remove Term, add SciMLBecnhmarks, then I have:

(Julia Temporary Environment) pkg> status
Status `~/Desktop/Julia Temporary Environment/Project.toml`
  [31c91b34] SciMLBenchmarks v0.1.1

I then try to add Term but get:

ERROR: 

────────────────────────────────────────────────────────────────────── Pkg.Resolve.ResolverError ──────────────────────────────────────────────────────────────────────
╭──── Error Stack ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                          │
│                                                                                                                                          │
│  ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮        │
│  │                                                                                                                              │        │
│  │  (1) top-level scope                                                                                                         │        │
│  │      /home/torkelloman/Desktop/Julia Temporary Environment/playground.jl:29                                                  │        │
│  │                                                                                                                              │        │
│  ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────── TOP LEVEL ───╯        │
│                                                                                                                                          │
│     (2) add(pkg::String)                                                                                                                 │
│          ──── In module Pkg  ────                                                                                                        │
│         /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/API.jl:143                          │
│                                                                                                                                          │
│     (3) #add#26    inlined                                                                                                               │
│         /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/API.jl:143                          │
│                                                                                                                                          │
│     (4) add    inlined                                                                                                                   │
│         /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/API.jl:144                          │
│                                                                                                                                          │
│     (5) #add#27    inlined                                                                                                               │
│         /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/API.jl:144                          │
│                                                                                                                                          │
│     (6) add(pkgs::Vector)                                                                                                                │
│          ──── In module Pkg  ────                                                                                                        │
│         /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/API.jl:145                          │
│                                                                                                                                          │
│     (7) add(pkgs::Vector; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union, Tuple, NamedTuple {#FFF59D}(), Tuple} )                        │
│          ──── In module Pkg  ────                                                                                                        │
│         /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/API.jl:156                          │
│                                                                                                                                          │
│     (8) (::Pkg.API.var"#add##kw")(::NamedTuple {#FFF59D}(:io,), Tuple}, ::typeof(Pkg.API.add), ctx::Pkg.Types.Context,                   │
│     pkgs::Vector)                                                                                                                        │
│          ──── In module Pkg                                                                                                              │
│     ────                                                                                                                                 │
│         /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/API.jl:226│
│     [39m                                                                                                                                 │
│                                                                                                                                          │
│     (9) add(ctx::Pkg.Types.Context, pkgs::Vector; preserve::Pkg.Types.PreserveLevel,                                                     │
│     platform::Base.BinaryPlatforms.Platform,                                                                                             │
│         kwargs::Base.Pairs{Symbol, Base.TTY, Tuple, NamedTuple {#FFF59D}(:io,),                                                          │
│     Tuple} )                                                                                                                             │
│          ──── In module Pkg                                                                                                              │
│     ────                                                                                                                                 │
│         /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/API.jl:275│
│     [39m                                                                                                                                 │
│                                                                                                                                          │
│     (10) add    inlined                                                                                                                  │
│          /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Operations.jl                      │
│          :1265                                                                                                                           │
│                                                                                                                                          │
│     (11) add(ctx::Pkg.Types.Context, pkgs::Vector, new_git::Set; preserve::Pkg.Types.PreserveLevel,                                      │
│     platform::Base.BinaryPlatforms.Platform)                                                                                             │
│           ──── In module Pkg                                                                                                             │
│     ────                                                                                                                                 │
│          /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Operations.jl                      │
│                                                                                                                                          │
│          :1276                                                                                                                           │
│                                                                                                                                          │
│                                                                                                                                          │
│     (12) _resolve(io::Base.TTY, env::Pkg.Types.EnvCache, registries::Vector, pkgs::Vector,                                               │
│     preserve::Pkg.Types.PreserveLevel,                                                                                                   │
│          julia_version::VersionNumber)                                                                                                   │
│                                                                                                                                          │
│           ──── In module Pkg                                                                                                             │
│     ────                                                                                                                                 │
│          /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Operations.jl                      │
│                                                                                                                                          │
│          :1260                                                                                                                           │
│                                                                                                                                          │
│                                                                                                                                          │
│     (13) tiered_resolve(env::Pkg.Types.EnvCache, registries::Vector, pkgs::Vector, julia_version::VersionNumber)                         │
│           ──── In module Pkg  ────                                                                                                       │
│          /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Operations.jl                      │
│          :1239                                                                                                                           │
│                                                                                                                                          │
│     (14) targeted_resolve(env::Pkg.Types.EnvCache, registries::Vector, pkgs::Vector, preserve::Pkg.Types.PreserveLevel,                  │
│     julia_version::VersionNumber)                                                                                                        │
│           ──── In module Pkg                                                                                                             │
│     ────                                                                                                                                 │
│          /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Operations.jl                      │
│                                                                                                                                          │
│          :1254                                                                                                                           │
│                                                                                                                                          │
│                                                                                                                                          │
│     (15) resolve_versions!(env::Pkg.Types.EnvCache, registries::Vector, pkgs::Vector, julia_version::VersionNumber)                      │
│           ──── In module Pkg  ────                                                                                                       │
│          /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:352                  │
│                                                                                                                                          │
│     (16) simplify_graph!    inlined                                                                                                      │
│          /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Resolve/graph                      │
│          type.jl:1532                                                                                                                    │
│                                                                                                                                          │
│     (17) simplify_graph!    inlined                                                                                                      │
│          /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Resolve/graph                      │
│          type.jl:1532                                                                                                                    │
│                                                                                                                                          │
│     (18) simplify_graph!(graph::Pkg.Resolve.Graph, sources::Set; clean_graph::Bool)                                                      │
│           ──── In module Pkg  ────                                                                                                       │
│          /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Resolve/graph                      │
│          type.jl:1533                                                                                                                    │
│                                                                                                                                          │
│     (19) propagate_constraints!    inlined                                                                                               │
│          /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Resolve/graph                      │
│          type.jl:1008                                                                                                                    │
│                                                                                                                                          │
│     (20) propagate_constraints!    inlined                                                                                               │
│          /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Resolve/graph                      │
│          type.jl:1008                                                                                                                    │
│                                                                                                                                          │
│  ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮        │
│  │                                                                                                                              │        │
│  │  (21) propagate_constraints!(graph::Pkg.Resolve.Graph, sources::Set; log_events::Bool)                                       │        │
│  │        ──── In module Pkg  ────                                                                                              │        │
│  │       /home/torkelloman/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/share/julia/stdlib/v1.8/Pkg/src/Resolve/graph             │        │
│  │       type.jl:1072                                                                                                           │        │
│  │                                                                                                                              │        │
│  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────── ERROR LINE ───╯        │
│                                                                                                                                          │
╰──── Error Stack ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────── Pkg.Resolve.ResolverError ───────────────────────────────────────────────────────╮
│                                                                                                                                          │
│  Unsatisfiable requirements detected for package Highlights [eafb193a]:                                                                  │
│   Highlights [eafb193a] log:                                                                                                             │
│   ├─possible versions are: 0.3.0-0.5.2 or uninstalled                                                                                    │
│   ├─restricted by compatibility requirements with Term [22787eb5] to versions: 0.5.0-0.5.2                                               │
│   │ └─Term [22787eb5] log:                                                                                                               │
│   │   ├─possible versions are: 0.1.0-1.0.6 or uninstalled                                                                                │
│   │   └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-1.0.6                                           │
│   └─restricted by compatibility requirements with Weave [44d3d7a6] to versions: 0.3.1-0.4.5 — no versions left                           │
│     └─Weave [44d3d7a6] log:                                                                                                              │
│       ├─possible versions are: 0.6.0-0.10.10 or uninstalled                                                                              │
│       └─restricted by compatibility requirements with SciMLBenchmarks [31c91b34] to versions: 0.10.0-0.10.10                             │
│         └─SciMLBenchmarks [31c91b34] log:                                                                                                │
│           ├─possible versions are: 0.1.0-0.1.1 or uninstalled                                                                            │
│           └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.1.1                                       │
│                                                                                                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
FedeClaudi commented 1 year ago

Sorry for the delay in getting back to you.

It seems that SciMLBenchmarks uses Weave and that Weave's compat version for Highlights is for an older one (see here).

It's the first time I come upon an incompatibility issue like this in Julia, so I'm unsure about what best practices are here. Perhaps an issue can be made at Weave to ask for them to update to the latest version of highlights if its compatible with their workflow?

TorkelE commented 1 year ago

I have opened an issue at Weave.jl (https://github.com/JunoLab/Weave.jl/issues/467) to see if we can sort this out.

FedeClaudi commented 1 year ago

keep me posted!

FedeClaudi commented 1 year ago

I'll close this for now, but please let me know if there's any developments!