# StyledStrings and maintainability of reproducible project environments

**URL:** <https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471>\
**Category:** General Usage\
**Created:** [October 18, 2024, 9:54pm UTC](https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471 "2024-10-18T21:54:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwortmann](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jwortmann](https://discourse.julialang.org/u/jwortmann)\
**Post date:** [October 18, 2024, 9:54pm UTC](https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471/1 "2024-10-18T21:54:50Z")

</div>

I have a Julia project environment at [LSP-julia/server at main · sublimelsp/LSP-julia · GitHub](https://github.com/sublimelsp/LSP-julia/tree/main/server) with a single dependency (LanguageServer.jl) that I update more or less regularly. After updating to Julia 1.11 I noticed that this environment could not be instantiated anymore - because the `REPL` package, a dependecy of `LanguageServer`, now needs the new `StyledStrings` package which is not in `Manifest.toml`. It worked again after running `resolve` on Julia 1.11, which added StyledStrings into the Manifest file. However, I saw that StyledStrings has Julia 1.11 as a requirenment [StyledStrings.jl/Project.toml at 729f56cb7c7064687a19ed02990a532606d83e4c · JuliaLang/StyledStrings.jl · GitHub](https://github.com/JuliaLang/StyledStrings.jl/blob/729f56cb7c7064687a19ed02990a532606d83e4c/Project.toml#L7), and therefore this would break backwards compatibility of my environment with older Julia versions. As a workaround for now I added a separate `Manifest-v1.11.toml` file so that it should work on both Julia ≤ 1.10 and on Julia 1.11. Unfortunately I think that this does not scale well; whenever a new Julia version is released I will need to create separate new `Manifest-v1.12.toml`, `Manifest-v1.13.toml` etc. files, and even worse, whenever I want to update the project environment I will have to do it separately on each of the corresponding Julia versions.

Is there any better way to solve this situation while keeping backwards compatibility with older Julia versions? I’d like to avoid needing to keep all the previous Julia version installed in order to be able to update this project environment.

For example would it be possible to backport StyledStrings to Julia ≤ 1.10 (if necessary) and loosen its compat requirement to `julia = "1"`, so that I could keep a single `Manifest.toml` file (in the old manifest format)?

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [October 18, 2024, 10:36pm UTC](https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471/2 "2024-10-18T22:36:39Z")

</div>

Why do you keep the Manifest.toml files in the first place? Could you just delete them, and not keep them in version control?

---

<div class="post-metadata">

**Author:** ![jwortmann](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jwortmann](https://discourse.julialang.org/u/jwortmann)\
**Post date:** [October 18, 2024, 11:02pm UTC](https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471/3 "2024-10-18T23:02:17Z")

</div>

Well, releases of LanguageServer.jl are created so infrequently (once or twice per year) that I don’t want to rely on them. Particularly I can’t wait half a year or longer for the next release after a breaking bug was fixed.

---

<div class="post-metadata">

**Author:** ![danielwe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielwe/32/35657_2.png) [@danielwe](https://discourse.julialang.org/u/danielwe)\
**Post date:** [October 18, 2024, 11:15pm UTC](https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471/4 "2024-10-18T23:15:14Z")

</div>

Manifests are not compatible between Julia versions. They cannot be, since packages may declare compatibility bounds on Julia itself, leading different versions of Julia to resolve different versions of the dependencies. Only with the support for `Manifest-v1.x.toml` starting with Julia 1.11 can a single project be resolved for multiple Julia versions simultaneously.

In other words, if this setup has worked in the past I’m afraid you’ve just been lucky, it’s never been supported until `Manifest-v1.x.toml` came along.

I agree with @nsajko that it seems ill-advised to include the manifest as part of an editor plugin like this. If you want to resolve to the git repo instead of the registry, that’s supported through the `[sources]` section of `Project.toml` starting with Julia 1.11: [10. Project.toml and Manifest.toml · Pkg.jl](https://pkgdocs.julialang.org/v1/toml-files/#The-%5Bsources%5D-section) (see also [Julia 1.11 Highlights](https://www.julialang.org/blog/2024/10/julia-1.11-highlights/#sources_section_in_projecttoml_in_pkgjl))

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [October 18, 2024, 11:40pm UTC](https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471/5 "2024-10-18T23:40:15Z")

</div>

In the VS Code extension we ship separate project/manifest combos for each minor Julia version, exactly for this reason (see [julia-vscode/scripts/environments/terminalserver at main · julia-vscode/julia-vscode · GitHub](https://github.com/julia-vscode/julia-vscode/tree/main/scripts/environments/terminalserver) for the REPL and [julia-vscode/scripts/environments/languageserver at main · julia-vscode/julia-vscode · GitHub](https://github.com/julia-vscode/julia-vscode/tree/main/scripts/environments/languageserver) for the LS, where we just recently dropped support for running the LS itself on anything older that then current LTS release).

> [@danielwe](#):
>
> I agree with @nsajko that it seems ill-advised to include the manifest as part of an editor plugin like this.

I disagree with that 🙂 Users of an editor plugin just want it to work. Anytime you do a new resolve, things might end up in in a state where things _don’t_ work, so I think shipping manifests that pin down versions in a known-to-work state is really, really good for something like an editor plug-in. Yes, it is cumbersome because of the proliferation of versions, but that is painful for the plug-in maintainer, not the end user, which seems a good trade-off 🙂 In the VS Code extension we have scripts that keep all of these project/manifests up-to-date.

---

<div class="post-metadata">

**Author:** ![danielwe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielwe/32/35657_2.png) [@danielwe](https://discourse.julialang.org/u/danielwe)\
**Post date:** [October 18, 2024, 11:47pm UTC](https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471/6 "2024-10-18T23:47:48Z")

</div>

> [@davidanthoff](#):
>
> > [@danielwe](#):
> >
> > I agree with @nsajko that it seems ill-advised to include the manifest as part of an editor plugin like this.
> 
> I disagree with that 🙂 Users of an editor plugin just want it to work.

Sure, if you ship a separate environment for every released minor Julia version like the VSCode plugin, I suppose it’s fine to include the manifest. I was assuming a single project meant to work across multiple Julia versions, as currently done in the OP’s plugin.

---

<div class="post-metadata">

**Author:** ![danielwe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielwe/32/35657_2.png) [@danielwe](https://discourse.julialang.org/u/danielwe)\
**Post date:** [October 18, 2024, 11:49pm UTC](https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471/7 "2024-10-18T23:49:47Z")

</div>

Btw. are manifests guaranteed to be portable between platforms? I was imagining that artifact resolution might depend on platform/OS, but maybe not

---

<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:** [October 19, 2024, 8:01am UTC](https://discourse.julialang.org/t/styledstrings-and-maintainability-of-reproducible-project-environments/121471/8 "2024-10-19T08:01:47Z")

</div>

> [@danielwe](#):
>
> are manifests guaranteed to be portable between platforms?

Yes

> [@danielwe](#):
>
> artifact resolution might depend on platform/OS,

Artifacts aren’t part of package resolution.
