Skip to content
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

self commands, including compile #10

Merged
merged 16 commits into from May 27, 2016
Merged

self commands, including compile #10

merged 16 commits into from May 27, 2016

Conversation

finestructure
Copy link
Sponsor Member

I noticed that the vapor-cli command was getting quite slow when working on the docker command so I added a bootstrap command that will compile and install a binary vapor at the given path (or $CWD).

This should probably also be called automatically by self-update.

do {
try run(cmd)
} catch {
fail("Could not compile \(src), try running the folloing command in order to debug this issue:\n\(cmd)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in following

@tanner0101
Copy link
Member

This is a cool idea, I'm interested to see if it works on Linux as well.

@finestructure
Copy link
Sponsor Member Author

I’ll see if this can work on Linux as well. Don’t see why not, it’s just the xrun bit that needs translating.

finestructure and others added 9 commits May 26, 2016 19:20
… doesn't have a ".swift" extension:

```
ld: warning: ignoring file ./vapor-cli/vapor, file was built for unsupported file format ( 0x23 0x21 0x2F 0x75 0x73 0x72 0x2F 0x62 0x69 0x6E 0x2F 0x65 0x6E 0x76 0x20 0x73 ) which is not the architecture being linked (x86_64): ./vapor-cli/vapor
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
```
Therefore we'll need to rename the script to `vapor.swift`.
@finestructure
Copy link
Sponsor Member Author

Halleluja

@finestructure
Copy link
Sponsor Member Author

self-compile may be a better name for this command, what do people think?

@tanner0101 tanner0101 added the enhancement New feature or request label May 27, 2016
@tanner0101
Copy link
Member

Yeah, let's do self-compile. I'll test it out and make that change now.

@finestructure
Copy link
Sponsor Member Author

I had a thought how we could solve the install step. What if on every launch the script checks (via file) if it's already compiled and if it isn't it self-compiles and replaces itself. It's a bit automagic but at least you wouldn't have to change the installation instructions. Should also work with self-update, which then just pulls in a fresh uncompiled version and could actually also run a compile step then.

@tanner0101 tanner0101 changed the title Added bootstrap command to compile vapor.swift into binary self commands, including compile May 27, 2016
@tanner0101 tanner0101 merged commit 5316bb1 into master May 27, 2016
@tanner0101 tanner0101 deleted the compiled branch May 27, 2016 15:45
tanner0101 pushed a commit that referenced this pull request Jul 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants