[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: The contents of the "brew-install" repo





On Tue, Aug 17, 2021 at 5:46 PM Leandro Doctors <ldoctors@gmail.com> wrote:
Dear all,

(As the original email I was intending to write ended up being huge,
I'm dividing it into more palatable, smaller chunks.)

Alex: Could you please confirm I have grasped this correctly?

***********************************************************************************************************
TL; DR: **Avoid being deceived by the repo's name. "brew-install"
contains *much more* than just a brew installer...**
************************************************************************************************************

Correct - the repo is really Clojure CLI packaging (which includes packaging for brew, linux installer, and Windows installer). Eventually we'll rename the repo but it's going to break a bunch of infrastructure so I'm not super eager about that. :)
 


Let's go back to the core of this message...


According to brew-install's README.md [1]

[1] https://github.com/clojure/brew-install#brew-install

> The outputs of this project are a tar file (versioned)
> and a brew formula (clojure.rb), suitable for updating in the brew central tap.

and a Linux install script and a Windows zip installation.

 

I assume that the only thing that we are interested in is the tar content.

I think that is largely true (not sure if the linux installer is useful at all to you), probably is effectively duplicated by other things you're doing.
 


Continuing with the README.md...

> The tar file contains:
[...]
>    - clojure script - the main Clojure runner
>    - clj script - a clojure wrapper for interactive repl use (adds rlwrap)
[...]

I have already described what these two scripts do, how they work,
and their relationship with the ones currently provided by Debian
in a separate thread.


Content listing, continued:
[...]
>    - clojure-tools jar - an uberjar for constructing classpaths via tools.deps
[...]

Actually, there are currently *two* jars: an uberjar
(`clojure-tools-$VERSION`) and a non-uberjar
(`original-clojure-tools-$VERSION`).

The uberjar is the important part - the original- one is just part of the internal process towards constructing that. (This is a detail likely to change soon as we switch to a new build process based on tools.build).
 

The non-uberjar contains:
- installers for GNU/Linux, Windows, and brew (macOS).
   This component is irrelevant for us.
- `clj` and `clojure` scripts (described above)
- The Clojure ns `clojure.run.exec`. (a dependency for the `clojure` script)

There are a few other important resource files here as well:

- clj.1, clojure.1 - man pages for clojure and clj
- deps.edn - the root deps.edn used to determine the dependency set. this is actually not used by the clojure CLI anymore but is still provided for legacy users of old versions of tools.deps that found and used this file. It's a duplicate of a resource now included instead inside the uberjar.
- example-deps.edn - is copied into ~/.clojure as an initial user deps.edn
- tools.edn - the "built-in" tools tool, will be copied to ~/.clojure/tools/tools.edn on first use of tools
- exec.jar - a jar that wraps up the clojure.run.exec source (soon to be compiled)
 
The uberjar contains:
- all of the non-uberjar content, plus
- a Clojure uberjar, with the libraries currently in Debian + the ones
I am working on.

Hoping to also precompile the uberjar soon too.
 


Content listing, ending:
[...]
>    - deps.edn - the initial user deps.edn file
[...]

Just a default `deps.edn` file.


As you can see, although the repo is named "brew-install", it contains
much more than that.

--Leandro


Reply to: