Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Move REPL functionality to separate package? #49

Closed
DilumAluthge opened this issue Mar 22, 2021 · 3 comments · Fixed by #52
Closed

Move REPL functionality to separate package? #49

DilumAluthge opened this issue Mar 22, 2021 · 3 comments · Fixed by #52

Comments

@DilumAluthge
Copy link
Member

Currently, here are the direct dependencies of GitCommand.jl:

  [b873ce64] ReplMaker v0.2.4
  [f8c6e375] Git_jll v2.31.0+0

And here are the recursive (indirect) dependencies, including packages that are stdlibs on Julia 1.6:

  [692b3bcd] JLLWrappers v1.2.0
  [b873ce64] ReplMaker v0.2.4
  [2e619515] Expat_jll v2.2.7+6
  [78b55507] Gettext_jll v0.20.1+7
  [f8c6e375] Git_jll v2.31.0+0
  [94ce4f54] Libiconv_jll v1.16.0+7
  [458c3c95] OpenSSL_jll v1.1.1+6
  [02c8fc9c] XML2_jll v2.9.11+0
  [0dad84c5] ArgTools
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [f43a241f] Downloads
  [b77e0a4c] InteractiveUtils
  [b27032c2] LibCURL
  [76f85450] LibGit2
  [8f399da3] Libdl
  [56ddb016] Logging
  [d6f4376e] Markdown
  [ca575930] NetworkOptions
  [44cfe95a] Pkg
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [fa267f1f] TOML
  [a4e569a6] Tar
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [deac9b47] LibCURL_jll
  [29816b5a] LibSSH2_jll
  [c8ffd9c3] MbedTLS_jll
  [14a3606d] MozillaCACerts_jll
  [efcefdf7] PCRE2_jll
  [83775a58] Zlib_jll
  [8e850ede] nghttp2_jll
  [3f19e933] p7zip_jll

If I remove the packages that are stdlibs on Julia 1.6, here are the remaining recursive (indirect) dependencies:

  [692b3bcd] JLLWrappers v1.2.0
  [b873ce64] ReplMaker v0.2.4
  [2e619515] Expat_jll v2.2.7+6
  [78b55507] Gettext_jll v0.20.1+7
  [f8c6e375] Git_jll v2.31.0+0
  [94ce4f54] Libiconv_jll v1.16.0+7
  [458c3c95] OpenSSL_jll v1.1.1+6
  [02c8fc9c] XML2_jll v2.9.11+0

So, to summarize, in Julia 1.6 the only non-stdlib dependencies of GitCommand are:

  1. ReplMaker v0.2.4
  2. JLLWrappers v1.2.0
  3. Expat_jll v2.2.7+6
  4. Gettext_jll v0.20.1+7
  5. Git_jll v2.31.0+0
  6. Libiconv_jll v1.16.0+7
  7. OpenSSL_jll v1.1.1+6
  8. XML2_jll v2.9.11+0

I would eventually (in the distant future) like to add support to Pkg.jl that allows Pkg to use either LibGit2 or command-line Git for Git operations. This would involve making GitCommand.jl a dependency of Pkg. Since Pkg is a stdlib, this means that we would need to make GitCommand a stdlib; we would also need to make all of GitCommand's dependencies into stdlibs.

So I want to minimize the number of dependencies that GitCommand has, because each dependency would need to become a stdlib.

Obviously we can't get rid of Git_jll since it provides the Git binary. Git_jll depends on JLLWrappers, so we can't get rid of JLLWrappers. And Git_jll also depends on Expat_jll, Gettext_jll, Libiconv_jll, OpenSSL_jll, and XML2_jll, so we can't remove any of those dependencies.

But, for Pkg integration, we don't need the Git REPL mode. So, I'd like to move the Git REPL mode into a separate package. This allows us to remove the ReplMaker.jl dependency from GitCommand.

@ericphanson
Copy link
Contributor

Yeah, I think since it's so hard to use Git_jll directly because you need to do all this fiddling, it's great to have a wrapper to handle it for you, and there's a reasonable set of users which would never need the interactive functionality (e.g. AnalyzeRegistry, Pkg) but who would need the wrapping of Git_jll, so it makes sense to separate out the interactive stuff.

@DilumAluthge
Copy link
Member Author

Here's another benefit: Currently, when you do using GitCommand, it doesn't automatically init the REPL mode. You have to do using GitCommand; gitrepl() to set up the REPL mode.

But if we have a dedicated GitRepl.jl package, then we could automatically initialize REPL mode when you do using GitRepl.

@giordano
Copy link
Member

Also, someone didn't like the extra functionalities provided by ReplMaker: JuliaPackaging/Yggdrasil#1299 (comment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants