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

doc: add missing docs & fix some errors in doc testing 📝 #124

Merged
merged 9 commits into from
Aug 13, 2024
Merged

doc: add missing docs & fix some errors in doc testing 📝 #124

merged 9 commits into from
Aug 13, 2024

Conversation

kareemmahlees
Copy link
Contributor

@kareemmahlees kareemmahlees commented Aug 7, 2024

closes #122

Changes

  • Clarify how to register custom types.
  • Clarify how to register constants
  • Trying to pass doc tests
  • Add examples for Builder methods.

@kareemmahlees kareemmahlees marked this pull request as ready for review August 8, 2024 22:25
@kareemmahlees
Copy link
Contributor Author

This should wrap up the difficulties I encountered while migrating.
But, literally all doc tests fail with errors similar to the following:

---- src\builder.rs - builder::Builder<R>::events (line 151) stdout ----
Test executable failed (exit code: 0xc0000139).

---- src\builder.rs - builder::Builder<R>::commands (line 126) stdout ----
Test executable failed (exit code: 0xc0000139).

---- src\builder.rs - builder::Builder<R>::constant (line 212) stdout ----
Test executable failed (exit code: 0xc0000139).

---- src\builder.rs - builder::Builder<R>::export_str (line 279) stdout ----
Test executable failed (exit code: 0xc0000139).

---- src\builder.rs - builder::Builder<R>::ty (line 188) stdout ----
Test executable failed (exit code: 0xc0000139).

I cannot detect a reason, can you confirm that this is also the case on your end and it's not my crazy Rust setup doing its thing again? @oscartbeaumont

Copy link
Member

@oscartbeaumont oscartbeaumont left a comment

Choose a reason for hiding this comment

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

Really love these changes!

I have made some changes and left some comments around them (nothing you need to fix). I would love some feedback on my changes before merging!

I also did some messing around and managed to get the doc test to build with tauri::generate_context by copying exactly what Tauri do in their examples.

and turns out generic event's was never implemented but shown in the docs so also fixed that so the doc compiled.

src/builder.rs Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@oscartbeaumont oscartbeaumont merged commit fe2e052 into specta-rs:main Aug 13, 2024
0 of 4 checks passed
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.

Add missing documentation
2 participants