Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

fixes cargo build command on osx - #28

Open
zolkko wants to merge 2 commits into
servo:servofrom
zolkko:servo
Open

zolkko wants to merge 2 commits into
servo:servofrom
zolkko:servo

Conversation

@zolkko

@zolkko zolkko commented Aug 10, 2014

Copy link
Copy Markdown

These changes allows to use servo/rust-http repository as a dependency in Cargo.toml

Here is a sample program:

extern crate url;
extern crate http;

fn mian() -> () {
    let url: url::Url = Url::parse("http://example.com/example?test").unwrap();
    let request: http::client::RequestWriter = http::client::RequestWriter::new(Get, url).unwrap();
    println!("test = {}", request.url);
}

and Cargo.toml which I use:

...
[[bin]]
name = "blumenplace-border"
path = "src/main.rs"
[dependencies.url]
git = "https://github.com/servo/rust-url.git"
[dependencies.http]
git = "https://github.com/zolkko/rust-http.git"

Beside this, it seems like, Cargo requires that a repository contained a branch named "master". Otherwise there will be following error:

cargo build --verbose
    Updating git repository `https://github.com/servo/rust-http.git`
Unable to update https://github.com/servo/rust-http.git

Caused by:
 10 #[phase(plugin, link)] extern crate log;
  Executing `git rev-parse master` failed

Caused by:
  Could not execute process `git rev-parse master` (status=128)
--- stdout
master

--- stderr
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Review on Reviewable

@zolkko

zolkko commented Aug 10, 2014

Copy link
Copy Markdown
Author

I mean, for sure, It would make more sense to fix this in Makefile. Just wanted to point out that there is a issue.

@SimonSapin

Copy link
Copy Markdown
Member

Have you tried using the upstream rust-http repository? https://github.com/chris-morgan/rust-http This one is meant for use in Servo and therefore may have some build system quirks and be behind in terms of Rust language upgrades.

@zolkko

zolkko commented Aug 11, 2014

Copy link
Copy Markdown
Author

I started using servo's repo because of deprecated url module. But at the moment chris-morgan/rust-http uses rust-url as well. So I changed dependency declaration back to chris-morgan/rust-http repository. And it works like a charm. Thank you very much for your answer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants