# How do you print output from Package.swift execution?

**URL:** <https://forums.swift.org/t/how-do-you-print-output-from-package-swift-execution/34360>\
**Category:** Using Swift\
**Created:** [March 6, 2020, 6:42pm UTC](https://forums.swift.org/t/how-do-you-print-output-from-package-swift-execution/34360 "2020-03-06T18:42:50Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![SDGGiesbrecht](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/sdggiesbrecht/32/4768_2.png) [@SDGGiesbrecht](https://forums.swift.org/u/SDGGiesbrecht)\
**Post date:** [March 7, 2020, 12:35am UTC](https://forums.swift.org/t/how-do-you-print-output-from-package-swift-execution/34360/5 "2020-03-07T00:35:55Z")

</div>

I think you’ll have to wait for [extensible build tools](https://forums.swift.org/t/package-manager-extensible-build-tools/10900). Unless you can precompile them and rig it to work using the [binary dependencies](https://github.com/apple/swift-evolution/blob/master/proposals/0272-swiftpm-binary-dependencies.md) feature, which will become available sooner. Until then you’ll have to provide them separately and tell clients which extra flags to add to their command line invocation (`-Xlinker`, etc.).

With respect to your original idea, even if you made it check whether it had already started, so as to prevent multiple runs, you would still be facing lots of other hurdles. SwiftPM sandboxes the manifest on some platforms. It checks out the manifest in isolation without the rest of the source until it knows which commit it actually needs. It caches the loaded manifest. A dirty Git state interferes with a lot of Git operations and could cause SwiftPM to either wipe the whole thing and start over or else just crash. Git‐ignored files could be left behind when switching versions, resulting in mismatched generated files. And the list goes on...

---

_[View the full topic](https://forums.swift.org/t/how-do-you-print-output-from-package-swift-execution/34360)._
