-
Notifications
You must be signed in to change notification settings - Fork 13
/
CondaPkg.jl
39 lines (31 loc) · 1.02 KB
/
CondaPkg.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module CondaPkg
if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@compiler_options"))
# Without this, resolve() takes a couple of seconds, with, it takes 0.1 seconds.
# Maybe with better structured code or precompilation it's not necessary.
# Note: compile=min makes --code-coverage not work
@eval Base.Experimental.@compiler_options optimize=0 infer=false #compile=min
end
import Base: @kwdef
import MicroMamba
import JSON3
import Pkg
import TOML
let toml = TOML.parsefile(joinpath(@__DIR__, "..", "Project.toml"))
@eval const UUID = Base.UUID($(toml["uuid"]))
@eval const PKGID = Base.PkgId(UUID, "CondaPkg")
@eval const VERSION = Base.VersionNumber($(toml["version"]))
end
@kwdef mutable struct State
resolved::Bool = false
load_path::Vector{String} = String[]
meta_dir::String = ""
frozen::Bool = false
end
const STATE = State()
include("spec.jl")
include("meta.jl")
include("resolve.jl")
include("env.jl")
include("deps.jl")
include("PkgREPL.jl")
end # module