tensorflow / swift

Swift for TensorFlow
https://tensorflow.org/swift
Apache License 2.0
6.13k stars 606 forks source link

PythonKit error during build: Xcode 12.4, toolchain 0.12 #603

Open jbmaxwell opened 3 years ago

jbmaxwell commented 3 years ago

I keep hitting an error in PythonKit when trying to build my project using the latest 0.12 toolchain:

Type referenced from a stored property in a '@frozen' struct must be '@usableFromInline' or public

Line is: private var pointer: OwnedPyObjectPointer

Any ideas how to get past it?

BradLarson commented 3 years ago

Have you tried using this from a recent Swift.org nightly toolchain, or one of our nightly Ubuntu toolchains? It is possible that the old releases using the tensorflow branch might have somehow drifted in a way that made them incompatible with the current PythonKit. Or there could have been a specific bug within 0.12 that this is exposing.

jbmaxwell commented 3 years ago

I've tried several toolchains—dev snapshots from Jan 23rd and 27th, and the 5.3.3 release build from Jan 25—but they all have various, and serious misgivings (Abort trap 6, and the same PythonKit error)! :) All the errors are in third-party frameworks, mind you, using SPM. I'm going to try removing them all and re-adding them, just in case there's something going on with Xcode... But I suppose they probably have to be supporting Swift 5.3+, yes?

porterchild commented 3 years ago

This only happens building with SPM for me, Xcode is fine