Skip to content

Commit eccd48c

Browse files
feat(mobile-app): Reintroduce mobile-app feature gating (#2643)
This reverts commit 952feeb. Fixes #2642
1 parent 61e8637 commit eccd48c

File tree

11 files changed

+33
-5
lines changed

11 files changed

+33
-5
lines changed

.github/workflows/lint.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,20 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [ubuntu-24.04, macos-14, windows-2022]
19+
feature-args: ['', '-Funstable-mobile-app']
1920
include:
2021
- os: ubuntu-24.04
2122
display-os: Linux
2223
- os: macos-14
2324
display-os: macOS
2425
- os: windows-2022
2526
display-os: Windows
27+
- feature-args: ''
28+
feature-suffix: ''
29+
- feature-args: '-Funstable-mobile-app'
30+
feature-suffix: ' (-Funstable-mobile-app)'
2631

27-
name: ${{ matrix.display-os }}
32+
name: ${{ matrix.display-os }}${{ matrix.feature-suffix }}
2833
runs-on: ${{ matrix.os }}
2934
steps:
3035
- name: Checkout Repository
@@ -40,4 +45,4 @@ jobs:
4045
run: cargo fmt --all -- --check
4146

4247
- name: Run Clippy
43-
run: cargo clippy --workspace --tests
48+
run: cargo clippy --workspace --tests ${{ matrix.feature-args }}

.github/workflows/test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,20 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [ubuntu-24.04, macos-14, windows-2022]
19+
feature-args: ['', '-Funstable-mobile-app']
1920
include:
2021
- os: ubuntu-24.04
2122
display-os: Linux
2223
- os: macos-14
2324
display-os: macOS
2425
- os: windows-2022
2526
display-os: Windows
27+
- feature-args: ''
28+
feature-suffix: ''
29+
- feature-args: '-Funstable-mobile-app'
30+
feature-suffix: ' (-Funstable-mobile-app)'
2631

27-
name: ${{ matrix.display-os }}
32+
name: ${{ matrix.display-os }}${{ matrix.feature-suffix }}
2833
runs-on: ${{ matrix.os }}
2934

3035
steps:
@@ -35,4 +40,4 @@ jobs:
3540
uses: swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # 2.8.0
3641

3742
- name: Run Cargo Tests
38-
run: cargo test --workspace
43+
run: cargo test --workspace ${{ matrix.feature-args }}

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"rust-analyzer.cargo.features": ["unstable-mobile-app"],
3+
"rust-analyzer.cargo.noDefaultFeatures": false
4+
}

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rust-version = "1.86"
1111
[dependencies]
1212
anylog = "0.6.3"
1313
anyhow = { version = "1.0.69", features = ["backtrace"] }
14+
apple-catalog-parsing = { path = "apple-catalog-parsing", optional = true }
1415
backoff = "0.4.0"
1516
brotli2 = "0.3.2"
1617
bytecount = "0.6.3"
@@ -93,6 +94,10 @@ default = []
9394
managed = []
9495
with_crash_reporting = []
9596

97+
# Feature flag for the mobile-app command, as it is still under development.
98+
# CI tests run against this flag, but we don't include it in release builds.
99+
unstable-mobile-app = ["apple-catalog-parsing"]
100+
96101
[workspace.lints.clippy]
97102
allow-attributes = "warn"
98103
str-to-string = "warn"
@@ -111,7 +116,6 @@ workspace = true
111116

112117
[target."cfg(target_os = \"macos\")".dependencies]
113118
mac-process-info = "0.2.0"
114-
apple-catalog-parsing = { path = "apple-catalog-parsing"}
115119

116120
[target."cfg(unix)"]
117121

src/api/data_types/chunking/mobile_app.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg(feature = "unstable-mobile-app")]
12
use serde::{Deserialize, Serialize};
23
use sha1_smol::Digest;
34

src/api/data_types/chunking/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ pub use self::compression::ChunkCompression;
1414
pub use self::dif::{AssembleDifsRequest, AssembleDifsResponse, ChunkedDifRequest};
1515
pub use self::file_state::ChunkedFileState;
1616
pub use self::hash_algorithm::ChunkHashAlgorithm;
17+
#[cfg(feature = "unstable-mobile-app")]
1718
pub use self::mobile_app::{AssembleMobileAppResponse, ChunkedMobileAppRequest};
1819
pub use self::upload::{ChunkServerOptions, ChunkUploadCapability};

src/api/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,7 @@ impl<'a> AuthenticatedApi<'a> {
10171017
.convert_rnf(ApiErrorKind::ReleaseNotFound)
10181018
}
10191019

1020+
#[cfg(feature = "unstable-mobile-app")]
10201021
pub fn assemble_mobile_app(
10211022
&self,
10221023
org: &str,

src/commands/mobile_app/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(feature = "unstable-mobile-app")]
2+
13
use anyhow::Result;
24
use clap::{ArgMatches, Command};
35

src/commands/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ macro_rules! each_subcommand {
5757
$mac!(info);
5858
$mac!(issues);
5959
$mac!(login);
60+
#[cfg(feature = "unstable-mobile-app")]
6061
$mac!(mobile_app);
6162
$mac!(monitors);
6263
$mac!(organizations);

src/utils/mobile_app/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(feature = "unstable-mobile-app")]
2+
13
#[cfg(target_os = "macos")]
24
mod apple;
35
mod validation;

0 commit comments

Comments
 (0)