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

Comments

Projects
None yet
4 participants
@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.

@brson brson added the help wanted label May 4, 2017

@brson brson referenced this issue May 4, 2017

Closed

Tracking issue for crate evaluation #319

17 of 19 tasks complete
@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented May 5, 2017

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

SimonSapin commented May 5, 2017

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 14, 2017

I took your suggestion @dtolnay, thanks.

tmccombs added 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
You can’t perform that action at this time.