Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install swift-format via ci_post_clone.sh in Xcode cloud #691

Open
BrentMifsud opened this issue Feb 17, 2024 · 5 comments
Open

Cannot install swift-format via ci_post_clone.sh in Xcode cloud #691

BrentMifsud opened this issue Feb 17, 2024 · 5 comments

Comments

@BrentMifsud
Copy link

BrentMifsud commented Feb 17, 2024

Not sure if this is the right place to post this. I also created a radar for this issue: FB13629192

When trying to install swift-format to run via Xcode Cloud, brew install swift-format fails with the following error:

cd /Volumes/workspace/repository/ci_scripts && /bin/zsh /Volumes/workspace/repository/ci_scripts/ci_post_clone.sh
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:02180ca8b8295422ae84921bcf034b7ee8ce5575488bd5e6a37a192e53cd5d34
#=#=#                                                                         
##O#-#                                                                        

#########                                                                 13.4%
#################################################################         90.5%
######################################################################## 100.0%
==> Pouring portable-ruby-3.1.4.el_capitan.bottle.tar.gz
Running `brew update --auto-update`...
To restore the stashed changes to /Users/local/Homebrew, run:
  cd /Users/local/Homebrew && git stash pop
�==> Homebrew collects anonymous analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

Error: swift-format: the bottle needs the Apple Command Line Tools to be installed.
  You can install them, if desired, with:
    xcode-select --install

If you're feeling brave, you can try to install from source with:
  brew install --build-from-source swift-format

It is expected behaviour that most formulae will fail to build from source.
It is expected behaviour that Homebrew will be buggy and slow when building from source.
Do not create any issues about failures building from source on Homebrew's GitHub repositories.
Do not create any issues building from source even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help building from source in Homebrew's discussions but are unlikely to receive a response.
If building from source fails, try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.

I sincerely doubt that Xcode Cloud is missing the Xcode CLI. And I have no issues installing other tools like SwiftLint or swiftformat.

So I spect the issue is with the way homebrew installs swift-format

My post clone script is not doing anything special:

#!/bin/zsh

brew install swift-format
@alnp
Copy link

alnp commented Mar 11, 2024

I'm having the same issue. Were you able to fix it?

@BrentMifsud
Copy link
Author

I'm having the same issue. Were you able to fix it?

Nope.

I just ended up putting a check in my build phase to skip swift-format if running in Xcode cloud.

@ahoppen
Copy link
Contributor

ahoppen commented Apr 23, 2024

Tracked in Apple’s issue tracker as rdar://126948410

@BrentMifsud
Copy link
Author

Just got a reply that they fixed it. Haven't had a chance to test the fix just yet.

@fawkeswei
Copy link
Contributor

Just tested it, brew install swift-format works a as intended now.

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

No branches or pull requests

4 participants