You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is some missing functionality in the Pluto package manager:
dev a local package
add a package from git with a branch
add a package at a specific version
custom update: update just one package, update to something other than latest, or downgrade
In #2245 we worked on a GUI approach to address this, where you can specify the command for a package (e.g. dev ~/Documents/Example.jl or add Example@0.1).
Julia 1.11 has a new feature, [sources] in the Project.toml. JuliaLang/Pkg.jl#3783 With this feature, you are able to achieve all 4 tasks :) And it's great that it uses an existing Julia feature, and requires less "Pluto magic" to make it work. This also improves maintainability, and it might make integration with other (3rd party) tools easier.
The idea is to add a Project.toml editor in Pluto. 🌸 This allows the user to modify compat and sources entries manually to achieve these goals.
A benefit of this, just like #2245, is that it leverages existing Pkg functionality. Pkg can be hard to work with as an API, since it is mostly designed to interface via Terminal UI and TOML config files, and public API is too limited. That's why we have so much compat code in https://github.com/fonsp/Pluto.jl/blob/main/src/packages/PkgCompat.jl. Each new Julia version takes a lot of work to patch Pluto (see e.g. #2928), and the Pkg integration is often affected.
Project.toml is public API, and TOML is a well-defined spec, so it is much more future-proof.
#2245 is based on Terminal UI which has the same benefit! A disadvantage is that the implementation still uses some private Pkg API to check and execute the commands.
Julia 1.10
[sources] is not supported by Julia 1.10. @disberd and I talked about maybe writing a polyfill.
Cases
Updating
In the compat bounds, we can add an inline widget that you can click to set compat to the latest version.
Checking
We can check that each imported package is listed as [deps], and that it has a compat bound.
Local and git
With [sources], you can set packages to use local files and git
New packages?
What to do when you:
Typed a new import but you did not run it yet? (niceee)
Added a new dep but did not import it yet?
Auto management?
The text was updated successfully, but these errors were encountered:
fonsp
changed the title
guided Project.TOML editor
Idea: guided Project.TOML editor
Nov 15, 2024
fonsp
changed the title
Idea: guided Project.TOML editor
Idea: guided Project.TOML editor with [sources]
Nov 15, 2024
There is some missing functionality in the Pluto package manager:
dev
a local packageIn #2245 we worked on a GUI approach to address this, where you can specify the command for a package (e.g.
dev ~/Documents/Example.jl
oradd Example@0.1
).Julia 1.11 has a new feature,
[sources]
in the Project.toml. JuliaLang/Pkg.jl#3783 With this feature, you are able to achieve all 4 tasks :) And it's great that it uses an existing Julia feature, and requires less "Pluto magic" to make it work. This also improves maintainability, and it might make integration with other (3rd party) tools easier.The idea is to add a Project.toml editor in Pluto. 🌸 This allows the user to modify compat and sources entries manually to achieve these goals.
Smaller API
A benefit of this, just like #2245, is that it leverages existing Pkg functionality. Pkg can be hard to work with as an API, since it is mostly designed to interface via Terminal UI and TOML config files, and public API is too limited. That's why we have so much compat code in https://github.com/fonsp/Pluto.jl/blob/main/src/packages/PkgCompat.jl. Each new Julia version takes a lot of work to patch Pluto (see e.g. #2928), and the Pkg integration is often affected.
Project.toml is public API, and TOML is a well-defined spec, so it is much more future-proof.
#2245 is based on Terminal UI which has the same benefit! A disadvantage is that the implementation still uses some private Pkg API to check and execute the commands.
Julia 1.10
[sources]
is not supported by Julia 1.10. @disberd and I talked about maybe writing a polyfill.Cases
Updating
In the compat bounds, we can add an inline widget that you can click to set compat to the latest version.
Checking
We can check that each imported package is listed as
[deps]
, and that it has a compat bound.Local and git
With
[sources]
, you can set packages to use local files and gitNew packages?
What to do when you:
import
but you did not run it yet? (niceee)dep
but did not import it yet?Auto management?
The text was updated successfully, but these errors were encountered: