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

cxx-qt-gen: generate docs for public generated items #518

Merged
merged 7 commits into from
May 17, 2023

Conversation

ahayzen-kdab
Copy link
Collaborator

Closes #517

Copy link
Collaborator

@LeonMatthesKDAB LeonMatthesKDAB left a comment

Choose a reason for hiding this comment

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

I've noticed that cargo doc on qml_features actually doesn't pick up most of the generated documentation, or even functions at all!

To track this I've crated #529
Ideally we should address this issue with this PR as well.
As otherwise it doesn't make much sense to be able to do #[deny(missing_docs)] if the docs then don't show up in the output at all...

@ahayzen-kdab ahayzen-kdab force-pushed the 517-generated-qobject-add-docs branch 3 times, most recently from a0dc346 to 7b0ebaa Compare May 8, 2023 11:50
@ahayzen-kdab ahayzen-kdab marked this pull request as draft May 8, 2023 11:50
@ahayzen-kdab ahayzen-kdab force-pushed the 517-generated-qobject-add-docs branch from 7b0ebaa to 2fc5664 Compare May 9, 2023 13:25
@ahayzen-kdab ahayzen-kdab force-pushed the 517-generated-qobject-add-docs branch from 2fc5664 to 64a9e56 Compare May 9, 2023 13:42
@ahayzen-kdab
Copy link
Collaborator Author

So generated docs now are sane, not perfect, but better.

@ahayzen-kdab ahayzen-kdab marked this pull request as ready for review May 9, 2023 13:46
@ahayzen-kdab
Copy link
Collaborator Author

If your bridge module isn't pub then it does look slightly odd, but if you are generating docs then you'll likely have that pub anyway. And i've switched all of qml_features and cargo_without_cmake to be pub with full docs tests so that we check a cmake and cargo builds.

@ahayzen-kdab ahayzen-kdab force-pushed the 517-generated-qobject-add-docs branch from 64a9e56 to 0195de5 Compare May 9, 2023 14:00
This ensures we don't regress with any missing docs for
generated public items, related to KDAB#517
@ahayzen-kdab ahayzen-kdab force-pushed the 517-generated-qobject-add-docs branch from 0195de5 to 1e6a998 Compare May 9, 2023 15:06
@ahayzen-kdab
Copy link
Collaborator Author

Sigh macOS and Windows fail to run cargo doc on some of our crates as cxx-qt-build can't find Qt. Even though the CARGO_ENV should be set and passed through.

@ahayzen-kdab
Copy link
Collaborator Author

Sigh macOS and Windows fail to run cargo doc on some of our crates as cxx-qt-build can't find Qt. Even though the CARGO_ENV should be set and passed through.

Magic moving the CARGO_ENV into the same ENVIRONMENT_MODIFICATION as the RUSTDOCFLAGS one fixed the issue, seems the first modification was maybe lost 🤷

CI now passes :-)

Copy link
Contributor

@Be-ing Be-ing left a comment

Choose a reason for hiding this comment

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

lots of nitpicks

crates/cxx-qt-gen/src/generator/rust/qobject.rs Outdated Show resolved Hide resolved
crates/cxx-qt-gen/src/writer/rust/mod.rs Outdated Show resolved Hide resolved
crates/cxx-qt-gen/src/writer/rust/mod.rs Outdated Show resolved Hide resolved
crates/cxx-qt-gen/src/writer/rust/mod.rs Outdated Show resolved Hide resolved
crates/cxx-qt-gen/src/writer/rust/mod.rs Outdated Show resolved Hide resolved
examples/qml_features/rust/src/nested_qobjects.rs Outdated Show resolved Hide resolved
examples/qml_features/rust/src/serialisation.rs Outdated Show resolved Hide resolved
examples/qml_features/rust/src/threading.rs Show resolved Hide resolved
examples/qml_features/rust/src/types.rs Outdated Show resolved Hide resolved
examples/qml_features/rust/src/uncreatable.rs Outdated Show resolved Hide resolved
@ahayzen-kdab ahayzen-kdab force-pushed the 517-generated-qobject-add-docs branch from 3cb1d8d to 42ec8f3 Compare May 17, 2023 14:59
@Be-ing Be-ing merged commit 777b08a into KDAB:main May 17, 2023
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.

Generated qobject module has no documentation, triggering #![warn(missing_docs)]
3 participants