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

Better documentation for quirks module #311

Closed
brson opened this issue May 4, 2017 · 5 comments
Closed

Better documentation for quirks module #311

brson opened this issue May 4, 2017 · 5 comments

Comments

@brson
Copy link
Contributor

brson commented May 4, 2017

The description is "Getters and setters for URL components implemented per https://url.spec.whatwg.org/#api", which seems like a reasonable thing, and then the next sentence is a strong warning not to use this module. A clearer lay-description of what this module is would be helpful.

@SimonSapin
Copy link
Member

This module belong in Servo. It is only in the url crate because it uses internal things that don’t necessarily make sense to stabilize in the public API.

@untitaker
Copy link
Contributor

untitaker commented May 5, 2017

You could define a "unstable" feature for rust-url that reexports those private APIs.

EDIT: Or hide the quirks module behind a feature flag so people usually don't encounter it.

@SimonSapin
Copy link
Member

There is a fairly strong convention that "unstable" means "uses unstable features of the Rust language or standard library, requires a Nightly compiler".

And making this module not compiled by default is technically a breaking change.

@dtolnay
Copy link
Contributor

dtolnay commented May 12, 2017

If this module does not belong in the url crate, how about:

// This module is for Servo. Do not use this module outside of Servo.
#[doc(hidden)]
pub mod quirks;

Or possibly, if Servo developers need to be able to see the docs:

// This module is for Servo. Do not use this module outside of Servo.
#[cfg_attr(not(feature = "quirks"), doc(hidden))]
pub mod quirks;

@SimonSapin
Copy link
Member

I took your suggestion @dtolnay, thanks.

tmccombs pushed a commit to tmccombs/rust-url that referenced this issue Jul 5, 2017
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

No branches or pull requests

4 participants