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

Error on build when running swift build -c release on 15.1 #102

Open
jrschumacher opened this issue Nov 16, 2024 · 1 comment
Open

Error on build when running swift build -c release on 15.1 #102

jrschumacher opened this issue Nov 16, 2024 · 1 comment

Comments

@jrschumacher
Copy link

When following the guide the error module 'Swift' cannot be imported in embedded Swift mode

> TOOLCHAINS="org.swift.61202411141a" swift build -c release
Building for production...
<unknown>:0: error: module 'Swift' cannot be imported in embedded Swift mode
/Users/ryan/Projects/swift-playdate-examples/Sources/Playdate/Graphics.swift:42:29: warning: result of call to function returning 'LCDBitmapDrawMode' is unused
 40 |   /// displayed as well.
 41 |   public static func setDrawMode(mode: LCDBitmapDrawMode) {
 42 |     graphicsAPI.setDrawMode.unsafelyUnwrapped(mode)
    |                             `- warning: result of call to function returning 'LCDBitmapDrawMode' is unused
 43 |   }
 44 | 

OS: 15.1
Toolchain: 2024-11-14 from trunk

Toolchains

> find /Library/Developer/Toolchains ~/Library/Developer/Toolchains -depth 1 -print 2>/dev/null
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-11-14-a.xctoolchain
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-10-30-a.xctoolchain
/Library/Developer/Toolchains/swift-latest.xctoolchain
@finnvoor
Copy link
Owner

PlaydateKit has a plugin for building projects, swift package pdc (see here for instructions). Just using swift build won't set all the required flags. I'm assuming you were trying to follow the swift-playdate-examples guide instead, which is slightly different, but if the PlaydateKit docs say to use swift build somewhere please let me know as that is incorrect.

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

2 participants