Pikchr

Mac distribution through homebrew
Login

Mac distribution through homebrew

(1) By Matteo Vaccari (xpmatteo) on 2024-03-22 14:04:24 [source]

Hi,

I would like to make pikchr available through the "homebrew" package manager on Macs. I have a pull request open with homebrew and they are asking me why is it that the "upstream", meaning the good folks who produce pikchr, do not publish version numbers.

Is there any specific reason not to?

Package manager software generally needs a version number in order to be able to tell users "version 1.2.3 of package X is available, you have 1.2.2 installed". Using the commit id does not work, because it's not sequential. I proposed using the commit date in YYYY-MM-DD format, but the maintainers of homebrew would like a more traditional version number.

(2) By drh on 2024-03-22 14:15:23 in reply to 1 [link] [source]

The "version number" is a SHA3-256 hash that identifies a particular check-in. The latest "version" as I write this is:

I suppose Homebrew wants to see a traditional X.Y.Z version number in addition to this?

I can tag the latest check-in as "version-1.0.0" if that helps. But the text "1.0.0" does not appear anywhere in the source tree. Does there also need to be a VERSION file that contains the version number or something? Does the version number need to be embedded in the compiled code someplace? How do people access the version number? What are Homebrew's requirements?

(3) By drh on 2024-03-22 14:19:39 in reply to 2 [link] [source]

A particular version of the code can also be identified by the ISO 8601 timestamp of the check-in. Would this work any better for Homebrew? The latest check-in is at 2024-02-12T20:10:10 and can be accessed as:

The date can also be expressed as a pure number, omitting the punctuation:

Would 20240212201010 be an acceptable version number for homebrew?

(4) By Matteo Vaccari (xpmatteo) on 2024-03-22 14:47:28 in reply to 2 [link] [source]

Tagging the latest checking as "v1.0.0" would be fine -- it would enable homebrew to download a zip of the sources at that tag from github, and it's a version number in a format that users expect.

The problem with using the sha number as a version is that it's not sequential -- I cannot tell if version 1234abcd is earlier or later than another.

Using the timestamp is quite unusual -- it's harder to read, and it does not enable you to express the nuances of minor change versus major change

(5) By drh on 2024-03-22 14:51:47 in reply to 4 [link] [source]

Who among the readers of this forum would object to me creating an empty check-in off of the tip of trunk and calling it "version-1.0.0"? I'll do so in about 24 hours if there are no "Nays".

(6) By drh on 2024-03-22 14:57:53 in reply to 4 [link] [source]

it would enable homebrew to download a zip of the sources at that tag from github

Do they insist on using GitHub? If not, then the ZIP archive can be obtained from the canonical repository using URLs like this:

  • https://pikchr.org/home/zip/ae3317b0ec2e63/pikchr-ae3317b0ec2e63.zip
  • https://pikchr.org/home/zip/20240212201010/pikchr-20240212201010.zip

Aside: I deliberately did not make those examples hyperlinks, because I don't want spiders downloading millions of copies.

(7) By Matteo Vaccari (xpmatteo) on 2024-03-22 15:08:54 in reply to 6 [link] [source]

The url is indifferent, I think, but are you sure you prefer homebrew users to download from your url? I will use whichever you prefer

(8) By drh on 2024-03-22 15:14:22 in reply to 7 [link] [source]

A fair point. I'll plan on tagging version-1.0.0 then.

(9) By Matteo Vaccari (xpmatteo) on 2024-04-01 08:16:13 in reply to 8 [link] [source]

Hi, any updates on this?

(10) By drh on 2024-04-01 10:19:15 in reply to 9 [link] [source]

The latest trunk check-in has now been tagged as "version-1.0.0".