Skip to content

Commit

Permalink
fix doc references and test docs in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Qix- authored and gitbutler-client committed Jan 25, 2024
1 parent e5a78cb commit ee4ad9c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,21 @@ jobs:
- run: cargo fmt --check --all
- run: cargo build --locked --all-targets --tests

rust-docs:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
runs-on: ubuntu-latest
container:
image: ghcr.io/gitbutlerapp/ci-base-image:latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/init-env-rust
# TODO(qix-): we have to exclude the app here for now because for some
# TODO(qix-): reason it doesn't build with the docs feature enabled.
- run: cargo doc --no-deps --all-features --document-private-items -p gitbutler-core -p gitbutler-git -p gitbutler-diff
env:
RUSTDOCFLAGS: -Dwarnings

check-gitbutler-app:
needs: [changes, rust-init]
if: ${{ needs.changes.outputs.gitbutler-app == 'true' }}
Expand Down
6 changes: 3 additions & 3 deletions gitbutler-diff/src/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
//!
//! Related issues:
//!
//! - https://github.com/serde-rs/serde/issues/2120
//! - https://github.com/serde-rs/serde/issues/1937
//! - https://github.com/serde-rs/serde/issues/1272
//! - <https://github.com/serde-rs/serde/issues/2120>
//! - <https://github.com/serde-rs/serde/issues/1937>
//! - <https://github.com/serde-rs/serde/issues/1272>
//!
//! If/when those are fixed, we should be able to (trivially) add `serde` support.
//! Otherwise, neither the length prefix imposed by `(de)serialize_bytes()` nor the
Expand Down
7 changes: 6 additions & 1 deletion gitbutler-git/src/backend/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
mod executor;
mod repository;

pub use self::{executor::GitExecutor, repository::Repository};
#[cfg(unix)]
pub use self::executor::Uid;
pub use self::{
executor::{AskpassServer, FileStat, GitExecutor, Pid, Socket},
repository::Repository,
};

#[cfg(feature = "tokio")]
pub use self::executor::tokio;
Expand Down
6 changes: 3 additions & 3 deletions gitbutler-git/src/backend/cli/executor/tokio.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! A [Tokio](https://tokio.rs)-based [`GitExecutor`] implementation.
//! A [Tokio](https://tokio.rs)-based [`super::GitExecutor`] implementation.

use crate::prelude::*;
use core::time::Duration;
Expand All @@ -7,7 +7,7 @@ use std::os::unix::fs::MetadataExt;
use std::{fs::Permissions, os::unix::fs::PermissionsExt};
use tokio::process::Command;

/// A [`GitExecutor`] implementation using the `git` command-line tool
/// A [`super::GitExecutor`] implementation using the `git` command-line tool
/// via [`tokio::process::Command`].
pub struct TokioExecutor;

Expand Down Expand Up @@ -95,7 +95,7 @@ impl super::Socket for tokio::io::BufStream<tokio::net::UnixStream> {
}
}

/// A tokio-based [`AskpassServer`] implementation.
/// A tokio-based [`super::AskpassServer`] implementation.
#[cfg(unix)]
pub struct TokioAskpassServer {
// Always Some until dropped.
Expand Down
1 change: 0 additions & 1 deletion gitbutler-git/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
//!
//! This hampers certain use cases, such as implementing
//! [`cli::GitExecutor`] for e.g. remote connections.

#![cfg_attr(not(feature = "std"), no_std)] // must be first
#![feature(error_in_core)]
#![deny(missing_docs, unsafe_code)]
Expand Down
1 change: 0 additions & 1 deletion gitbutler-git/src/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ pub enum Authorization {
password: String,
},
/// Specifies a set of credentials for logging in with SSH.
/// If
Ssh {
/// The path to the SSH private key to use for authentication.
/// If `None`, the default SSH key will be used (i.e. `-i` will not
Expand Down

0 comments on commit ee4ad9c

Please sign in to comment.