{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift-package-manager/issues/393","repository_url":"https://api.github.com/repos/apple/swift-package-manager","labels_url":"https://api.github.com/repos/apple/swift-package-manager/issues/393/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift-package-manager/issues/393/comments","events_url":"https://api.github.com/repos/apple/swift-package-manager/issues/393/events","html_url":"https://github.com/apple/swift-package-manager/pull/393","id":158501624,"number":393,"title":"[WIP][Build] Add repl mode to launch LLDB REPL","user":{"login":"bhargavg","id":5916302,"avatar_url":"https://avatars.githubusercontent.com/u/5916302?v=3","gravatar_id":"","url":"https://api.github.com/users/bhargavg","html_url":"https://github.com/bhargavg","followers_url":"https://api.github.com/users/bhargavg/followers","following_url":"https://api.github.com/users/bhargavg/following{/other_user}","gists_url":"https://api.github.com/users/bhargavg/gists{/gist_id}","starred_url":"https://api.github.com/users/bhargavg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhargavg/subscriptions","organizations_url":"https://api.github.com/users/bhargavg/orgs","repos_url":"https://api.github.com/users/bhargavg/repos","events_url":"https://api.github.com/users/bhargavg/events{/privacy}","received_events_url":"https://api.github.com/users/bhargavg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-04T11:57:20Z","updated_at":"2016-06-07T12:32:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift-package-manager/pulls/393","html_url":"https://github.com/apple/swift-package-manager/pull/393","diff_url":"https://github.com/apple/swift-package-manager/pull/393.diff","patch_url":"https://github.com/apple/swift-package-manager/pull/393.patch"},"body":"This patch adds `repl` sub command to `swift build` that can launch REPL with all the modules linked.\r\n\r\nDependencies:\r\n\r\n- [ ] Merging of #388 "},"comment":{"url":"https://api.github.com/repos/apple/swift-package-manager/issues/comments/224266031","html_url":"https://github.com/apple/swift-package-manager/pull/393#issuecomment-224266031","issue_url":"https://api.github.com/repos/apple/swift-package-manager/issues/393","id":224266031,"user":{"login":"bhargavg","id":5916302,"avatar_url":"https://avatars.githubusercontent.com/u/5916302?v=3","gravatar_id":"","url":"https://api.github.com/users/bhargavg","html_url":"https://github.com/bhargavg","followers_url":"https://api.github.com/users/bhargavg/followers","following_url":"https://api.github.com/users/bhargavg/following{/other_user}","gists_url":"https://api.github.com/users/bhargavg/gists{/gist_id}","starred_url":"https://api.github.com/users/bhargavg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhargavg/subscriptions","organizations_url":"https://api.github.com/users/bhargavg/orgs","repos_url":"https://api.github.com/users/bhargavg/repos","events_url":"https://api.github.com/users/bhargavg/events{/privacy}","received_events_url":"https://api.github.com/users/bhargavg/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T12:32:26Z","updated_at":"2016-06-07T12:32:26Z","body":"@ddunbar I've fixed the issue that caused repl to fail when invoked on SwiftPM. Now I'm facing another problem.\r\n\r\n```bash\r\n$ swift -L .build/debug/ -I .build/debug -llibc -lPOSIX -lUtility -lBasic -lSourceControl\r\nWelcome to Apple Swift version 3.0-dev (LLVM 8fcf602916, Clang cf0a734990, Swift 000d413a62). Type :help for assistance.\r\n  1> import SourceControl\r\nwarning: (x86_64) /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/liblibc.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.\r\nobjc[26502]: Class _TtC5Basic16OutputByteStream is implemented in both /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libBasic.dylib and /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libSourceControl.dylib. One of the two will be used. Which one is undefined.\r\nobjc[26502]: Class _TtC5Basic13TOMLItemArray is implemented in both /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libBasic.dylib and /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libSourceControl.dylib. One of the two will be used. Which one is undefined.\r\nobjc[26502]: Class _TtC5Basic13TOMLItemTable is implemented in both /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libBasic.dylib and /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libSourceControl.dylib. One of the two will be used. Which one is undefined.\r\nobjc[26502]: Class _TtC7Utility3Git is implemented in both /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libUtility.dylib and /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libSourceControl.dylib. One of the two will be used. Which one is undefined.\r\nobjc[26502]: Class _TtC7Utility25StandardErrorOutputStream is implemented in both /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libUtility.dylib and /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libSourceControl.dylib. One of the two will be used. Which one is undefined.\r\nobjc[26502]: Class _TtC7UtilityP33_85EDAD19EFE38364111E13D20EB47E9526DirectoryContentsGenerator is implemented in both /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libUtility.dylib and /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libSourceControl.dylib. One of the two will be used. Which one is undefined.\r\nobjc[26502]: Class _TtC7Utility36RecursibleDirectoryContentsGenerator is implemented in both /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libUtility.dylib and /Users/bhargavg/Documents/workspaces/xcode/github/apple/swiftpm/.build/debug/libSourceControl.dylib. One of the two will be used. Which one is undefined.\r\n  2>\r\n```\r\n\r\nThis is happening because `libUtility.dylib` is being statically linked when `libSourceControl.dylib` is built causing duplicate symbols:\r\n```bash\r\n$ nm -gU .build/debug/libSourceControl.dylib | grep \"Utility.Git$\"\r\n000000000009dd70 D __TMC7Utility3Git\r\n000000000009e858 S __TMLC7Utility3Git\r\n0000000000044740 T __TMaC7Utility3Git\r\n000000000009dd38 D __TMmC7Utility3Git\r\n0000000000092cc0 S __TMnC7Utility3Git\r\n$ nm -gU .build/debug/libUtility.dylib | grep \"Utility.Git$\"\r\n000000000005a6f0 D __TMC7Utility3Git\r\n000000000005af98 S __TMLC7Utility3Git\r\n00000000000088c0 T __TMaC7Utility3Git\r\n000000000005a6b8 D __TMmC7Utility3Git\r\n00000000000551b0 S __TMnC7Utility3Git\r\n```\r\n\r\nHow can we avoid this?\r\n\r\nI thought about making a single product with all the `.dylib` targets, but this will fail incase of statically linked executables."}}
{"actor":{"display_login":"bhargavg"}}