-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Massive JSON blob in Stdout #5505
Comments
this sounds the same as #5482? |
I made a branch on my repo where I undid the workaround. I'm going to show you a way to easily reproduce and bisect this bug. I could technically do it myself, but there's a lot of Swift development snapshots to go back through and that's a lot of work to scan over. Plus, following these instructions should be doable for someone else. Go to my Swift-Colab repository and open the template Swift notebook. Replace all of its cells with just these two: !curl "https://raw.githubusercontent.com/philipturner/swift-colab/spm5482/install_swift.sh" --output "install_swift.sh"
!bash "install_swift.sh" "5.5.2" --swift-colab-dev #// Replace 5.5.2 with newest Swift version.
#// After this command finishes, go to Runtime > Restart runtime. %install '.package(url: "https://github.com/pvieito/PythonKit.git", .branch("master"))' PythonKit Steps:
If you go back far enough, Swift-Colab itself may not compile. I ran the above steps through with Swift 5.4, and Swift-Colab compiled successfully. I also saw the JSON blob there.
|
This was a bug affecting Swift-Colab 2.0 for quite a while, and I just recently found a workaround for it. Make a two-file Swift package with the following directory structure:
In
Package.swift
, put the following:In
installed1.swift
, put the following:Build it once by entering the
installed1
directory and runningswift build
. Then, overwriteinstalled1.swift
with its exact same contents using the command shown below. Runswift build
once more and a massive JSON blob appears in stdout. This happens on both Linux (Google Colab, x86) and macOS (ARM64).Blob:
If you run
swift build
a third time without doing theecho
command, then it won't output the blob during that third build. But it always outputs the blob if you modify a file before running a build command. Note that I do not see this bug when I overwritePackage.swift
with the same contents as it previously had instead ofinstalled1.swift
.The text was updated successfully, but these errors were encountered: