Comments (9)
Raised as FB8882995. From what I gather this might be a problem with playgrounds.
from arena.
This might require defining all the other XCTest symbols though - the library only declares XCTFail
.
from arena.
I did some tests, it seems the RxTest product is the one that kills the mood.
The other four, in any combination, work fine.
I wonder what's so special about it... The only thing I see is this symlink.
That symlink is a red herring, Xcode could clone it just fine and it appeared as a regular file at the proper place. In fact, the complete Sources folder in RxSwift is just a bunch of symlinks.
There was another red herring in the build logs:
Changing the deployment target in Dependencies/Package.swift to macOS 10.15 made the warning go away, but did not change the original error.
My next suspicion is the fact that RxTest is pulling in XCTest, and that might somehow be illegal for a playground.
from arena.
It's definitely the XCTest import! There is a single file inside RxTest that imports it.
After removing this file from the project, the playground started working.
On a whim, I tried to make a playground for Nimble, and that resulted in the same kind of errors.
from arena.
Thanks a lot for raising this and finding out about XCTest!
I know XCTest didn't work in playgrounds in the past but I thought that wasn't a problem anymore. I'll see what I can do.
from arena.
A similar issue occurs when you try to add a SPM package product that imports XCTest to a command line project. In order for the project to build you must make certain changes to the build settings:
For the project build settings, search for "Runpath Search Paths" and add the following paths:
- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/
- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/
For the project build settings, set "Enable Testing Search Paths" to "Yes"
You don't have access to these settings in a playground, so there's probably nothing you can do.
from arena.
@pointfreeco have come up with a workaround to ship XCTFail
in library code and I wonder if this would work in a playground as well.
It's using their new package XCTest Dynamic Overlay. I'll need to try this but perhaps adding this package and import XCTestDynamicOverlay
at the top might work?
from arena.
I wonder if conditional linking of XCTest
would be a workable solution (upstream): https://github.com/apple/swift-collections/blob/main/Package.swift#L72-L81
from arena.
I've just tried this with RxSwift 6.5.0 and Xcode 14.1 and this seems to be fixed now:
from arena.
Related Issues (20)
- "No such module" Error HOT 2
- Errors when using a package supporting macCatalyst HOT 5
- No such module error after building HOT 2
- Can't download arena using mint HOT 8
- error: no such module 'UIKit' HOT 5
- 0.17.0 compile error on Big Sur HOT 2
- Arena doesn't accept branch names with certain characters in them HOT 2
- Playgrounds do not recognise external dependencies with Xcode 12 HOT 4
- Avoid extra folder nesting with `-o` option HOT 1
- Is there anyway to use a package that includes a c module? HOT 9
- Allow Packages to provide Arena with pre-filled sample code HOT 1
- Playground books (--book) crashes Playgrounds 3.4
- Binary Swift Package HOT 1
- Unable to find bundle HOT 3
- Warning when generating playgrounds with Swift 5.6
- Fails for SPIManifest 0.12.0
- Arena fails when package platforms contain `.macCatalyst(_:)` HOT 5
- Wrapper package conflicts with any existing "Dependencies" target HOT 1
- Opening a playground fails when the package manifest references visionOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arena.