The macos wheel build thread leads me to believe t...
# development
h
The macos wheel build thread leads me to believe that we should start pushing hard on scie-pants. Which as far as I can tell just means loudly advocating for people to try it, and make it trivial to do so.
c
For
brew install
support on Macs (and Linux, for those who use brew in that setting): Seeing the hoops and hurdles to overcome in order for a pants brew formula in homebrew core, I think we’ll have greater success with a custom tap. To that end, given you agree, may I get a new repo set up?
pantsbuild/homebrew-pants
please and thank you 🙂 This would give an install syntax when using
brew
of:
Copy code
brew tap pantsbuild/pants
brew install pants
w
Ugh.
That's unfortunate. Taps always feel so odd to me, even though I understand the point.
If we use a tap, will it at least just pull down the pre-packaged binary? Or still from source?
e
So
brew tap pantsbuild/pants
or
brew tap pantsbuild/homebrew-pants
? It seems like the latter, which is better anyhow, since pantsbuild/pants is not pantsbuild - there is other software (potentially).
So, obviously, I just made the repo to get out of the way. If discussion concludes we don't want a custom tap, I'll just delete it at that time.
c
yea, one of the points with going with a custom tap is to be able to use our already built binaries!
@enough-analyst-54434 you can do either, brew will add in the missing
homebrew-
prefix if left out as sugar..
also, I considered a tap name like
pantsbuild/tap
(i.e. a repo named
pantsbuild/homebrew-tap
) as we may want a single tap with potentially other formulas in it as well…
e
You mac people are all crazy. Do as you fit! I can rename if you want. I'm just a button clicking monkey here.
c
🤪 ok, let’s be prepared for housing more stuff here, so for me then, renaming it to
homebrew-tap
would make sense..
h
Maybe one thing at a time?
Do we need brew yet?
c
yes, but let’s try to get the name right now any way…
h
Or at all?
E.g., rust seems to be fine without it
c
maybe “need” isn’t the right word? 😛 but it’s a convenient alternative.
there’s rust formula in brew… so I don’t see your point?
w
c
but, many formulaes are maintained by not the authorative projects… (e.g. it’s community contributed/maintained)
w
👍 1
c
so the idea here is that we’d not take brew on as Pants maintainers but as Pants community members… but getting it into brew core seemed like a no-go for us… then having a custom tap makes more sense under the pantsbuild umbrella rather than a new place/home..
e
@happy-kitchen-89482 there was a whole conversation about rust seems to be fine without. I totally agree, but @wide-midnight-78598 and others do not like that.
This is why, amongst other reasons, I say you mac users are crazy!
c
brew
is like my App store for the cli… 🤪
(and also desktop, actually… with `cask`s)
w
brew
is like my App store for the cli
[quietly steals that quote]
✔️ 1
e
@curved-television-6568 I'll let @happy-kitchen-89482 change the name to homebrew-tap as solid proof this conversation is converging amongst a wider set.
1
c
adding to the 🔥 we’ve got going here…
Copy code
brew tap thought-machine/please
brew install please
https://please.build/quickstart.html
e
I assume some later - no need to tap anymore! - is just fine. I.E.: forward progress,
w
So, discussed in length elsewhere, but I think the idea is - if we have standalone binaries, it would be "nice" to let people install them how they prefer if possible (brew, apt, dnf, etc down the road). I like that all the stuff I install is neatly located in a configured location, with correct permissions, correct backups (or not), etc - which is why I use brew. It's actually a small annoyance that rustup defaults to my home directory, as I start getting more garbage that I don't want in my time machine backups
Anyways, rant for another day - but the GH ticket was directed to community support, rather than official support. At the moment, they're kinda the same though 🙂
e
So, one thing to point out, is that all the important heft will still be in your home dir unless I missed where the brew thing was re-directing SCIE_BASE.
c
brew installs to
/opt/homebrew/Cellar/
by default…
but you maybe referred to pants specifics, in which case that wasn’t changed..
e
I'm just pointing out, that if part of SJ's concern is lots of stuff in home going to time machine, that problem is not solved since scie-pants is a thin scie - ~7MB - so your tap does save that - but its in the noise since that expands to ~50MB under the home dir in
~/Library/Caches/nce
when it fetches things. And that gets continually worse with each Pants version installed / used for the repos cloned on the machine.
If that's a real concern, the tap should change the location of the SCIE_BASE to something in the brew-controlled dirs (
/opt/...
? - I don't know brew).
c
Ah… I’m not well versed in the brew possibilities here either.. regardless of where it lives, it would be nice with an easy way to clean it up once in a while.. (or for old/unused versions)
e
Yeah, so you two have alot of talking to do.
👍 1
If scie-jump (most likely) support is needed for any of this, let me know.
c
🙏
w
Anything with
caches
usually gets relegated to no-backup. By home dir, I mean
~/.cargo
,
~/.android
, and 53 other dot folders in my home dir that aren't related to zsh or ssh. 🤦‍♂️
Reason for all this is the same as not wanting to do unnecessary CIs. Just more processor, storage, and network churn for zero value.
e
Aha, gotcha. I know you like using brew - so not touching that. But is ~/bin free from backup / even on your PATH? That's where scie-pants installs to by default if you use the script.
w
Script?
Oh, I haven't used that yet - been just grabbing GH binaries
h
I'm fine with it all, but I think we're getting a little ahead of ourselves here perhaps... The more ways there are to install this the more ways there are for something to go wrong
e
This is the whole curl script thing you don't want to use. I'm just gauging if ~/bin is a thing for homebrew devotees.
@happy-kitchen-89482 I'm personally not going to get in the way of contribs of packages.
w
Never used
/bin
before - homebrew I think defaults to
/usr/local/bin
e
We don;t need to advertise - or something
Not
/bin
-
~/bin
A home dir bin
w
Sorry, typo - I meant tilde
e
Ok. That's pretty common across unix OS's but clearly not pervasive. Good to know.
w
I guess I put them in the same place on Mac as on linux, now that I think about it
e
I put my custom personal scripts there
So SJ do you got to the extreme of brew-ifying your personal scripts? I knew a guy who did that for arch / PKGBUILD.
w
Nah, I can't go that far. I have a
qol
repo (quality of life) , which I pull down - and that's linked by my zsh scripts or whatever. So for mac, one source of data, and I just need to copy the main zshrc over on a new computer
e
And so you add <some clone dir>/bin to your PATH instead of ~/bin
w
Yeah, in my development directory, which houses all the things basically.
p
OT: I use MacPorts instead of homebrew. Ideally I would be able to use gentoo prefix on my Mac, but I haven’t had time to fix that project yet. 🤷
c
oh, what’s gentoo prefix? haven’t played with gentoo since… 2006 maybe 😁 so I know about
emerge
I think the package manager was called..?
but I still have fond memories of that time 🙂
p
My personal laptop is gentoo. I’ve been running gentoo since… I don’t know, maybe 2001-2002?
gentoo-prefix allows installing gentoo under a prefix, ideally without requiring root.
So, I can have gentoo on any mac or other non-gentoo linux system… But the mac stuff has been a bit broken.
c
wait what… you’d get a linux box on Mac with that!?
that would be awesomeness complete 😄
guess there’ll be some caveats for low level kernel stuff…?
👍 1
p
Gentoo can run (or used to be able to run, not sure if it still does) with a FreeBSD kernel. It’s an os-agnostic os.
🤯 1
c
oh, how did I not know that… 😮
will have to do some reasearch 🙂
p
Some ebuilds need changes to handle building packages in different environments. But, anyway, I’m a gentoo fan 😄
c
I really like it too, although not used it for ages… this makes me wanna spin it up again
p
So, when looking at prior art for how to cross-compile stuff, Gentoo has been doing that for a long time. Cross compilation, compiling for multiple kernels, building all sorts of languages from source with many different toolchains … A lot of it is probably out-of-scope for pants, but it can definitely provide inspiration and prior-art.
2
c
@happy-kitchen-89482 If we do this rename, the install incantation would become:
Copy code
brew install pantsbuild/tap/pants
To me, reads slightly better to not have 3 “pants” in the name.. https://pantsbuild.slack.com/archives/C0D7TNJHL/p1673829577460279?thread_ts=1673792427.329169&amp;cid=C0D7TNJHL
h
I don't understand what needs renaming?
w
"pantsbuild/pants/pants"
c
the github repo
w
I'd be open to
brew install pantsbuild/pannnnnnnttttttttssssss
for clarity
😂 1
c
pantsbuild/homebrew-pants -> pantsbuild/homebrew-tap (for instance.. unless you have a better suggestion)
for the
brew install pantsbuild/tap/pants
(which is a shortcut for
brew install pantsbuild/homebrew-tap/pants
)
h
Oh I see. Totally fine with that!
pantsbuild/tap
seems like a fine name for a repo
c
question is if we want
tap
there, or
tools
,
bin
etc..?
or are we fine with double pants..?
h
tap
is fine, this is a homebrew specific thing right?
c
yeah
h
pantsbuild/tap/pants seems like a great name then
👍 1
👍 1
🎉 1
c
There’s now a brew tap for installing Pants on MacOS:
Copy code
brew install pantsbuild/tap/pants
🎉 5
e
Hey @curved-television-6568 I did the docker thing and after installing brew via the Homebrew instructions - it works, i.e.:
Copy code
jsirois@4f808a930e7c:~$ brew install ascii
==> Fetching ascii
==> Downloading <https://ghcr.io/v2/homebrew/core/ascii/manifests/3.18>
######################################################################## 100.0%
==> Downloading <https://ghcr.io/v2/homebrew/core/ascii/blobs/sha256:31952089908444514e2e97d6d7a325d52136f8d7c8297210045a04608bf49ae8>
==> Downloading from <https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:31952089908444514e2e97d6d7a325d52136f8d7c8297210045a04608bf49ae8?se=2023-01-24T20%3A20%3A00Z&sig=%2FIAsxvjXiG%2B9ycYl%2B9mzR6>
######################################################################## 100.0%
==> Pouring ascii--3.18.x86_64_linux.bottle.tar.gz
🍺  /home/linuxbrew/.linuxbrew/Cellar/ascii/3.18: 7 files, 82.2KB
==> Running `brew cleanup ascii`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
jsirois@4f808a930e7c:~$ ascii
Usage: ascii [-adxohv] [-t] [char-alias...]
   -t = one-line output  -a = vertical format
   -d = Decimal table  -o = octal table  -x = hex table  -b binary table
   -h = This help screen -v = version information
Prints all aliases of an ASCII character. Args may be chars, C \-escapes,
English names, ^-escapes, ASCII mnemonics, or numerics in decimal/octal/hex.

Dec Hex    Dec Hex    Dec Hex  Dec Hex  Dec Hex  Dec Hex   Dec Hex   Dec Hex
  0 00 NUL  16 10 DLE  32 20    48 30 0  64 40 @  80 50 P   96 60 `  112 70 p
  1 01 SOH  17 11 DC1  33 21 !  49 31 1  65 41 A  81 51 Q   97 61 a  113 71 q
  2 02 STX  18 12 DC2  34 22 "  50 32 2  66 42 B  82 52 R   98 62 b  114 72 r
  3 03 ETX  19 13 DC3  35 23 #  51 33 3  67 43 C  83 53 S   99 63 c  115 73 s
  4 04 EOT  20 14 DC4  36 24 $  52 34 4  68 44 D  84 54 T  100 64 d  116 74 t
  5 05 ENQ  21 15 NAK  37 25 %  53 35 5  69 45 E  85 55 U  101 65 e  117 75 u
  6 06 ACK  22 16 SYN  38 26 &  54 36 6  70 46 F  86 56 V  102 66 f  118 76 v
  7 07 BEL  23 17 ETB  39 27 '  55 37 7  71 47 G  87 57 W  103 67 g  119 77 w
  8 08 BS   24 18 CAN  40 28 (  56 38 8  72 48 H  88 58 X  104 68 h  120 78 x
  9 09 HT   25 19 EM   41 29 )  57 39 9  73 49 I  89 59 Y  105 69 i  121 79 y
 10 0A LF   26 1A SUB  42 2A *  58 3A :  74 4A J  90 5A Z  106 6A j  122 7A z
 11 0B VT   27 1B ESC  43 2B +  59 3B ;  75 4B K  91 5B [  107 6B k  123 7B {
 12 0C FF   28 1C FS   44 2C ,  60 3C <  76 4C L  92 5C \  108 6C l  124 7C |
 13 0D CR   29 1D GS   45 2D -  61 3D =  77 4D M  93 5D ]  109 6D m  125 7D }
 14 0E SO   30 1E RS   46 2E .  62 3E >  78 4E N  94 5E ^  110 6E n  126 7E ~
 15 0F SI   31 1F US   47 2F /  63 3F ?  79 4F O  95 5F _  111 6F o  127 7F DEL
jsirois@4f808a930e7c:~$
But for pants I get:
Copy code
jsirois@4f808a930e7c:~$ brew install pantsbuild/tap/pants
Warning: No available formula with the name "pantsbuild/tap/pants".
Is there any special setup needed to have things like this work you're aware of?
c
Ah.. hmm. no. only thing that comes to mind to try is
brew install --cask pantsbuild/tap/pants
failing that, maybe casks isn’t supported on Linux.. only source formulas..? 😬 (or I’m missing something, haven’t read up on this too much, just noticed linux references floating around while digging into this)
e
Aha, ok - that helped:
Copy code
jsirois@4f808a930e7c:~$ brew install --cask pantsbuild/tap/pants
Error: Invalid `--cask` usage: Casks do not work on Linux
So maybe this is a no-go for Linux brew users. Which is probably fine. Those are probably few.
c
yea, good to know. Thanks for checking 🙏
e
They assume the binary will be a Mac binary AFAICT and deny based on that. Seems a bit off to me, but there you go.
c
yea… I’m in the camp now of brew being crazy.. 😉
e
Heh.
I will say I found this hilarious - look ~familiar @wide-midnight-78598?:
Copy code
/bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>)"
🤣 1
🥹 1
That's the official Linux install.
c
gotta start somewhere…
w
Hurts my soul.