Code Monkey home page Code Monkey logo

Comments (11)

gwynne avatar gwynne commented on June 18, 2024

That looks like a transient issue at the SwiftPM level; a build hang like that isn't something the toolbox's own code can cause, especially not while it's still compiling NIO. Does this reproduce reliably?

from toolbox.

nashysolutions avatar nashysolutions commented on June 18, 2024

That looks like a transient issue at the SwiftPM level; a build hang like that isn't something the toolbox's own code can cause, especially not while it's still compiling NIO. Does this reproduce reliably?

Yes. Falling back to 18.7.2 produces a similar result

swift build -c release --disable-sandbox
Updating https://github.com/apple/swift-nio.git
Updated https://github.com/apple/swift-nio.git (0.88s)
Updating https://github.com/apple/swift-atomics.git
Updated https://github.com/apple/swift-atomics.git (0.44s)
Updating https://github.com/apple/swift-collections.git
Updated https://github.com/apple/swift-collections.git (0.49s)
Updating https://github.com/apple/swift-log.git
Updated https://github.com/apple/swift-log.git (0.50s)
Updating https://github.com/tanner0101/mustache.git
Updated https://github.com/tanner0101/mustache.git (0.41s)
Updating https://github.com/jpsim/Yams.git
Updated https://github.com/jpsim/Yams.git (0.47s)
Updating https://github.com/vapor/console-kit.git
Computing version for https://github.com/vapor/console-kit.git
Updated https://github.com/vapor/console-kit.git (0.42s)
Computed https://github.com/vapor/console-kit.git at 4.8.1 (0.50s)
Computing version for https://github.com/tanner0101/mustache.git
Computed https://github.com/tanner0101/mustache.git at 0.1.1 (0.63s)
Computing version for https://github.com/jpsim/Yams.git
Computed https://github.com/jpsim/Yams.git at 5.0.6 (0.45s)
Computing version for https://github.com/apple/swift-nio.git
Computed https://github.com/apple/swift-nio.git at 2.59.0 (0.51s)
Computing version for https://github.com/apple/swift-log.git
Computed https://github.com/apple/swift-log.git at 1.5.3 (0.38s)
Computing version for https://github.com/apple/swift-collections.git
Computed https://github.com/apple/swift-collections.git at 1.0.5 (0.41s)
Computing version for https://github.com/apple/swift-atomics.git
Computed https://github.com/apple/swift-atomics.git at 1.2.0 (0.36s)
Working copy of https://github.com/vapor/console-kit.git resolved at 4.8.1
Building for production...
[1/3] Compiling CMustache mustach.c //hangs here

from toolbox.

nashysolutions avatar nashysolutions commented on June 18, 2024

Doesn't seem to be a resource issue.

Screenshot 2023-12-31 at 16 29 31

from toolbox.

gwynne avatar gwynne commented on June 18, 2024

Can you try running swift package update before swift build?

from toolbox.

nashysolutions avatar nashysolutions commented on June 18, 2024

Can you try running swift package update before swift build?

Tried this and now it reproducibly hangs here instead.

Building for production...
[17/19] Compiling NIOConcurrencyHelpers NIOAtomic.swift // hangs here

from toolbox.

gwynne avatar gwynne commented on June 18, 2024

I can't reproduce this hang in Docker, though the build does take a noticeable amount of time. Most likely this is the same old memory issue in the linker; how much RAM is allocated to your droplet?

from toolbox.

nashysolutions avatar nashysolutions commented on June 18, 2024

Falling back to 18.6.0 produces same result.

Swift version 5.9.2 (swift-5.9.2-RELEASE)
Target: x86_64-unknown-linux-gnu

Will fall back to swift version 5.9.1 which is what you guys use in your DigitalOcean walkthrough docs.

from toolbox.

nashysolutions avatar nashysolutions commented on June 18, 2024

I can't reproduce this hang in Docker, though the build does take a noticeable amount of time. Most likely this is the same old memory issue in the linker; how much RAM is allocated to your droplet?

512MB

from toolbox.

nashysolutions avatar nashysolutions commented on June 18, 2024

Still same issue with Swift 5.9.1.

[29/31] Compiling CMustache mustach.c // hangs here
or
[17/19] Compiling NIOConcurrencyHelpers NIOAtomic.swift // hangs here

How much RAM do you recommend?

from toolbox.

gwynne avatar gwynne commented on June 18, 2024

Ah yeah, that's known to not be enough even with the linker improvements in 5.9, unfortunately 😕. If you bump to 1GB, that should resolve your issue.

from toolbox.

nashysolutions avatar nashysolutions commented on June 18, 2024

Resolved. Thank you @gwynne
I probably should have mentioned more details about the stack. Apologies for that.

from toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.