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

refactor(hyper): Split hyper into multiple crates #372

Closed
wants to merge 1 commit into from
Closed

refactor(hyper): Split hyper into multiple crates #372

wants to merge 1 commit into from

Conversation

pyfisch
Copy link
Contributor

@pyfisch pyfisch commented Mar 14, 2015

Move various parts of hyper into separate crates:

  • hypernet
  • hyperprotocol

There should be no breaking changes for hyper users.

url = "*"

[dependencies.hypernet]
path = "hypernet"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fairly confident this will prevent uploading to crates.io. We will have to upload and depend on hypernet and hyperprotocol as normal dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is probably true.

If we split hyper consequently there will be no "hyper" crate only "hyperclient" and "hyperserver". I have no idea what the current crate will be useful for.

@pyfisch
Copy link
Contributor Author

pyfisch commented Mar 15, 2015

I will move server and client later out of main hyper crate. They both depend on src/http.rs and src/uri.rs. I do not know where this code should be placed. I think it would be the best thing if we could get rid of RequestUri and use always rust-url absolute URLs.

This depends on rust-lang/rust#23110 being fixed. Or is there a workaround for now?

@pyfisch pyfisch changed the title refactor(hyper): Split hyper into multiple crates [WIP] refactor(hyper): Split hyper into multiple crates Mar 15, 2015
@reem
Copy link
Contributor

reem commented Mar 19, 2015

@pyfisch I actually think it would be better if we just built our own custom url type that's specialized for HTTP use cases. The absolute rust-url Url type is significantly less useful in many cases then a relative URL with a virtual root.

@pyfisch
Copy link
Contributor Author

pyfisch commented Mar 19, 2015

Rust broke hyper again. The whole downcast stuff is broken.

@reem Yes we should use relative URLs.

@pyfisch
Copy link
Contributor Author

pyfisch commented Mar 21, 2015

Everything works now.

Path dependencies are rewritten to normal dependencies in cargo: http://users.rust-lang.org/t/multi-crate-cargo-repositories-best-practices/692/2?u=pyfisch So it stays simple to both distribute and develop hyper.

@seanmonstar
Copy link
Member

What do you mean they are rewritten as normal dependencies?

@reem
Copy link
Contributor

reem commented Mar 25, 2015

@seanmonstar a crates.io build will use version and a local build will use path.

Move various parts of hyper into separate crates:
* hypernet
* hyperprotocol

Adds script.sh as a convinient way to test all crates.

There should be no breaking changes for hyper users.
@reem
Copy link
Contributor

reem commented Apr 3, 2015

Closing because stale, feel free to try again.

@reem reem closed this Apr 3, 2015
@pyfisch pyfisch deleted the subcrates branch May 16, 2015 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants