workspacer_cli/
upgrade.rs

1// ---------------- [ File: workspacer-cli/src/upgrade.rs ]
2crate::ix!();
3
4#[derive(Debug, StructOpt)]
5pub enum UpgradeSubcommand {
6    /// Upgrade function-level tracing
7    FunctionTracing {
8        #[structopt(long = "crate")]
9        crate_name: Option<String>,
10
11        #[structopt(long = "file")]
12        file_name: Option<String>,
13
14        #[structopt(long = "fn")]
15        function_name: Option<String>,
16    },
17    /// Upgrade a single test with new patterns
18    Test {
19        #[structopt(long = "crate")]
20        crate_name: Option<String>,
21
22        #[structopt(long = "test-name")]
23        test_name: Option<String>,
24    },
25    /// Upgrade multiple test suites
26    TestSuites {
27        #[structopt(long = "crate")]
28        crate_name: Option<String>,
29
30        #[structopt(long = "file")]
31        file_name: Option<String>,
32
33        #[structopt(long = "fn")]
34        function_name: Option<String>,
35
36        #[structopt(long = "suite-name")]
37        suite_name: Option<String>,
38    },
39    /// Upgrade the tracing in a single test suite
40    TestSuiteTracing {
41        #[structopt(long = "crate")]
42        crate_name: Option<String>,
43
44        #[structopt(long = "suite-name")]
45        suite_name: Option<String>,
46
47        #[structopt(long = "file")]
48        file_name: Option<String>,
49    },
50    /// Upgrade the tracing in a single test
51    TestTracing {
52        #[structopt(long = "crate")]
53        crate_name: Option<String>,
54
55        #[structopt(long = "test-name")]
56        test_name: Option<String>,
57    },
58
59    /// Upgrade overall tracing approach
60    Tracing {
61        #[structopt(long = "path")]
62        workspace_path: Option<String>,
63    },
64}
65
66impl UpgradeSubcommand {
67    pub async fn run(&self) -> Result<(),WorkspaceError> {
68        todo!("ws upgrade: needs library implementation");
69    }
70}