xi-editor / xi-mac

The xi-editor mac frontend.
Apache License 2.0
3.02k stars 147 forks source link

xcodebuild error (Xcode 11.3.1) #494

Open goodforever opened 4 years ago

goodforever commented 4 years ago

xcodebuild error (Xcode 11.3.1) xi-mac/Sources/XiCLICore/Xi.swift:15:8: error: no such module 'ArgumentParser' import ArgumentParser . . . note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'ArgumentParser' from project 'swift-argument-parser')

cmyr commented 4 years ago

cc @liamrosenfeld 😁

liamrosenfeld commented 4 years ago

It looks like only xcodebuild -scheme XiEditor works for me. I'm not entirely sure why that would make a difference because just xcodebuild still knows the dependency is needed (it resolves it) it just never attaches it.

purezhi commented 4 years ago

xcodebuild -scheme XiEditor -configuration Release build

tranvansang commented 4 years ago

Error in my pc is different

CompileSwift normal x86_64 (in target 'XiCLICore' from project 'XiEditor')
    cd /Users/transang/xi-mac
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/transang/xi-mac/Sources/XiCLICore/Xi.swift /Users/transang/xi-mac/Sources/XiCLICore/RuntimeError.swift /Users/transang/xi-mac/Sources/XiCLICore/CLIHelper.swift -emit-module-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore.swiftmodule -emit-module-doc-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore.swiftdoc -emit-module-source-info-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore.swiftsourceinfo -serialize-diagnostics-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore-master.dia -emit-objc-header-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore-Swift.h -emit-dependencies-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore-master.d -target x86_64-apple-macos10.11 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I /Users/transang/xi-mac/build/Release -F /Users/transang/xi-mac/build/Release -g -swift-version 5 -enforce-exclusivity=checked -O -serialize-debugging-options -Xcc -working-directory -Xcc /Users/transang/xi-mac -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/XiCLICore-generated-files.hmap -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/XiCLICore-own-target-headers.hmap -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/XiCLICore-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/XiCLICore-project-headers.hmap -Xcc -I/Users/transang/xi-mac/build/Release/include -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/DerivedSources-normal/x86_64 -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/DerivedSources/x86_64 -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/DerivedSources -module-name XiCLICore -num-threads 8 -o /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/Xi.o -o /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/RuntimeError.o -o /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/CLIHelper.o
/Users/transang/xi-mac/Sources/XiCLICore/Xi.swift:15:8: error: no such module 'ArgumentParser'
import ArgumentParser
       ^

** BUILD FAILED **

The following build commands failed:
    CompileSwift normal x86_64
    CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)

All above workarounds do not work. Can anyone help?

I just want to give xieditor a try (to compare with sublime as a performance editor)

liamrosenfeld commented 4 years ago

@tranvansang, are you using Xcode 11?

tranvansang commented 4 years ago

@liamrosenfeld My XCode version Version 11.5 (11E608c)

There is no update at the moment.

diegonvs commented 4 years ago

Did you already installed rust? https://www.rust-lang.org/tools/install

tranvansang commented 4 years ago

Did you already installed rust? https://www.rust-lang.org/tools/install

I did not. But even after installing rust, the error keeps showing

rustc --version
rustc 1.43.1 (8d69840ab 2020-05-04)

I also tried xcodebuild clean, the console prints this error

error: Failed to clean target 'XiCore': mv: rename /Users/transang/xi-mac/build/Release/xi-syntect-plugin to /Users/transang/xi-mac/build/Release/plugins/syntect/bin/xi-syntect-plugin: No such file or directory
 (in target 'XiCore' from project 'XiEditor')

error: Could not delete `/Users/transang/xi-mac/build` because it was not created by the build system.
** CLEAN FAILED **

The following build commands failed:
    /bin/bash /Users/transang/xi-mac/build-rust-xcode.sh
(1 failure)

I did rm -rf build and rebuild with xcodebuild. Same error appears

CompileSwift normal x86_64 (in target 'XiCLICore' from project 'XiEditor')
    cd /Users/transang/xi-mac
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/transang/xi-mac/Sources/XiCLICore/Xi.swift /Users/transang/xi-mac/Sources/XiCLICore/RuntimeError.swift /Users/transang/xi-mac/Sources/XiCLICore/CLIHelper.swift -emit-module-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore.swiftmodule -emit-module-doc-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore.swiftdoc -emit-module-source-info-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore.swiftsourceinfo -serialize-diagnostics-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore-master.dia -emit-objc-header-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore-Swift.h -emit-dependencies-path /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/XiCLICore-master.d -target x86_64-apple-macos10.11 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I /Users/transang/xi-mac/build/Release -F /Users/transang/xi-mac/build/Release -g -swift-version 5 -enforce-exclusivity=checked -O -serialize-debugging-options -Xcc -working-directory -Xcc /Users/transang/xi-mac -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/XiCLICore-generated-files.hmap -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/XiCLICore-own-target-headers.hmap -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/XiCLICore-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/XiCLICore-project-headers.hmap -Xcc -I/Users/transang/xi-mac/build/Release/include -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/DerivedSources-normal/x86_64 -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/DerivedSources/x86_64 -Xcc -I/Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/DerivedSources -module-name XiCLICore -num-threads 8 -o /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/Xi.o -o /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/RuntimeError.o -o /Users/transang/xi-mac/build/XiEditor.build/Release/XiCLICore.build/Objects-normal/x86_64/CLIHelper.o
/Users/transang/xi-mac/Sources/XiCLICore/Xi.swift:15:8: error: no such module 'ArgumentParser'
import ArgumentParser
       ^

** BUILD FAILED **

The following build commands failed:
    CompileSwift normal x86_64
    CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)
ironhopper commented 4 years ago

@tranvansang have you solved that problem? I have same issue.

tranvansang commented 4 years ago

@ironhopper not yet.

nangtrongvuon commented 4 years ago

@tranvansang I’m not sure what’s up, but there are a few things that should help:

Failing these, I’ll upload a xi.app build myself.

dgmzc commented 4 years ago

It looks like only xcodebuild -scheme XiEditor works for me. I'm not entirely sure why that would make a difference because just xcodebuild still knows the dependency is needed (it resolves it) it just never attaches it.

This may end up building the debug build

dgmzc commented 4 years ago

xcodebuild -scheme XiEditor -configuration Release build

This may end up in creating a build folder inside the project root with an empty .app I prefer using xcodebuild -scheme XiEditor -configuration Release Then copy app from ~/Library/Developer/Xcode/DerivedData/XiEditor-xyz/Build/Products/Release/XiEditor.app into Applications

diegonvs commented 4 years ago

Installing rust and running xcodebuild -scheme XiEditor -configuration Release build worked well for me.