Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

cairo: Add docs for ImageSurface's creation methods #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

federicomenaquintero
Copy link
Contributor

No description provided.

@EPashkin
Copy link
Member

EPashkin commented Aug 9, 2017

Please add --jobs 1 to call cargo build --features "$FEAT gtk/embed-lgpl-docs" in .travis.yml

@EPashkin
Copy link
Member

EPashkin commented Aug 9, 2017

Strange but cargo build --features "embed-lgpl-docs" on cairo don't change image_surface.rs at all.

@GuillaumeGomez
Copy link
Member

@federicomenaquintero: Did you add this by hand or did you use the cargo features? I recommend to regen docs and then strip them again.

@federicomenaquintero
Copy link
Contributor Author

I regenerated this incorrectly; just pushed a fixed version. The bug was that my docs.md listed <!-- file src/image_surface.rs --> because I ran rustdoc-stripper from cairo/. Things expect a plain <!-- file image_surface.rs --> as if you run it from cairo/src/.

Also, lgpl-docs/cairo/docs.md has the docs for cairo-sys-rs/src/*, but cairo-sys-rs's Cargo.toml does not list lgpl-docs as a build dependency, nor has the relevant bits in its build.rs.

This is very fragile and I'd like to fix it, and write some docs on how to regenerate/change the documentation. Could you help me clarify some things?

  • How should lgpl-docs/cairo/docs.md be generated? If I run rustdoc-stripper from cairo/src, then it just gets the info for that directory, but not for cairo-sys-rs.

  • If I go to cairo and run cargo build --features embed-lgpl-docs, then cairo/cairo-sys-rs/src/enums.rs doesn't get modified to have the inline doc comments, for example. How can I change the docs there?

@EPashkin
Copy link
Member

👍 Now it generated.
As I know we don't provide lgpl docs for sys crates.

@federicomenaquintero
Copy link
Contributor Author

As I know we don't provide lgpl docs for sys crates.

There is a <!-- file enums.rs --> at the very top of lgpl-docs/cairo/docs.md - I think it refers to cairo/cairo-sys-rs/src/enums.rs :)

@EPashkin
Copy link
Member

Strange, it was here from 22.02.2016, and only enum.rs at that time was sys's.
It can be regenerated with <fullpath>/rustdoc-stripper.exe -g -o <fullpath>/cairo/docs.md in cairo-sys-rs/src dir, and IMHO at that time was only solution.

By way, please, fix build with #30 (comment)

@EPashkin
Copy link
Member

Don't sure how to collect right docs.md from sources other that collect 2 separate file and connect it.
Maybe @GuillaumeGomez know more?

If you want add docs for cairo/cairo-sys-rs/src/enums.rs seems only way is add features to cairo-sys-rs,
and add it to feature description of cairo like embed-lgpl-docs = ["gtk-rs-lgpl-docs", "cairo-sys-rs/embed-lgpl-docs"]

@GuillaumeGomez
Copy link
Member

They're two different crates so it seems normal that they have two different files, no?

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.

3 participants