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

cask/exceptions: fix super calls. #8419

Merged
merged 1 commit into from Aug 21, 2020

Conversation

MikeMcQuaid
Copy link
Member

Ensure that we always pass no arguments here.

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Ensure that we always pass no arguments here.
@MikeMcQuaid MikeMcQuaid merged commit 14ec695 into Homebrew:master Aug 21, 2020
@MikeMcQuaid MikeMcQuaid deleted the cask-exceptions-fix branch August 21, 2020 12:33
@billinghamj
Copy link

billinghamj commented Aug 21, 2020

Thanks for this! With this in place on beta 5 on ARM, the Swift compiler doesn't seem to be happy:

% brew cask install proxyman --debug 
==> Cask::Installer#install
==> Printing caveats
==> Cask::Installer#fetch
==> Downloading
==> Downloading https://github.com/ProxymanApp/Proxyman/releases/download/2.4.2/
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.4.13-10-g14ec695\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 11.0\)\ curl/7.64.1 --retry 3 --location --silent --head --request GET https://github.com/ProxymanApp/Proxyman/releases/download/2.4.2/Proxyman_2.4.2.dmg
Already downloaded: /Users/jb/Library/Caches/Homebrew/downloads/b8d558a470c21e797a9272e5c0bfb9976533b4e219eeae4ed465aadd326ee63c--Proxyman_2.4.2.dmg
==> Checking quarantine support
/usr/bin/xattr
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/jb/Library/Caches/Homebrew/downloads/b8d558a470c21e797a9272e5c0bfb9976533b4e219eeae4ed465aadd326ee63c--Proxyman_2.4.2.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/jb/Library/Caches/Homebrew/downloads/b8d558a470c21e797a9272e5c0bfb9976533b4e219eeae4ed465aadd326ee63c--Proxyman_2.4.2.dmg
==> /Users/jb/Library/Caches/Homebrew/downloads/b8d558a470c21e797a9272e5c0bfb9976533b4e219eeae4ed465aadd326ee63c--Proxyman_2.4.2.dmg is not quarantined
==> Quarantining /Users/jb/Library/Caches/Homebrew/downloads/b8d558a470c21e797a9272e5c0bfb9976533b4e219eeae4ed465aadd326ee63c--Proxyman_2.4.2.dmg
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift /Users/jb/Library/Caches/Homebrew/downloads/b8d558a470c21e797a9272e5c0bfb9976533b4e219eeae4ed465aadd326ee63c--Proxyman_2.4.2.dmg https://github.com/ProxymanApp/Proxyman/releases/download/2.4.2/Proxyman_2.4.2.dmg https://proxyman.io/
Error: Failed to quarantine /Users/jb/Library/Caches/Homebrew/downloads/b8d558a470c21e797a9272e5c0bfb9976533b4e219eeae4ed465aadd326ee63c--Proxyman_2.4.2.dmg. Here's the reason:
Stack dump:
0.	Program arguments: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -interpret /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -target-sdk-version 11.0 -module-name quarantine -- /Users/jb/Library/Caches/Homebrew/downloads/b8d558a470c21e797a9272e5c0bfb9976533b4e219eeae4ed465aadd326ee63c--Proxyman_2.4.2.dmg https://github.com/ProxymanApp/Proxyman/releases/download/2.4.2/Proxyman_2.4.2.dmg https://proxyman.io/ 
1.	Apple Swift version 5.3 (swiftlang-1200.0.28.1 clang-1200.0.30.1)
2.	While running user code "/usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift"
0  swift                    0x00000001087f0fc8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 52
1  swift                    0x00000001087f0120 llvm::sys::RunSignalHandlers() + 128
2  swift                    0x00000001087f1584 SignalHandler(int) + 160
3  libsystem_platform.dylib 0x00000001d8e51c84 _sigtramp + 56
4  libsystem_platform.dylib 0xffff8001d869933c _sigtramp + 18446603336213100272
5  libsystem_platform.dylib 0x000000010d7f4944 _sigtramp + 18446744070297103608
6  swift                    0x0000000104d60e6c llvm::orc::runAsMain(int (*)(int, char**), llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, llvm::Optional<llvm::StringRef>) + 1488
7  swift                    0x0000000104d43ce8 swift::RunImmediately(swift::CompilerInstance&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, swift::IRGenOptions const&, swift::SILOptions const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >&&) + 4628
8  swift                    0x0000000104d23584 performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 1880
9  swift                    0x0000000104d15380 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 18560
10 swift                    0x0000000104cac21c main + 1132
11 libdyld.dylib            0x00000001d8c40a04 start + 4

/usr/local/Homebrew/Library/Homebrew/cask/quarantine.rb:128:in `cask!'
/usr/local/Homebrew/Library/Homebrew/cask/download.rb:55:in `quarantine'
/usr/local/Homebrew/Library/Homebrew/cask/download.rb:21:in `perform'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:152:in `download'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:62:in `fetch'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:90:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:39:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:38:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:38:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:86:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:235:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:162:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:14:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:240:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:240:in `rescue in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:210:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:162:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:14:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'

Running directly also includes:

zsh: segmentation fault   -frontend -interpret  -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk     

So I suppose is a Swift compiler bug

building quarantine.swift with swiftc and then executing the compiled binary does seem to work, so might be an interpreter-specific problem

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 16, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants