Giter Club home page Giter Club logo

Comments (7)

tanner0101 avatar tanner0101 commented on May 13, 2024

I think it's necessary that we move to compiling it and separating out the source files. But this will take time to figure out how to do correctly so I think it makes sense as the next (0.6) release.

Maybe we could do something like the Swiftenv Travis CI gist where a script from a URL is read and evaluated to install. That way we can keep the one line install.

We could also consider adding it to Homebrew again, but I think that process is pretty annoying and still leaves us needing a method for Linux.

Before we approve this, I'd like to get @loganwright's opinion.

from toolbox.

finestructure avatar finestructure commented on May 13, 2024

It looks like it should be easy to save build artefacts to S3. If we name them like so

$ echo vapor-$(git describe --always --tags --dirty)-$(uname)
vapor-0.4.0-Darwin
$ vapor docker enter
Starting bash in image qutheory/swift:DEVELOPMENT-SNAPSHOT-2016-05-09-a
root@eec02375ea8d:/vapor# echo vapor-$(git describe --always --tags --dirty)-$(uname)
vapor-0.4.0-Linux

we could get two versioned variants up to S3 and it’s then just a matter to resolve to those from the install URL, per platform.

If we don’t want to clutter up S3, this could be set up to only happen for builds from a, say, release branch. (For the tag name to appear as the version instead of a sha1 we’d need to make sure to push with a tag.)

from toolbox.

tanner0101 avatar tanner0101 commented on May 13, 2024

We'd also need to detect the architecture of the machine, correct? Additionally, if they have Swift installed in different locations on the receiving computer, it will probably not be able to find the shared object files.

We could try this, but it would probably be more robust to have a script that compiles and installs the cli.

from toolbox.

finestructure avatar finestructure commented on May 13, 2024

I was hoping we could link with -static-stdlib but that doesn’t appear to be fully supported on Linux :/

We’re in a bit of pickle here.

Another thought: Self-compiling via vapor-cli seems to work ok, maybe the solution is to simply have a small swift bootstrap script that downloads and builds the SPM package. If we use swift to run this script we’ll ensure that swift is there and working, which should make the rest much easier.

Essentially, it could be

  1. curl a bootstrap.swift
  2. run it
  3. this curls the full vapor-cli SPM
  4. run swift build on it
  5. install the result in a user defined location (e.g. a parameter from step 2)
  6. clean up

from toolbox.

tanner0101 avatar tanner0101 commented on May 13, 2024

Yeah a bootstrap is exactly what I was thinking. It could even be a shell script. That way we can give nicer warnings if Swift 3 isn't installed, instead of just a bunch of confusing compilation errors.

from toolbox.

finestructure avatar finestructure commented on May 13, 2024

I’ve added a script that should do this for both platforms to the spm branch: https://github.com/qutheory/vapor-cli/blob/spm/bootstrap.swift

from toolbox.

finestructure avatar finestructure commented on May 13, 2024

Could wrap this in a shell script to test swift availability but I’m not sure that’s worth it. You’ll end up being asked for a bash, csh, and fish version ;)

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.