Skip to content

Commit

Permalink
chore: fix broken docs
Browse files Browse the repository at this point in the history
- fix some outdated references to ConfiguredPlugin
- correctly feature flag ArrayRefIntoField
- use RUSTDOCFLAGS instead of RUSTFLAGS in docs CI
  • Loading branch information
sd2k committed Sep 19, 2024
1 parent 02aa423 commit 596dce8
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rustdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTFLAGS: "-D warnings -W unreachable-pub"
RUSTDOCFLAGS: "-D warnings -W unreachable-pub --cfg docsrs"
RUSTUP_MAX_RETRIES: 10

jobs:
Expand All @@ -27,7 +27,7 @@ jobs:
components: rustfmt, rust-src

- name: Build Documentation
run: RUSTDOCFLAGS="--cfg docsrs" cargo doc --no-deps --features reqwest
run: cargo doc --no-deps --features reqwest

- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3.7.3
Expand Down
2 changes: 1 addition & 1 deletion crates/grafana-plugin-sdk/src/backend/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ where
/// `Self::Query` here.
///
/// The type parameter `T` is the type of the plugin implementation itself,
/// which must implement [`ConfiguredPlugin`].
/// which must implement [`GrafanaPlugin`].
pub type QueryDataRequest<Q, T> = InnerQueryDataRequest<
Q,
<<T as GrafanaPlugin>::PluginType as PluginType<
Expand Down
4 changes: 2 additions & 2 deletions crates/grafana-plugin-sdk/src/backend/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ where
/// the various generics involved.
///
/// The type parameter `T` is the type of the plugin implementation itself,
/// which must implement `ConfiguredPlugin`.
/// which must implement `GrafanaPlugin`.
pub type CheckHealthRequest<T> = InnerCheckHealthRequest<
<<T as GrafanaPlugin>::PluginType as PluginType<
<T as GrafanaPlugin>::JsonData,
Expand Down Expand Up @@ -212,7 +212,7 @@ where
/// the various generics involved.
///
/// The type parameter `T` is the type of the plugin implementation itself,
/// which must implement `ConfiguredPlugin`.
/// which must implement `GrafanaPlugin`.
pub type CollectMetricsRequest<T> = InnerCollectMetricsRequest<
<<T as GrafanaPlugin>::PluginType as PluginType<
<T as GrafanaPlugin>::JsonData,
Expand Down
2 changes: 1 addition & 1 deletion crates/grafana-plugin-sdk/src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ where
/// Marker trait for plugins, used to indicate the type of instance settings they will receive.
///
/// Plugin implementations must mark themselves as being a certain type in their
/// [`ConfiguredPlugin`] implementation (often done using the `GrafanaPlugin` proc-macro).
/// [`GrafanaPlugin`] implementation (often done using the `GrafanaPlugin` proc-macro).
pub trait PluginType<JsonData, SecureJsonData>: sealed::Sealed
where
JsonData: Debug + DeserializeOwned,
Expand Down
2 changes: 1 addition & 1 deletion crates/grafana-plugin-sdk/src/backend/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl TryFrom<Response<Bytes>> for pluginv2::CallResourceResponse {
/// the various generics involved.
///
/// The type parameter `T` is the type of the plugin implementation itself,
/// which must implement [`ConfiguredPlugin`].
/// which must implement [`GrafanaPlugin`].
pub type CallResourceRequest<T> = InnerCallResourceRequest<
<<T as GrafanaPlugin>::PluginType as PluginType<
<T as GrafanaPlugin>::JsonData,
Expand Down
6 changes: 3 additions & 3 deletions crates/grafana-plugin-sdk/src/backend/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ where
/// the various generics involved.
///
/// The type parameter `T` is the type of the plugin implementation itself,
/// which must implement [`ConfiguredPlugin`].
/// which must implement [`GrafanaPlugin`].
pub type SubscribeStreamRequest<T> = InnerSubscribeStreamRequest<
<<T as GrafanaPlugin>::PluginType as PluginType<
<T as GrafanaPlugin>::JsonData,
Expand Down Expand Up @@ -254,7 +254,7 @@ where
/// the various generics involved.
///
/// The type parameter `T` is the type of the plugin implementation itself,
/// which must implement [`ConfiguredPlugin`].
/// which must implement [`GrafanaPlugin`].
pub type RunStreamRequest<T> = InnerRunStreamRequest<
<<T as GrafanaPlugin>::PluginType as PluginType<
<T as GrafanaPlugin>::JsonData,
Expand Down Expand Up @@ -363,7 +363,7 @@ where
/// the various generics involved.
///
/// The type parameter `T` is the type of the plugin implementation itself,
/// which must implement [`ConfiguredPlugin`].
/// which must implement [`GrafanaPlugin`].
pub type PublishStreamRequest<T> = InnerPublishStreamRequest<
<<T as GrafanaPlugin>::PluginType as PluginType<
<T as GrafanaPlugin>::JsonData,
Expand Down
1 change: 1 addition & 0 deletions crates/grafana-plugin-sdk/src/data/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ where
}

/// Helper trait for creating a [`Field`] from an [`Array`][arrow_array::Array].
#[cfg(feature = "arrow")]
pub trait ArrayRefIntoField {
/// Create a `Field` using `self` as the values.
///
Expand Down

0 comments on commit 596dce8

Please sign in to comment.