gather-cli icon indicating copy to clipboard operation
gather-cli copied to clipboard

Compile error: 'main' attribute cannot be used in a module that contains top-level code

Open halloleo opened this issue 1 year ago • 0 comments

I am installing gather-cli version 2.1.6 via brew, but I get the following errors:

==> Fetching ttscoff/thelab/gather-cli
==> Cloning https://github.com/ttscoff/gather-cli.git
Updating /Users/me/Library/Caches/Homebrew/gather-cli--git
==> Checking out tag 2.1.6
HEAD is now at 3c83b7b Preparing for 2.1.6 release
HEAD is now at 3c83b7b Preparing for 2.1.6 release
==> Installing gather-cli from ttscoff/thelab
==> make install prefix=/opt/homebrew/Cellar/gather-cli/2.1.6
Last 15 lines from /Users/me/Library/Logs/Homebrew/gather-cli/01.make:
[19/21] Compiling SwiftSoup ArrayExt.swift
[20/23] Compiling Readability Read.swift
[21/23] Compiling HTML2Text Pythonic.dict.swift
[22/24] Compiling gather gather.swift
/private/tmp/gather-cli-20240717-13486-qyrbau/Sources/gather/gather.swift:350:1: error: 'main' attribute cannot be used in a module that contains top-level code
@main
^
/private/tmp/gather-cli-20240717-13486-qyrbau/Sources/gather/gather.swift:1:1: note: top-level code defined in this source file
import AppKit
^
/private/tmp/gather-cli-20240717-13486-qyrbau/Sources/gather/gather.swift:1:1: note: pass '-parse-as-library' to compiler invocation if this is intentional
import AppKit
^
error: fatalError

My environemnt

  • Mac Mini M2
  • macOS 14.5
  • Xcode 15.4
  • Homebrew 4.3.9

halloleo avatar Jul 17 '24 01:07 halloleo