diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f3d2a77d19..70c43992ad 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -89,3 +89,7 @@ jobs: - name: Run Clippy run: cargo clippy --workspace --tests --target ${{ matrix.target }} + + - name: Check managed feature compiles + if: matrix.target == 'x86_64-unknown-linux-musl' + run: cargo check --features managed --target ${{ matrix.target }} diff --git a/src/api/data_types/chunking/build.rs b/src/api/data_types/chunking/build.rs index b46e23bb01..72d4970fba 100644 --- a/src/api/data_types/chunking/build.rs +++ b/src/api/data_types/chunking/build.rs @@ -28,6 +28,7 @@ pub struct AssembleBuildResponse { pub artifact_url: Option, } +#[cfg(not(feature = "managed"))] #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub struct BuildInstallDetails { diff --git a/src/api/data_types/chunking/mod.rs b/src/api/data_types/chunking/mod.rs index f5d5c86d62..0dc7850842 100644 --- a/src/api/data_types/chunking/mod.rs +++ b/src/api/data_types/chunking/mod.rs @@ -10,7 +10,9 @@ mod hash_algorithm; mod upload; pub use self::artifact::{AssembleArtifactsResponse, ChunkedArtifactRequest}; -pub use self::build::{AssembleBuildResponse, BuildInstallDetails, ChunkedBuildRequest, VcsInfo}; +#[cfg(not(feature = "managed"))] +pub use self::build::BuildInstallDetails; +pub use self::build::{AssembleBuildResponse, ChunkedBuildRequest, VcsInfo}; pub use self::compression::ChunkCompression; pub use self::dif::{AssembleDifsRequest, AssembleDifsResponse, ChunkedDifRequest}; pub use self::file_state::ChunkedFileState; diff --git a/src/api/mod.rs b/src/api/mod.rs index 03f3ec5460..7f1ad698bf 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -16,6 +16,7 @@ use std::borrow::Cow; use std::cell::RefCell; use std::collections::HashMap; use std::error::Error as _; +#[cfg(any(target_os = "macos", not(feature = "managed")))] use std::fs::File; use std::io::{self, Read as _, Write}; use std::rc::Rc; @@ -723,6 +724,7 @@ impl AuthenticatedApi<'_> { .convert_rnf(ApiErrorKind::ProjectNotFound) } + #[cfg(not(feature = "managed"))] pub fn get_build_install_details( &self, org: &str, @@ -737,6 +739,7 @@ impl AuthenticatedApi<'_> { self.get(&url)?.convert() } + #[cfg(not(feature = "managed"))] pub fn download_installable_build(&self, url: &str, dst: &mut File) -> ApiResult { self.request(Method::Get, url)? .progress_bar_mode(ProgressBarMode::Response) diff --git a/src/commands/build/mod.rs b/src/commands/build/mod.rs index 55b28d1dfb..5940738b5d 100644 --- a/src/commands/build/mod.rs +++ b/src/commands/build/mod.rs @@ -3,12 +3,14 @@ use clap::{ArgMatches, Command}; use crate::utils::args::ArgExt as _; +#[cfg(not(feature = "managed"))] pub mod download; pub mod snapshots; pub mod upload; macro_rules! each_subcommand { ($mac:ident) => { + #[cfg(not(feature = "managed"))] $mac!(download); $mac!(snapshots); $mac!(upload);