Coder Social home page Coder Social logo

arena's Introduction

@_sa_s

🏟 Arena

Arena is a macOS command line tool to create an Xcode project with a Swift Playground that's readily set up to use a Swift Package Manager library. You can reference both Github and local repositories. The latter is especially useful to spin up a Playground while working on a library.

Arena demo

Arena can also create a Playground in "Playground Book" format, which is the file format supported by "Swift Playgrounds". These playgrounds can then be synced and opened on the iOS version of "Swift Playgrounds" as well.

Here is an overview of the arena command line interface:

arena --help
OVERVIEW: Creates an Xcode project with a Playground and one or more SPM libraries imported and
ready for use.

USAGE: arena [--book] [--force] [--libs <libs> ...] [--outputdir <outputdir>] [--platform <platform>] [--version] [--skip-open] [<dependencies> ...]

ARGUMENTS:
  <dependencies>          Dependency url(s) and (optionally) version specification

OPTIONS:
  --book                  Create a Swift Playgrounds compatible Playground Book bundle
                          (experimental).
  -f, --force             Overwrite existing file/directory
  -l, --libs <libs>       Names of libraries to import (inferred if not provided)
  -o, --outputdir <outputdir>
                          Directory where project folder should be saved (default:
                          /Users/sas/Projects/Arena/Arena-Playground)
  -p, --platform <platform>
                          Platform for Playground (one of 'macos', 'ios', 'tvos') (default:
                          macos)
  -v, --version           Show version
  --skip-open             Do not open project in Xcode on completion
  -h, --help              Show help information.

Examples

Import Github repository

arena https://github.com/finestructure/Gala
➡️ Package: https://github.com/finestructure/Gala @ from(0.2.1)
🔧 Resolving package dependencies… 
📔 Libraries found: Gala
✅ Created project in folder 'Arena-Playground'

Using Github shorthand syntax

You can skip the protocol and domain when referring to Github projects:

arena finestructure/Gala
➡️ Package: https://github.com/finestructure/Gala @ from(0.2.1)
🔧 Resolving package dependencies…
📔 Libraries found: Gala
✅ Created project in folder 'Arena-Playground'

Import local repository

arena ~/Projects/Parser
➡️ Package: file:///Users/sas/Projects/Parser @ path
🔧 Resolving package dependencies…
📔 Libraries found: Parser
✅ Created project in folder 'Arena-Playground'

Import both

arena ~/Projects/Parser finestructure/Gala
➡️ Package: file:///Users/sas/Projects/Parser @ path
➡️ Package: https://github.com/finestructure/Gala @ from(0.2.1)
🔧 Resolving package dependencies…
📔 Libraries found: Parser, Gala
✅ Created project in folder 'Arena-Playground'

Specifying versions

In case you want to fetch a particular revision, range of revisions, or branch, you can use a syntax similar to the one used in a Package.swift file. Here's what's supported and the corresponding package dependecy that it will create in the generated project:

  • https://github.com/finestructure/[email protected]

    .package(url: "https://github.com/finestructure/Gala", exact: "0.1.0")

  • https://github.com/finestructure/Gala@from:0.1.0

    .package(url: "https://github.com/finestructure/Gala", from: "0.1.0")

  • "https://github.com/finestructure/[email protected]..<4.0.0"

    .package(url: "https://github.com/finestructure/Gala", "0.1.0"..<"4.0.0")

  • https://github.com/finestructure/[email protected]

    .package(url: "https://github.com/finestructure/Gala", "0.1.0"..<"4.0.1")

  • https://github.com/finestructure/Gala@branch:master

    .package(url: "https://github.com/finestructure/Gala", branch: "master")

  • https://github.com/finestructure/Gala@revision:7235531e92e71176dc31e77d6ff2b128a2602110

    .package(url: "https://github.com/finestructure/Gala", revision: "7235531e92e71176dc31e77d6ff2b128a2602110")

Make sure to properly quote the URL if you are using the ..< range operator. Otherwise your shell will interpret the < character as input redirection.

Adding another dependency

Arena does not currently support adding further dependencies to an existing playground. However, since its dependencies are managed via the PlaygroundDependencies package, you can simply add further entries to its Package.swift file - just like you would when extending any other package manifest.

Here's what this looks like:

Adding a dependency

How to install Arena

Homebrew

You can install Arena with Homebrew:

brew install finestructure/tap/arena

Mint

You can install Arena with Mint:

mint install finestructure/arena

Make

Last not least, you can build and install arena via the included Makefile by running:

make install

This will copy the binary arena to /usr/local/bin.

Overriding the default playground code

Be default, Arena adds import statements for the library targets it finds in a package.

As a package author, you can override this behaviour by adding a file .arena-sample.swift to the top level of your repository. The contents of this file will be used as the playground source code.

Parser is a Swift package that comes with a .arena-sample.swift file.

Why Arena?

Arena – Spanish for "sand" – is abundant in playgrounds. And also, sometimes you've got to take your source code to the arena for a fight 😅

Compatibility

Starting with version 1.0, arena requires Xcode 12. Xcode 12 brings a number of improvements that make playgrounds work much better than previous versions of Xcode. Also, arena now creates a simpler project structer that can be manually edited to add more dependencies.

If you want to use arena with Xcode 11, please use the latest 0.x release.

Playground books created by arena should run on macOS as well as iOS. Please bear in mind that the Swift packages you import when creating playground books will need to be iOS compatible.

Note that while creating playgrounds requires macOS 10.15+ and Swift 5.3, the resulting playgrounds should be supported on a wider range of operating system and compiler versions. This will mainly depend on the packages you are importing.

arena's People

Contributors

daveverwer avatar diggory avatar finestructure avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

arena's Issues

Playgrounds do not recognise external dependencies with Xcode 12

Imported modules are flagged with "no such module", despite clearly building something. The exact same playground project works in Xcode 11.

I need to research how external dependencies are supposed to work when set up manually with Xcode 12. I suspect the project file format is different to what Arena is generating right now.

Errors when using a package supporting macCatalyst

When attempting to use arena (version 1.3.0; latest in homebrew) with a package that has macCatalyst listed in its platforms (e.g. platforms: [ .iOS(.v16), .macCatalyst(.v16), ],), arena fails with error:

🔧 Resolving package dependencies…
Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "platforms", intValue: nil), _JSONKey(stringValue: "Index 1", intValue: 1), CodingKeys(stringValue: "platformName", intValue: nil)], debugDescription: "Cannot initialize Name from invalid String value maccatalyst", underlyingError: nil))

[feature request] ⌘+b automatically at first launch

it's kinda a buttery smooth experience now! with the playground opening in xcode immediately after install, but I still have to use ⌘+b to build it before I can use my module. Is it possible to do that once for us so we can just immediately import our library and rejoice?

Binary Swift Package

Problem statement

The binary package is not properly linked at build time.

Screenshot 2021-04-09 at 13 56 21

Running following command succesfully generates Xcode playground with the binary Swift Package provided via url.

arena https://github.com/zendesk/chat_providers_sdk_ios

Environment:

Arena version: 1.2.1
XCode Version: 12.4

Support for the Playgrounds app on macOS

None of the generated playgrounds can be opened in the Playgrounds app for macOS. I understand that those playgrounds could work after tweaking their settings manually, but I wasn't able to achieve that. It would be great if Arena generated a compatible playground automatically (possibly controlled with a command-line flag if needed).

Fetch transitive dependency sources into Playground Books

Arena currently fetches the sources of direct dependencies and integrates them (flattened) into UserModule. It does not fetch sources of transitive dependencies, i.e. dependencies that are dependencies of your primary dependency.

The sources are actually there, in .build/checkouts, just need to pull them in.

Example

arena https://github.com/finestructure/ArenaTest --book
$  ls -l SPM-Playground/SPM-Playground.playgroundbook/Contents/UserModules/UserModule.playgroundmodule/Sources/
total 8
-r--r--r--  1 sas  staff  52  2 Mar 09:18 ArenaTest-ArenaTest.swift

Latest revision lookup seems to fail for some repos

Hi,

I am just trying out Arena and get the following error:

diggory@MBP-16 ~ % arena https://github.com/Peter-Schorn/Swift_Utilities.git
➡️ Package: https://github.com/Peter-Schorn/Swift_Utilities.git @ from(0.0.0)
🔧 Resolving package dependencies ...
Error: ShellOut encountered an error
Status code: 1
Message: "error: because no versions of Swift_Utilities match the requirement 0.0.0..<1.0.0 and root depends on Swift_Utilities 0.0.0..<1.0.0, version solving failed."
Output: "Fetching https://github.com/Peter-Schorn/Swift_Utilities.git"
diggory@MBP-16 ~ % arena --version
0.15.3

It looks as if the package it’s trying to get has tags that range from 1.0.0 to 1.4.1 but it’s failing because arena is looking for a tagged version between 0.0.0 and less than 1.0.0. Is that right?
Is this a bug?

I can work around it by specifying the latest tagged version:

diggory@MBP-16 ~ % arena https://github.com/Peter-Schorn/Swift_Utilities@from:1.4.1
➡️ Package: https://github.com/Peter-Schorn/Swift_Utilities @ from(1.4.1)
🔧 Resolving package dependencies ...
📔 Libraries found: Utilities
🔨 Building package dependencies ...
✅ Created project in folder 'Arena-Playground'

Fix swift preview library import

$ spm-playground -d https://github.com/apple/swift-standard-library-preview
🔧  resolving package dependencies
error: ShellOut encountered an error
Status code: 1
Message: "error: dependency graph is unresolvable; found these conflicting requirements:

Dependencies:
    https://github.com/apple/swift-standard-library-preview @ 0.0.0..<1.0.0"
Output: "Fetching https://github.com/apple/swift-standard-library-preview"

error: no such module 'UIKit'

It says error: no such module 'UIKit' even if I specify platform as ios.

Log:

➜  arena https://github.com/hlung/SwiftFlow -p ios -f
➡️  Package: https://github.com/hlung/SwiftFlow @ from(1.0.1)
🔧 Resolving package dependencies ...
📔 Libraries found: SwiftFlow
🔨 Building package dependencies ...
Error: ShellOut encountered an error
Status code: 65
Message: "2020-06-19 20:54:38.160 xcodebuild[62113:4411669] [MT] PluginLoading: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2020-06-19 20:54:41.603 xcodebuild[62113:4411669] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fec5e0c6a50), iPhone 7 plus, iPhone, 13.4.1 (17D50), 0638bbbe9a88760cac8d7fb7170d564050932622> == Underlying device preparation errors ==
2020-06-19 20:54:41.603 xcodebuild[62113:4411669] [MT] iPhoneConnect: Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Domain: com.apple.platform.iphoneos
Code: 5
Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <DVTPlatform:0x7fec5b5326b0:'com.apple.platform.iphoneos':<DVTFilePath:0x7fec5b532400:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>. DTDKDeviceIdentifierIsIDID: 0
User Info: {
    DVTDeviceDescription = "\Ud83d\Udcf1<DVTiOSDevice (0x7fec5e0c6a50), iPhone 7 plus, iPhone, 13.3.1 (17D50), 0638bbbe9a88760cac8d7fb7170d564050932622>";
}
--
2020-06-19 20:54:41.604 xcodebuild[62113:4411669] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fec5e0c6a50), iPhone 7 plus, iPhone, 13.4.1 (17D50), 0638bbbe9a88760cac8d7fb7170d564050932622> == END: Underlying device preparation errors ==
2020-06-19 20:54:42.170 xcodebuild[62113:4411669] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fec5e0c6a50), iPhone 7 plus, iPhone, 13.4.1 (17E262), 0638bbbe9a88760cac8d7fb7170d564050932622> == Underlying device preparation errors ==
2020-06-19 20:54:42.171 xcodebuild[62113:4411669] [MT] iPhoneConnect: Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Domain: com.apple.platform.iphoneos
Code: 5
Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <DVTPlatform:0x7fec5b5326b0:'com.apple.platform.iphoneos':<DVTFilePath:0x7fec5b532400:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>. DTDKDeviceIdentifierIsIDID: 0
User Info: {
    DVTDeviceDescription = "\Ud83d\Udcf1<DVTiOSDevice (0x7fec5e0c6a50), iPhone 7 plus, iPhone, 13.3.1 (17D50), 0638bbbe9a88760cac8d7fb7170d564050932622>";
}
--
2020-06-19 20:54:42.171 xcodebuild[62113:4411669] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fec5e0c6a50), iPhone 7 plus, iPhone, 13.4.1 (17E262), 0638bbbe9a88760cac8d7fb7170d564050932622> == END: Underlying device preparation errors ==
** BUILD FAILED **


The following build commands failed:
	CompileSwift normal x86_64
	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)"
Output: "Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

note: Using new build system
note: Planning build
note: Constructing build description
CreateBuildDirectory /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    builtin-create-build-directory /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build

SymLink /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Resources Versions/Current/Resources (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    /bin/ln -sfh Versions/Current/Resources /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Resources

SymLink /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/SwiftFlow Versions/Current/SwiftFlow (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    /bin/ln -sfh Versions/Current/SwiftFlow /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/SwiftFlow

SymLink /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions/Current A (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    /bin/ln -sfh A /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions/Current

SymLink /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Headers Versions/Current/Headers (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    /bin/ln -sfh Versions/Current/Headers /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Headers

MkDir /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions/A/Headers (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    /bin/mkdir -p /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions/A/Headers

MkDir /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions/A/Resources (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    /bin/mkdir -p /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions/A/Resources

MkDir /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions/A (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    /bin/mkdir -p /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions/A

SymLink /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Modules Versions/Current/Modules (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    /bin/ln -sfh Versions/Current/Modules /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Modules

MkDir /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    /bin/mkdir -p /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions

MkDir /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    /bin/mkdir -p /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework

WriteAuxiliaryFile /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/SwiftFlow.SwiftFileList (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    write-file /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/SwiftFlow.SwiftFileList

WriteAuxiliaryFile /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/SwiftFlow.LinkFileList (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    write-file /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/SwiftFlow.LinkFileList

ProcessInfoPlistFile /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions/A/Resources/Info.plist /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/Arena-Playground.xcodeproj/SwiftFlow_Info.plist (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    builtin-infoPlistUtility /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/Arena-Playground.xcodeproj/SwiftFlow_Info.plist -producttype com.apple.product-type.framework -expandbuildsettings -platform macosx -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/SwiftFlow.framework/Versions/A/Resources/Info.plist

WriteAuxiliaryFile /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/SwiftFlow-OutputFileMap.json (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    write-file /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/SwiftFlow-OutputFileMap.json

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name SwiftFlow -O -whole-module-optimization -enforce-exclusivity=checked @/Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/SwiftFlow.SwiftFileList -DSWIFT_PACKAGE -DXcode -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -target x86_64-apple-macos10.10 -g -Xfrontend -serialize-debugging-options -enable-testing -swift-version 5 -I /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release -F /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -c -num-threads 4 -output-file-map /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/SwiftFlow-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/SwiftFlow.swiftmodule -Xcc -I/Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/swift-overrides.hmap -Xcc -I/Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/include -Xcc -I/Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/DerivedSources-normal/x86_64 -Xcc -I/Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/DerivedSources/x86_64 -Xcc -I/Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/DerivedSources -Xcc -DSWIFT_PACKAGE=1 -emit-objc-header -emit-objc-header-path /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/SwiftFlow-Swift.h -working-directory /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground

CompileSwift normal x86_64 (in target 'SwiftFlow' from project 'Arena-Playground')
    cd /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Models/Arrow.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Models/ArrowDrawingPlan.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Models/Configs.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Models/EdgeOffsets.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Models/Enums/Direction.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Models/Enums/GraphDrawError.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Models/Enums/NodeShape.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Models/Graph.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Models/Node.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Models/Protocols.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Views/GraphView.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Views/Label.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Views/NodeView.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Views/UIBazierPath+Diamond.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Views/UIBezierPath+Arrow.swift /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Views/UIKit+Direction.swift -supplementary-output-file-map /var/folders/h4/3scg9_c55pz5flqcj0dn156r0hg5jx/T/supplementaryOutputs-08001b -target x86_64-apple-macos10.10 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release -F /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -enable-testing -g -swift-version 5 -enforce-exclusivity=checked -O -D SWIFT_PACKAGE -D Xcode -serialize-debugging-options -Xcc -working-directory -Xcc /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground -Xcc -I/Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/swift-overrides.hmap -Xcc -I/Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Release/include -Xcc -I/Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/DerivedSources-normal/x86_64 -Xcc -I/Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/DerivedSources/x86_64 -Xcc -I/Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/DerivedSources -Xcc -DSWIFT_PACKAGE=1 -module-name SwiftFlow -num-threads 4 -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/Arrow.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/ArrowDrawingPlan.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/Configs.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/EdgeOffsets.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/Direction.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/GraphDrawError.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/NodeShape.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/Graph.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/Node.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/Protocols.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/GraphView.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/Label.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/NodeView.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/UIBazierPath+Diamond.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/UIBezierPath+Arrow.o -o /Users/thongchai.kolyutsaku/Work/Viki\ Projects/Arena-Playground/build/Arena-Playground.build/Release/SwiftFlow.build/Objects-normal/x86_64/UIKit+Direction.o
/Users/thongchai.kolyutsaku/Work/Viki Projects/Arena-Playground/.build/checkouts/SwiftFlow/Sources/SwiftFlow/Models/Arrow.swift:1:8: error: no such module 'UIKit'
import UIKit
       ^
"

Check if we can ditch the workspace

It seems xcworkspace may not be required anymore for embedded playgrounds. Check if we can ditch it and open the playground or project directly instead.

No such module error after building

Continuing to get the No such module error despite following instructions and building to re-trigger the SPM package.

Details:

  • Xcode 15.2.0
  • Arena 1.3.4

Also curious to understand what Arena is doing that allows playgrounds to use SPM.

"error: no such module" in playground after running Arena

After running: $ arena https://github.com/davedelong/time -p ios
MyPlayground has one line:

import Time

running the playground ends with:

error: MyPlayground.playground:1:8: error: no such module 'Time'
import Time

same happens with other SPM libs I tried. Also with local lib.

Xcode 11.3.1, Arena 0.8.1, Catalina 10.15.3

Default to fetching latest release

Arena currently uses @from:0.0.1 as the default if no release is specified. That works fine until a package reaches 1.0.0, because from:0.0.1 is equivalent to 0.0.1..<1.0.0.

Should fetch the latest release from Github instead (if the dependency is hosted on Github).

Add back "no such module" hint

While the module should be built properly as part of the set up process, Xcode being Xcode, it appears that it doesn't always work.

Add back a source code comment to the top of the file:

// If running the playground fails with an error "no such module ..."
// go to Product -> Build to re-trigger building the SPM package.

Fails for SPIManifest 0.12.0

✦ ❯ arena https://github.com/SwiftPackageIndex/[email protected]
➡️  Package: https://github.com/SwiftPackageIndex/SPIManifest @ exact(0.12.0)
🔧 Resolving package dependencies ...
Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "products", intValue: nil), _JSONKey(stringValue: "Index 2", intValue: 2), CodingKeys(stringValue: "type", intValue: nil)], debugDescription: "none of the required keys found", underlyingError: nil))

Works for 0.11.0:

❯ arena https://github.com/SwiftPackageIndex/[email protected] -f
➡️  Package: https://github.com/SwiftPackageIndex/SPIManifest @ exact(0.11.0)
🔧 Resolving package dependencies ...
📔 Libraries found: SPIManifest
✅ Created project in folder 'Arena-Playground'

I suspect the problem is the plugin I added in 0.12.0.

Failed for Gen

I tried to import https://github.com/pointfreeco/swift-gen and it failed during the progress.

Version: 0.12.0
Error:

➡️  Package: https://github.com/pointfreeco/swift-gen.git @ from(0.2.0)
🔧  Resolving package dependencies ...
📔  Libraries found: Gen
Error: ShellOut encountered an error
Status code: 1
Message: "'Arena-Playground' ... /Arena-Playground: error: product dependency 'Gen' in package 'Gen' not found
warning: dependency 'Gen' is not used by any target"
Output: ""

Steps to reproduce:

arena https://github.com/pointfreeco/swift-gen.git@from:0.2.0

Local fix:

I was able to fix it locally by getting rid of the package name, because it can be optional.
But the question is - does my change make sense? I'm not so familiar with the SPM.

ArenaCommand.swift:210

.product(name: "\($0.libraryName)", package: "\($0.packageName)") // original 
.product(name: "\($0.libraryName)") // new

Support GitHub shorthand e.g `davedelong/time`

It would be really nice to be able to run arena apple/swift-argument-parser to quickly pull up a package. If this is ambiguous with the local syntax then I'd suggest adding a -g --github option.

Adding library to an existing arena project

Hi there, thanks for awesome work :)

Often I'm jumping into Arena with SnapKit or something and after tinkering for a while comes the need for additional dependency.

What I'm doing now is recreating a new project and moving whole playground sources there.

I'm a bit lost, maybe there is designated way to add libraries to the existing arena project 🤔

Can't download arena using mint

I tried to install arena using mint. I wrote $ mint install finestructure/arena and it gave me this output:

🌱 Finding latest version of arena 🌱 Cloning arena 0.16.1 🌱 Resolving package error: terminated(72): rvm_bin_flag= rvm_quiet_flag= rvm_ruby_make_install= LIBRARY_PATH=/usr/local/lib ITERM_SESSION_ID=w0t0p0:6EC70495-9B9C-4BF6-890E-79D0224DC82B LANG=ru_RU.UTF-8 rvm_niceness= TMPDIR=/var/folders/0c/dqw12czj0n70y_2nhk8jpt640000gp/T/ SPACESHIP_ROOT=/Users/maksimalekseev/.oh-my-zsh/custom/themes/spaceship-prompt rvm_sdk= LC_TERMINAL_VERSION=3.3.9 rvm_ruby_bits= LC_TERMINAL=iTerm2 rvm_docs_type= LSCOLORS=Gxfxcxdxbxegedabagacad rvm_gemstone_url= LESS=-R COLORTERM=truecolor PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/go/bin:/Users/maksimalekseev/.rvm/bin PAGER=less CPATH=/usr/local/include rvm_alias_expanded= __CF_USER_TEXT_ENCODING=0x1F6:0x7:0x31 rvm_bin_path=/Users/maksimalekseev/.rvm/bin TERM=xterm-256color USER=maksimalekseev rvm_version=1.29.9 (latest) TERM_SESSION_ID=w0t0p0:6EC70495-9B9C-4BF6-890E-79D0224DC82B rvm_ruby_make= rvm_proxy= rvm_gemstone_package_file= HOME=/Users/maksimalekseev rvm_silent_flag= COLORFGBG=15;0 rvm_pretty_print_flag= XPC_FLAGS=0x0 ITERM_PROFILE=Dark SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.8NtE59INjl/Listeners SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk _=/usr/bin/swift ZSH=/Users/maksimalekseev/.oh-my-zsh rvm_prefix=/Users/maksimalekseev XPC_SERVICE_NAME=0 rvm_script_name= rvm_only_path_flag= TERM_PROGRAM_VERSION=3.3.9 rvm_path=/Users/maksimalekseev/.rvm GOPATH=/Users/maksimalekseev/go TERM_PROGRAM=iTerm.app rvm_use_flag= PWD=/private/var/folders/0c/dqw12czj0n70y_2nhk8jpt640000gp/T/mint/github.com_finestructure_arena SHELL=/bin/zsh SHLVL=2 LOGNAME=maksimalekseev rvm_nightly_flag= rvm_hook= SPACESHIP_VERSION=3.11.2 rvm_ruby_mode= rvm_ruby_file= xcrun --sdk macosx --find xctest output: xcrun: error: unable to find utility "xctest", not a developer tool or in PATH 🌱 Encountered error during "swift package resolve". Use --verbose to see full output 🌱 Failed to resolve arena 0.16.1 with SPM

Arena fails when package platforms contain `.macCatalyst(_:)`

When running arena on a package that contains explicit support for macCatalyst(_:), the script fails with the following error:

Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "platforms", intValue: nil), _JSONKey(stringValue: "Index 1", intValue: 1), CodingKeys(stringValue: "platformName", intValue: nil)], debugDescription: "Cannot initialize Name from invalid String value maccatalyst", underlyingError: nil))

Doesn't work with paths containing spaces, or the `.` directory

The following invocations fail with "invalid value for dependency" or "invalid value for output":

arena -o . some/dependency
arena -o some\ output/path some/dependency
arena -o some/output/path some\ dependency/path
arena -o "some output/path" some/dependency
arena -o some/output/path "some dependency/path"

Unable to find bundle

Thanks for a great tool! Trying to use it with my UICore local package with resources

Got the following error:

UICore/resource_bundle_accessor.swift:27: Fatal error: unable to find bundle named UICore_UICore

Package.swift:

import PackageDescription

let package = Package(
    name: "Dependencies",
    platforms: [
        .iOS(.v14),
    ],
    products: [
        // Products define the executables and libraries a package produces, and make them visible to other packages.
        .library(
            name: "Dependencies",
            targets: ["Dependencies"]),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages this package depends on.
        .target(
            name: "Dependencies",
            dependencies: []
        ),
        .testTarget(
            name: "DependenciesTests",
            dependencies: ["Dependencies"]),
    ]
)

package.dependencies = [
    .package(name: "UICore", path: "../../Modules/UICore"),
]
package.targets = [
    .target(name: "Dependencies",
        dependencies: [
            .product(name: "UICore", package: "UICore"),
        ]
    )
]
package.platforms = [
    .iOS("14.0")
]

UICore Package.swift

        .target(
            name: "UICore",
            dependencies: [
...
            ],
            resources: [
                .process("Resources")
            ]

The resulting product folder contains this bundle.
Screenshot 2021-10-28 at 11 49 46

Do you have any idea how to fix it? @finestructure

Thanks!

"No such module" Error

Hi.
The tool is awesome, super helpful.
But it doesn't work anymore.
I always get the the "No such module" error, whatever I try.

Packages that import XCTest break generated playgrounds

As we've discussed on Discord, using Arena 1.0.0 to make a playground for RxSwift (5.1.1 at the time of writing) results in a seemingly valid workspace playground that Xcode loads successfully, with autocomplete to boot.

However, running the playground fails with errors such as:

error: MyPlayground.playground:8:15: error: cannot find type 'Observable' in scope
let triggers: Observable<Int> = Observable.merge(
              ^~~~~~~~~~

error: MyPlayground.playground:15:29: error: cannot find type 'Observable' in scope
    .flatMapLatest { max -> Observable<Int> in
                            ^~~~~~~~~~

An example repo is available here (GH link), or here (ZIP).


As a workaround, editing Dependencies/Package.swift and removing all product dependencies except RxSwift makes the playground work.

From:

package.targets = [
    .target(name: "Dependencies",
        dependencies: [
            .product(name: "RxSwift", package: "RxSwift"),
.product(name: "RxCocoa", package: "RxSwift"),
.product(name: "RxRelay", package: "RxSwift"),
.product(name: "RxBlocking", package: "RxSwift"),
.product(name: "RxTest", package: "RxSwift")
        ]
    )
]

To:

package.targets = [
    .target(name: "Dependencies",
        dependencies: [
            .product(name: "RxSwift", package: "RxSwift")
        ]
    )
]

Failed for Squid

I tried to create a Playground with package from https://github.com/borchero/Squid.git, but that failed:

Ivans-iMac:ElementsPlayground imyrvold$ spm-playground -d https://github.com/borchero/Squid.git
🔧 resolving package dependencies
error: ShellOut encountered an error
Status code: 1
Message: "error: the package dependency graph could not be resolved; unable to find any available tag for the following requirements:
https://github.com/borchero/Squid.git @ 0.0.0..<1.0.0"
Output: "Fetching https://github.com/borchero/Squid.git"

Integration test fails with Xcode 11.4 GM

/Users/sas/Projects/Arena/Tests/ArenaTests/IntegrationTests.swift:26: error: -[ArenaTests.IntegrationTests test_ArenaTest] : failed: caught error: "ShellOut encountered an error
Status code: 1
Message: "/Users/sas/Library/Developer/Xcode/DerivedData/Arena-afsvtnjaawuywjerajcesgndmdum/Build/Products/Debug/ArenaIntegrationTest: error: manifest parse error(s):
/Users/sas/Library/Developer/Xcode/DerivedData/Arena-afsvtnjaawuywjerajcesgndmdum/Build/Products/Debug/ArenaIntegrationTest/Package.swift:36:14: error: 'product(name:package:)' is unavailable: the 'package' argument is mandatory as of tools version 5.2
            .product(name: "ArenaTest")
             ^~~~~~~
PackageDescription.Target.Dependency:4:24: note: 'product(name:package:)' was obsoleted in PackageDescription 5.2
    public static func product(name: String, package: String? = nil) -> PackageDescription.Target.Dependency
                       ^"
Output: """

Problem opening a cloned project

Hi, I'm using arena to test my library and I uploaded it to git but when I went to clone the project and opened playgrounds in Xcode it's not loaded the package, I'll leave a screenshot below

Captura de Tela 2024-06-13 às 11 33 32

Arena Version: 1.3.4
Xcode: 15.4.0

Could you tell me how I can open it again in xcode and install the package?

Cannot Build/Install via Homebrew on Mojave

brew install finestructure/tap/area

fails eventually with:

/private/tmp/arena-20200428-1896-u8jqtu/Arena-0.16.0: error: manifest parse error(s):
<unknown>:0: error: Swift does not support the SDK 'MacOSX10.14.sdk'

Mac OS version 10.14.6
Swift 5.1.3

This is not a showstopper for me personally as I was able to build and install on a Catalina MacBook and move the resulting playground/workspace to the Mojave computer and use it there successfully. I only mention this because the README's Compatibility section may need to be revised. (I don't know that Mojave compatibility is really important at this point?)

Local Packages Not Working

I ran on the latest install

arena --book -p ios ../MyLocalPackage

and the package cant be found when I open the xcworkspace

Installation via Homebrew?

Thanks for this great tool! I wonder if there's an easy way to make it installable via Homebrew, so that there's one step less to install: you wouldn't need to clone the repository.

0.17.0 compile error on Big Sur

Unable to upgrade via Brew on Big Sur to 0.17.0:

$ brew upgrade arena
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/core, homebrew/cask and caskroom/cask).
==> Updated Formulae
Updated 1 formula.
==> Updated Casks
ibackup-viewer                                                               ibackup-viewer

Warning: You are using macOS 11.0.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this pre-release version.

==> Upgrading 1 outdated package:
finestructure/tap/arena 0.16.1 -> 0.17.0
==> Upgrading finestructure/tap/arena 0.16.1 -> 0.17.0 
==> Downloading https://github.com/finestructure/Arena/archive/0.17.0.tar.gz
==> Downloading from https://codeload.github.com/finestructure/Arena/tar.gz/0.17.0
######################################################################## 100.0%
==> swift build --configuration release --disable-sandbox
Last 15 lines from /Users/leo/Library/Logs/Homebrew/arena/01.swift:
    memcpy(buf.baseAddress!, UnsafePointer<UInt8>(bytes), buf.count)
                                                  ^~~~~
/private/tmp/arena-20200813-50476-kulb1b/Arena-0.17.0/.build/checkouts/swift-llbuild/products/llbuildSwift/Internals.swift:34:51: note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    memcpy(buf.baseAddress!, UnsafePointer<UInt8>(bytes), buf.count)
                                                  ^
[91/94] Compiling llbuildBuildSystem BuildSystem.cpp
[92/94] Compiling TSCBasic Await.swift
[93/95] Compiling TSCUtility Archiver.swift
[94/99] Compiling LLBuildManifest BuildManifest.swift
/private/tmp/arena-20200813-50476-kulb1b/Arena-0.17.0/.build/checkouts/swift-package-manager/Sources/LLBuildManifest/BuildManifest.swift:44:9: error: overlapping accesses to 'self.targets', but modification requires exclusive access; consider copying to a local variable
        targets[target, default: createTarget(target)].nodes.append(node)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/private/tmp/arena-20200813-50476-kulb1b/Arena-0.17.0/.build/checkouts/swift-package-manager/Sources/LLBuildManifest/BuildManifest.swift:44:34: note: conflicting access is here
        targets[target, default: createTarget(target)].nodes.append(node)
                                 ^~~~~~~~~~~~

Do not report this issue to Homebrew/brew or Homebrew/core!


Error: You are using macOS 11.0.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this pre-release version.

Allow Packages to provide Arena with pre-filled sample code

First of all, fantastic project — and name!

I'd like to put forward the idea of Arena being able to read a designated Swift file from the Package directory and pre-fill the generated playground with it. The file could be specific to Arena (ArenaSample.swift) or something else, it's really down to flavor.

Let me know your thoughts.

Error: image not found

macOS Catalina 10.15.4
arena -v 0.15.2

➡️  Package: https://github.com/finestructure/Gala @ from(0.3.0)
🔧 Resolving package dependencies ...
Error: invalidManifestFormat("dyld: Library not loaded: /Library/Caches/com.apple.xbs/Binaries/swiftpm/install/TempContent/Objects/.bootstrap/lib/swift/pm/4_2/libPackageDescription.dylib\n  Referenced from: /var/folders/22/_3lb5xgx77d5811h7nvz8nt4898fdc/T/TemporaryDirectory.sicXjH/gala-manifest\n  Reason: image not found", diagnosticFile: nil)

Arena doesn't accept branch names with certain characters in them

Even when quoted:

arena https://github.com/AudioKit/AudioKit@branch:v5-develop
arena "https://github.com/AudioKit/AudioKit@branch:v5-develop"
arena https://github.com/AudioKit/AudioKit@branch:"v5-develop"

all give

Error: The value 'https://github.com/AudioKit/AudioKit@branch:v5-develop' is invalid for <dependencies>

whereas

aure$ arena https://github.com/AudioKit/AudioKit@branch:arena
➡️  Package: https://github.com/AudioKit/AudioKit @ branch("arena")

builds the playground.

I get "no such module" error after importing from GitHub

when I try this arena https://github.com/pointfreeco/swift-parsing.git
import Parsing No such module 'Parsing'

when I try Product -> Build
the package dependencies disappear!

Xcode version: Version 15.3 (15E204a)
Swift: Apple Swift version 5.10
MacOS: macOS Sonoma Version 14.4.1

What am I doing wrong? Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.