小编kwo*_*okt的帖子

尝试运行应用程序时找不到Xcode文件

我在Xcode中遇到此错误然后我尝试运行我的应用程序

Ld /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator/KeyboardTests.xctest/KeyboardTests normal x86_64
    cd "/Users/danielsorensen/Downloads/codecanyon-9105493-color-keyboard-universal/Color Custom Keyboard"
    export IPHONEOS_DEPLOYMENT_TARGET=8.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator -F/Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/Developer/Library/Frameworks -filelist /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Intermediates/Keyboard.build/Debug-iphonesimulator/KeyboardTests.build/Objects-normal/x86_64/KeyboardTests.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -bundle_loader /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator/Color\ Custom\ Keyboard.app/Color\ Custom\ Keyboard -Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Intermediates/Keyboard.build/Debug-iphonesimulator/KeyboardTests.build/Objects-normal/x86_64/KeyboardTests.swiftmodule -mios-simulator-version-min=8.0 -Xlinker -dependency_info -Xlinker /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Intermediates/Keyboard.build/Debug-iphonesimulator/KeyboardTests.build/Objects-normal/x86_64/KeyboardTests_dependency_info.dat -o /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator/KeyboardTests.xctest/KeyboardTests

ld: file not found: /Users/danielsorensen/Library/Developer/Xcode/DerivedData/Keyboard-cimemloksqjdnxhkdziqxwhxgwcg/Build/Products/Debug-iphonesimulator/Color Custom Keyboard.app/Color Custom Keyboard
clang: error: linker command failed with exit code 1 (use -v to see …
Run Code Online (Sandbox Code Playgroud)

testing xcode file

6
推荐指数
2
解决办法
9646
查看次数

泛型类型在 Stubgen 生成的 .pyi 文件中丢失其 Generic[T, ...] 基类

假设有一个非常简单的类,它代表一个通用堆栈,因此继承自Generic[T]( \xc2\xa71 )。

\n
from typing import TypeVar, Generic, List\n\nT = TypeVar(\'T\')\n\nclass Stack(Generic[T]): #1\n    def __init__(self) -> None:\n        self.items: List[T] = []\n\n    def push(self, item: T) -> None:\n        self.items.append(item)\n\n    def pop(self) -> T:\n        return self.items.pop()\n\n    def empty(self) -> bool:\n        return not self.items\n
Run Code Online (Sandbox Code Playgroud)\n

然后让我们.pyi为该类所在的模块生成一个存根文件Stack,例如stack.py

\n
$ stubgen stack.py --output stubs\n
Run Code Online (Sandbox Code Playgroud)\n

很明显,Generic[T]基类被意外剥离(\xc2\xa72)。同时,该items属性的类型提示被替换为Any\xc2\xa73)。push此外,让事情变得更奇怪的是,和的存根版本仍然分别具有参数和返回值的pop类型提示( \xc2\xa74\xc2\xa75)。T

\n …

python generics types mypy

6
推荐指数
0
解决办法
256
查看次数

标签 统计

file ×1

generics ×1

mypy ×1

python ×1

testing ×1

types ×1

xcode ×1