-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: guided Project.TOML editor with [sources] #3099
Comments
Did you discuss this with the Pkg.jl maintainers ? May be there is a way to make these part of the public API of Pkg ? |
I made a prototype! Schermopname.2024-11-19.om.01.18.25.movBut without JuliaLang/Pkg.jl#4086 the usefulness is limited |
This is awesome! Any word on when/if this will be included in a newer Pluto version? |
It will take some time! You could help by contributing to JuliaLang/Pkg.jl#4086 and I'm trying to improve our Pkg-related codebase a bit before this feature. |
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 [email protected]
).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: