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

Fix Danger on Linux with Swift 5.0 #214

Closed
f-meloni opened this issue Mar 22, 2019 · 7 comments
Closed

Fix Danger on Linux with Swift 5.0 #214

f-meloni opened this issue Mar 22, 2019 · 7 comments
Labels
help wanted You can do this, Orta is unlikely to do this for you

Comments

@f-meloni
Copy link
Member

Danger is failing on linux using swift 5.0 with this error:

Stack dump:
0.	Program arguments: /home/travis/.swiftenv/versions/5.0-DEVELOPMENT-SNAPSHOT-2019-03-06-a/usr/bin/swift -frontend -interpret /tmp/_tmp_dangerfile.swift -disable-objc-interop -I .build/debug -module-name _tmp_dangerfile -lDangerDeps -- /tmp/danger-dsl.json /tmp/danger-response.json 
#0 0x0000000004293db4 PrintStackTraceSignalHandler(void*) (/home/travis/.swiftenv/versions/5.0-DEVELOPMENT-SNAPSHOT-2019-03-06-a/usr/bin/swift+0x4293db4)
#1 0x0000000004291f10 llvm::sys::RunSignalHandlers() (/home/travis/.swiftenv/versions/5.0-DEVELOPMENT-SNAPSHOT-2019-03-06-a/usr/bin/swift+0x4291f10)
#2 0x0000000004294118 SignalHandler(int) (/home/travis/.swiftenv/versions/5.0-DEVELOPMENT-SNAPSHOT-2019-03-06-a/usr/bin/swift+0x4294118)
#3 0x00007ff70fe16330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007ff70c0fd074
#5 0x0000000000c98fa6 llvm::MCJIT::runFunction(llvm::Function*, llvm::ArrayRef<llvm::GenericValue>) (/home/travis/.swiftenv/versions/5.0-DEVELOPMENT-SNAPSHOT-2019-03-06-a/usr/bin/swift+0xc98fa6)
#6 
0x0000000000c9cf9f llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::string, std::allocator<std::string> > const&, char const* const*) (/home/travis/.swiftenv/versions/5.0-DEVELOPMENT-SNAPSHOT-2019-03-06-a/usr/bin/swift+0xc9cf9f)
#7 0x000000000050a507 swift::RunImmediately(swift::CompilerInstance&, std::vector<std::string, std::allocator<std::string> > const&, swift::IRGenOptions&, swift::SILOptions const&) (/home/travis/.swiftenv/versions/5.0-DEVELOPMENT-SNAPSHOT-2019-03-06-a/usr/bin/swift+0x50a507)
#8 0x00000000004e1587 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/home/travis/.swiftenv/versions/5.0-DEVELOPMENT-SNAPSHOT-2019-03-06-a/usr/bin/swift+0x4e1587)
#9 0x00000000004dc917 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/home/travis/.swiftenv/versions/5.0-DEVELOPMENT-SNAPSHOT-2019-03-06-a/usr/bin/swift+0x4dc917)
#10 0x000000000048dd93 main (/home/travis/.swiftenv/versions/5.0-DEVELOPMENT-SNAPSHOT-2019-03-06-a/usr/bin/swift+0x48dd93)
#11 0x00007ff70e5e3f45 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f45)
#12 0x000000000048bfe8 _start (/home/travis/.swiftenv/versions/5.0-DEVELOPMENT-SNAPSHOT-2019-03-06-a/usr/bin/swift+0x48bfe8)
@f-meloni
Copy link
Member Author

f-meloni commented Apr 6, 2019

Here an example of failure
https://travis-ci.org/danger/swift/jobs/516623404#L599

@f-meloni
Copy link
Member Author

f-meloni commented Apr 6, 2019

That message is the output of:

swiftc --driver-mode=swift -L .build/debug -I .build/debug -lDangerDeps /tmp/_tmp_dangerfile.swift /tmp/danger-dsl.json /tmp/danger-response.json

@f-meloni f-meloni added the help wanted You can do this, Orta is unlikely to do this for you label Apr 7, 2019
@f-meloni
Copy link
Member Author

Apparently it goes on segfault...
I managed to make it work here https://travis-ci.org/danger/swift/jobs/518176612 but I had to change a lot of things, and it still goes on segfault if I do danger.github on the dangerfile

@bofeizhu
Copy link

bofeizhu commented Jul 30, 2019

Hi @f-meloni, can we release Swift 5.0 support without Linux? This project is much more valuable to Mac/iOS developers than Linux Swift developers right now. Clearly, Swift team has a somewhat poor support for Linux at the moment. This issue seems like a compiler bug and it might not be worth it to have a workaround just for Linux platform. I hope we can get a Swift 5.0 release for macOS first. Linux developers can still use the Swift 4.2 version or submit PR to fix this issue. They can also use the Ruby version. Thank you for all the amazing work!

@f-meloni
Copy link
Member Author

Hey @bofeizhu,
at the moment Danger-Swift is fully compatible with swift 5.0, even if it still uses Swift 4.2, then you can have a project that uses swift 5.0 and use Danger-Swift without any problem (travis runs Danger-Swift with Swift 5.0 on every PR).
This is why I prefer to wait for Apple to this compiler issue, if possible, instead of drop Linux support.
If this doesn't happen and the compiler will drop 4.2, I will then update it even if Linux will still be broken.

@Tapchicoma
Copy link

Is this issue still actual as latest releases switched to swift 5.1?

@f-meloni
Copy link
Member Author

No, this is fixed now, I'm actually going to close this issue, thank you 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted You can do this, Orta is unlikely to do this for you
Projects
None yet
Development

No branches or pull requests

3 participants