Comments (7)
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.
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.
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.
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
- curl a bootstrap.swift
- run it
- this curls the full vapor-cli SPM
- run
swift build
on it - install the result in a user defined location (e.g. a parameter from step 2)
- clean up
from toolbox.
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.
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.
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)
- Build script uses deprecated APIs HOT 1
- Build/install of toolbox 18.5.1 fails on Ubuntu 20.04 HOT 4
- Entity Generation HOT 3
- macOS packaging should offer alternatives to HomeBrew HOT 4
- Compiling issue on Centos7 HOT 4
- vapor --version couldn't work correctly HOT 7
- `which` fails on macOS
- Running Docker Image Fails on `git clone` HOT 5
- `vapor run migrate` on macOS 13.0.1 fails HOT 2
- Clone
- `new` fails when `--output` is an existing directory HOT 2
- Support installation as Nix package HOT 3
- Digital ocean issue: Doesn't start app HOT 1
- Logs. HOT 2
- 'vapor new ProjectName --template github/url' does not set 'name:' in Package.swift HOT 3
- [18.7.4] Code does not compile using make. HOT 2
- Issue building the toolbox on Arch HOT 1
- Compilation fails on Ubuntu 22.04 HOT 11
- Allow cloning local templates HOT 2
- Failed to install with make install HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toolbox.