Skip to content

Commit 3e3a960

Browse files
runningcodeclaude
andcommitted
fix(build): Ungate ProgressBarMode::Response from managed feature
The Response variant was gated behind #[cfg(not(feature = "managed"))] only to suppress a dead code warning. This caused a compilation error when the build download command was added. Remove the gate instead of propagating it — the variant is cheap and the command should work in managed mode too. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b145c47 commit 3e3a960

File tree

5 files changed

+2
-16
lines changed

5 files changed

+2
-16
lines changed

src/api/data_types/chunking/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ pub struct AssembleBuildResponse {
2828
pub artifact_url: Option<String>,
2929
}
3030

31-
#[cfg(not(feature = "managed"))]
3231
#[derive(Debug, Deserialize)]
3332
#[serde(rename_all = "camelCase")]
3433
pub struct BuildInstallDetails {

src/api/data_types/chunking/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ mod hash_algorithm;
1010
mod upload;
1111

1212
pub use self::artifact::{AssembleArtifactsResponse, ChunkedArtifactRequest};
13-
#[cfg(not(feature = "managed"))]
14-
pub use self::build::BuildInstallDetails;
15-
pub use self::build::{AssembleBuildResponse, ChunkedBuildRequest, VcsInfo};
13+
pub use self::build::{AssembleBuildResponse, BuildInstallDetails, ChunkedBuildRequest, VcsInfo};
1614
pub use self::compression::ChunkCompression;
1715
pub use self::dif::{AssembleDifsRequest, AssembleDifsResponse, ChunkedDifRequest};
1816
pub use self::file_state::ChunkedFileState;

src/api/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,6 @@ impl AuthenticatedApi<'_> {
723723
.convert_rnf(ApiErrorKind::ProjectNotFound)
724724
}
725725

726-
#[cfg(not(feature = "managed"))]
727726
pub fn get_build_install_details(
728727
&self,
729728
org: &str,
@@ -738,7 +737,6 @@ impl AuthenticatedApi<'_> {
738737
self.get(&url)?.convert()
739738
}
740739

741-
#[cfg(not(feature = "managed"))]
742740
pub fn download_installable_build(&self, url: &str, dst: &mut File) -> ApiResult<ApiResponse> {
743741
self.request(Method::Get, url)?
744742
.progress_bar_mode(ProgressBarMode::Response)

src/commands/build/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ use clap::{ArgMatches, Command};
33

44
use crate::utils::args::ArgExt as _;
55

6-
#[cfg(not(feature = "managed"))]
76
pub mod download;
87
pub mod snapshots;
98
pub mod upload;
109

1110
macro_rules! each_subcommand {
1211
($mac:ident) => {
13-
#[cfg(not(feature = "managed"))]
1412
$mac!(download);
1513
$mac!(snapshots);
1614
$mac!(upload);

src/utils/progress.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ impl ProgressBar {
128128
#[derive(Clone)]
129129
pub enum ProgressBarMode {
130130
Disabled,
131-
#[cfg(not(feature = "managed"))]
132131
Response,
133132
Shared((Arc<ProgressBar>, u64, usize, Arc<RwLock<Vec<u64>>>)),
134133
}
@@ -141,12 +140,6 @@ impl ProgressBarMode {
141140

142141
/// Returns whether a progress bar should be displayed during download.
143142
pub fn response(&self) -> bool {
144-
#[cfg(not(feature = "managed"))]
145-
let rv = matches!(*self, ProgressBarMode::Response);
146-
147-
#[cfg(feature = "managed")]
148-
let rv = false;
149-
150-
rv
143+
matches!(*self, ProgressBarMode::Response)
151144
}
152145
}

0 commit comments

Comments
 (0)