# Problems with stacked environments

**URL:** <https://discourse.julialang.org/t/problems-with-stacked-environments/128518>\
**Category:** General Usage\
**Tags:** question\
**Created:** [April 29, 2025, 11:30am UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518 "2025-04-29T11:30:38Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [April 29, 2025, 11:30am UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/1 "2025-04-29T11:30:38Z")

</div>

I often see this: Why?

```julia
WARNING: redefinition of constant OpenSSL_jll.PATH. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant OpenSSL_jll.LIBPATH. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant OpenSSL_jll.PATH_list. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant OpenSSL_jll.LIBPATH_list. This may fail, cause incorrect answers, or produce other errors.
┌ Error: Error watching manifest
│ exception =
│ MethodError: no method matching (::OpenSSL_jll.var"#make_wrapper_dict#6"{OpenSSL_jll.var"#parse_wrapper_platform#5"})(::String, ::Vector{String})
│ The function `make_wrapper_dict` exists, but no method is defined for this combination of argument types.
│ Stacktrace:
│ [1] top-level scope
│ @ C:\JuliaPackages\packages\JLLWrappers\GfYNv\src\toplevel_generators.jl:167
│ Revise evaluation error at C:\JuliaPackages\packages\JLLWrappers\GfYNv\src\toplevel_generators.jl:167
│ 
│ Stacktrace:
│ [1] methods_by_execution!(recurse::Any, methodinfo::Revise.CodeTrackingMethodInfo, docexprs::Dict{Module, Vector{Expr}}, mod::Module, ex::Expr; mode::Symbol, disablebp::Bool, always_rethrow::Bool, kwargs::@Kwargs{})       
│ @ Revise C:\JuliaPackages\packages\Revise\mLfYT\src\lowered.jl:306
└ @ Revise C:\JuliaPackages\packages\Revise\mLfYT\src\pkgs.jl:498

```

---

<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:** [April 29, 2025, 12:00pm UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/2 "2025-04-29T12:00:36Z")

</div>

Julia version?

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [April 29, 2025, 1:22pm UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/3 "2025-04-29T13:22:31Z")

</div>

1.11.4

---

<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:** [April 29, 2025, 1:29pm UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/4 "2025-04-29T13:29:56Z")

</div>

If I have to blindly guess I’d say you have a stacked environment with different versions of openssl\_jll in different layers of the stack.

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [April 29, 2025, 1:33pm UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/5 "2025-04-29T13:33:59Z")

</div>

I load my base env in the `startup.jl`

```julia
try
    @eval begin
        using Revise
    end
catch e
end

```

and then my “project” environment, which I have to activate. How is the recommended way of handling Revise.jl loading? Should I rather have it in my project env?

---

<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:** [April 29, 2025, 1:45pm UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/6 "2025-04-29T13:45:13Z")

</div>

I don’t think it’s a problem of Revise per se. Having different package versions in stacked environments is bound to bear problems eventually one way or another, the only thing to do is not to have different versions (can’t say I like the package manager allowing this).

But this is again my blind guess without knowing what you’re doing, you’ll have to inspect your environment and tell us if my hypothesis was correct.

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [April 29, 2025, 1:52pm UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/7 "2025-04-29T13:52:13Z")

</div>

So, loading anything in the `startup.jl` is bad?

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [April 29, 2025, 1:57pm UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/8 "2025-04-29T13:57:01Z")

</div>

If I have a project folder, e.g.

```julia
.
├── README.md
├── julia
│ ├── A_folder
│ │ ├── A_script.jl
│ │ ├── Project.toml
│ ├── B_folder
│ │ ├──B_script.jl
│ │ ├── Project.toml

```

When I have a `Project.toml` for `A` and for `B`, can I safely switch between them? Or should I simply have one root `Project.toml`? When I open VSCode in the root I cannot activate the sub-environments anyway via the extension.

---

<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:** [April 29, 2025, 2:02pm UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/9 "2025-04-29T14:02:05Z")

</div>

> [@ohmsweetohm1](#):
>
> So, loading anything in the `startup.jl` is bad?

Not necessarily. It’s stacking environments with different versions of packages which is potentially problematic.

> [@ohmsweetohm1](#):
>
> If I have a project folder, e.g.

Where are the `Manifest.toml` files? They have the versions of the package, that’s where you should look into. But also, you likely have the global environment in `.julia/environments/v1.X`, that could be the base of your stack.

> [@ohmsweetohm1](#):
>
> When I have a `Project.toml` for `A` and for `B`, can I safely switch between them?

Again, it depends on whether all versions of packages are the same. Even if there are some which are different you may not observe issues in practice though.

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [April 29, 2025, 2:09pm UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/10 "2025-04-29T14:09:38Z")

</div>

> [@giordano](#):
>
> Where are the `Manifest.toml` files? They have the versions of the package, that’s where you should look into. But also, you likely have the global environment in `.julia/environments/v1.X`, that could be the base of your stack.

Sry, I omitted them. The `Manifest.toml` are at the same location as the `Project.toml`.

> [@giordano](#):
>
> Again, it depends on whether all versions of packages are the same.

It might very well be. That is the only reason I divide the environments.

I guess, with this approach, it is far easier to have different versions loaded.

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [April 29, 2025, 2:14pm UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/11 "2025-04-29T14:14:12Z")

</div>

Just one last thing, what would be the “Julian” way of handling this? I.e. having Revise.jl loaded globally, and switching between environments?

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [April 29, 2025, 2:16pm UTC](https://discourse.julialang.org/t/problems-with-stacked-environments/128518/12 "2025-04-29T14:16:38Z")

</div>

Searching through the VSCode settings, it appears that I do not have to do that at all:

![image](https://global.discourse-cdn.com/julialang/original/3X/a/3/a37c1f350395d2bf74399f96f91c2e1be84d08b6.png)
