swift-playdate-examples
swift-playdate-examples copied to clipboard
Update Package.swift
The current toolchain (org.swift.59202403131a) throws an error in Game.swift:1:1: error: Access level on imports require '-enable-experimental-feature AccessLevelOnImport'
so this has to be added to the package definition.
I dont see any issues using the same toolchain.
Are you sure you have enabled the it properly?
That error is also specific to swift 5.9.x, if I recall correctly:
➜ Life git:(main) make
detected_OS is "Darwin"
Using Swift toolchain "org.swift.59202403131a" (from /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-03-13-a.xctoolchain)
mkdir -p build
mkdir -p build/dep
mkdir -p `dirname build//Users/rauhul/Developer/PlaydateSDK/C_API/buildsupport/setup.o`
/usr/local/bin/arm-none-eabi-gcc -g3 -c -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -D__FPU_USED=1 -O2 -falign-functions=16 -fomit-frame-pointer -gdwarf-2 -Wall -Wno-unused -Wstrict-prototypes -Wno-unknown-pragmas -fverbose-asm -Wdouble-promotion -mword-relocations -fno-common -ffunction-sections -fdata-sections -Wa,-ahlms=build/setup.lst -DTARGET_PLAYDATE=1 -DTARGET_EXTENSION=1 -MD -MP -MF build/dep/setup.o.d -I . -I . -I /Users/rauhul/Developer/PlaydateSDK/C_API /Users/rauhul/Developer/PlaydateSDK/C_API/buildsupport/setup.c -o build//Users/rauhul/Developer/PlaydateSDK/C_API/buildsupport/setup.o
"/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-03-13-a.xctoolchain/usr/bin/swiftc" -Xcc -I -Xcc /usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/include -Xcc -I -Xcc /usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -Xcc -I -Xcc /usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/include -Osize -wmo -enable-experimental-feature Embedded -Xfrontend -disable-stack-protector -Xfrontend -function-sections -swift-version 6 -Xcc -DTARGET_EXTENSION -module-cache-path build/module-cache -I /Users/rauhul/Developer/PlaydateSDK/C_API -I build/Modules -I /Volumes/Developer/org.swift/swift-playdate-examples/Sources/CPlaydate/include -Xcc -mthumb -Xcc -mcpu=cortex-m7 -Xcc -mfloat-abi=hard -Xcc -mfpu=fpv5-sp-d16 -Xcc -D__FPU_USED=1 -Xcc -falign-functions=16 -Xcc -fshort-enums -target armv7em-none-none-eabi -Xfrontend -experimental-platform-c-calling-convention=arm_aapcs_vfp -module-alias Playdate=playdate_device -c Sources/Game.swift -o build/device_lib.o
/usr/local/bin/arm-none-eabi-gcc -g3 build//Users/rauhul/Developer/PlaydateSDK/C_API/buildsupport/setup.o build/device_lib.o -nostartfiles -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -D__FPU_USED=1 -T/Users/rauhul/Developer/PlaydateSDK/C_API/buildsupport/link_map.ld -Wl,-Map=build/pdex.map,--cref,--gc-sections,--no-warn-mismatch,--emit-relocs -o build/pdex.elf
cp build/pdex.elf Source
"/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-03-13-a.xctoolchain/usr/bin/swiftc" -Xcc -I -Xcc /usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/include -Xcc -I -Xcc /usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -Xcc -I -Xcc /usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/include -Osize -wmo -enable-experimental-feature Embedded -Xfrontend -disable-stack-protector -Xfrontend -function-sections -swift-version 6 -Xcc -DTARGET_EXTENSION -module-cache-path build/module-cache -I /Users/rauhul/Developer/PlaydateSDK/C_API -I build/Modules -I /Volumes/Developer/org.swift/swift-playdate-examples/Sources/CPlaydate/include -module-alias Playdate=playdate_simulator -c Sources/Game.swift -o build/simulator_lib.o
clang -g -nostdlib -dead_strip -Wl,-exported_symbol,_eventHandlerShim -Wl,-exported_symbol,_eventHandler build/simulator_lib.o -dynamiclib -rdynamic -lm -DTARGET_SIMULATOR=1 -DTARGET_EXTENSION=1 -I . -I /Users/rauhul/Developer/PlaydateSDK/C_API -o build/pdex.dylib /Users/rauhul/Developer/PlaydateSDK/C_API/buildsupport/setup.c
cp build/pdex.dylib Source
/Users/rauhul/Developer/PlaydateSDK/bin/pdc Source Life.pdx