Shopify / homebrew-shopify

47 stars 24 forks source link

"Cannot tap shopify/shopify: invalid syntax in tap!" due to "Error: Unexpected platform!" on Linux x64 #360

Open drop-nicholas opened 2 years ago

drop-nicholas commented 2 years ago
$ brew tap shopify/shopify
==> Tapping shopify/shopify
Cloning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/shopify/homebrew-shopify'...
remote: Enumerating objects: 1824, done.
remote: Counting objects: 100% (619/619), done.
remote: Compressing objects: 100% (318/318), done.
remote: Total 1824 (delta 312), reused 541 (delta 300), pack-reused 1205
Receiving objects: 100% (1824/1824), 492.95 KiB | 2.64 MiB/s, done.
Resolving deltas: 100% (969/969), done.
Error: Unexpected platform!
Error: Invalid formula: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/shopify/homebrew-shopify/trino-certloader.rb
exit
Error: Cannot tap shopify/shopify: invalid syntax in tap!

brew -v

Homebrew 3.4.2 Homebrew/homebrew-core (git revision 25acb3bbfdc; last commit 2022-03-17)

uname -a

Linux 5.16.11-76051611-generic #202202230823~1646248261~21.10~2b22243 SMP PREEMPT Wed Mar 2 20: x86_64 x86_64 x86_64 GNU/Linux

christ-offer commented 2 years ago

I'm getting the exact same error. I have tried both on my main Manjaro install and on a fresh MX Linux install in VM.

brew -v

Homebrew 3.4.4 Homebrew/homebrew-core (git revision 1a87949d8b9; last commit 2022-03-29)

uname -a

Linux 5.16.14-1-MANJARO #1 SMP PREEMPT Fri Mar 11 14:12:18 UTC 2022 x86_64 GNU/Linux

drop-nicholas commented 2 years ago

brew audit on the trino-certloader file mentioned in my error above spits out

Error: Unexpected platform!

Looking inside, there is no handling for Linux -- it's Mac only.

Furthermore, this repository appears to be private, so perhaps it should not be in the public tap? Maybe it's an employees-only repo.

I've made a PR here to add the necessary lines so that folks on Linux can run brew tap drop-nicholas/shopify or (if you're very security-conscious) fork and add a commit like the one I'm handing in on the PR.

I'm happy to work with the maintainers to make changes on that PR.

nickdotht commented 2 years ago

@drop-nicholas This is pretty awesome of you dude! Thanks so much for your custom repo.

Now I'm getting this error when I try to install it from your repo:

brew install shopify-cli                                        master 
==> Fetching shopify-cli from gem source
==> Installing shopify-cli from drop-nicholas/shopify
==> gem install /home/nick/.cache/Homebrew/shopify-cli-2.15.2.gem --no-document --no-
Last 15 lines from /home/nick/.cache/Homebrew/Logs/shopify-cli/01.gem:
        from /home/linuxbrew/.linuxbrew/Cellar/ruby/3.1.1/lib/ruby/3.1.0/mkmf.rb:362:in `block in postpone'
        from /home/linuxbrew/.linuxbrew/Cellar/ruby/3.1.1/lib/ruby/3.1.0/mkmf.rb:332:in `open'
        from /home/linuxbrew/.linuxbrew/Cellar/ruby/3.1.1/lib/ruby/3.1.0/mkmf.rb:358:in `postpone'
        from /home/linuxbrew/.linuxbrew/Cellar/ruby/3.1.1/lib/ruby/3.1.0/mkmf.rb:1006:in `checking_for'
        from /home/linuxbrew/.linuxbrew/Cellar/ruby/3.1.1/lib/ruby/3.1.0/mkmf.rb:1118:in `have_func'
        from extconf.rb:6:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/linuxbrew/.linuxbrew/Cellar/shopify-cli/2.15.2/extensions/x86_64-linux/3.1.0/racc-1.6.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/linuxbrew/.linuxbrew/Cellar/shopify-cli/2.15.2/gems/racc-1.6.0 for inspection.
Results logged to /home/linuxbrew/.linuxbrew/Cellar/shopify-cli/2.15.2/extensions/x86_64-linux/3.1.0/racc-1.6.0/gem_make.out

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/drop-nicholas/homebrew-shopify/issues

Nothing is showing up in the file mkmf.log.

drop-nicholas commented 2 years ago

Hey @nickdotht , glad it works partially for you. I had not tried installing that one, but my attempt on Pop!_OS 21.10 x64 failed with the same error. It looks like Linux users don't have any active maintainer at Shopify. I suggest any of us begin digging into these errors and opening PRs; hopefully they will merge them, but it's been a tick here and I don't see any activity on my own, yet :sweat_smile:

nickdotht commented 2 years ago

@drop-nicholas I had to finally resort to using the gem package: gem install shopify-cli. It wasn't working on my previous Ubuntu instance, but now it does (Ubuntu 20.04.4).

I'd love to participate in this, but timing isn't ideal right now, due to responsibilities at work.

christ-offer commented 1 year ago

How has it been 6 months and not a thing has happened? I was under the impressions this was a somewhat professional company.