google / swift-jupyter

Apache License 2.0
618 stars 90 forks source link

Making swift-jupyter work for Swift 5.3 mainline #120

Closed liuliu closed 3 years ago

liuliu commented 3 years ago

Per discussion https://github.com/google/swift-jupyter/issues/119 this PR tries to add steps and necessary changes to make swift-jupyter work for Swift 5.3 mainline.

  1. Added explanation how to checkout proper mainline swift toolchains (swift-cmark, swift-corelibs-dispatch, swift, llvm-project) and proper branches to enable LLDB + Python support compilation;

    1. Switched to use target.swift-module-search-paths that is available in both mainline and Swift for Tensorflow 0.11. By doing that, also removed the parent_kernel.py invocation.

I believe the 2nd change is safe, since both the old env var method: https://github.com/apple/llvm-project/blob/swift/tensorflow/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp#L2596 (https://github.com/apple/llvm-project/blob/swift/tensorflow/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp#L2221) and https://github.com/apple/llvm-project/blob/swift/tensorflow/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp#L2238 both end up in the module_search_paths hence no material difference.

After this change, tried to use %install install DeckOfPlayingCards and can still create Deck instance and print.

liuliu commented 3 years ago

@marcrasi