Skip to content

Commit 1a6ee8d

Browse files
authored
fix(ci): Moving python setup to a separate build step (#34)
* fix(ci): Moving python setup to a separate build step * fix(logging): Changing some logs to debug
1 parent 0813312 commit 1a6ee8d

5 files changed

Lines changed: 14 additions & 22 deletions

File tree

crates/r2x-ast/src/lib.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ impl AstDiscovery {
3737
_package_version: Option<&str>,
3838
) -> Result<(Vec<PluginSpec>, Vec<DecoratorRegistration>)> {
3939
let start_time = std::time::Instant::now();
40-
logger::info(&format!("AST discovery started for: {}", package_name_full));
40+
logger::debug(&format!("AST discovery started for: {}", package_name_full));
4141

4242
// Find the plugins.py file using entry_points.txt
4343
let (plugins_py, plugin_module) =
4444
Self::find_plugins_py_via_entry_points(package_path, package_name_full, venv_path)?;
45-
logger::info(&format!("Found plugins.py at: {:?}", plugins_py));
45+
logger::debug(&format!("Found plugins.py at: {:?}", plugins_py));
4646

4747
// Phase 1: Extract plugins with constructor_args
4848
let package_root = plugins_py
@@ -60,8 +60,8 @@ impl AstDiscovery {
6060
.extract_plugins()
6161
.map_err(|e| anyhow!("Failed to extract plugins: {}", e))?;
6262

63-
logger::info(&format!(
64-
"Phase 1 complete: Extracted {} plugins",
63+
logger::debug(&format!(
64+
"Extracted {} plugins from register_plugin",
6565
plugins.len()
6666
));
6767

@@ -72,15 +72,12 @@ impl AstDiscovery {
7272
.map_err(|e| anyhow!("Failed to resolve references for {}: {}", plugin.name, e))?;
7373
}
7474

75-
logger::info(&format!(
76-
"Phase 2 complete: Resolved references for {} plugins",
77-
plugins.len()
78-
));
75+
logger::debug("Resolved class/function references for extracted plugins");
7976

8077
// Phase 3: Scan for decorator registrations and associate with plugins
8178
let decorator_registrations = Self::scan_package_for_decorators(&plugins_py)?;
82-
logger::info(&format!(
83-
"Phase 3 complete: Found {} decorator registrations",
79+
logger::debug(&format!(
80+
"Found {} decorator registrations",
8481
decorator_registrations.len()
8582
));
8683

crates/r2x-cli/src/commands/plugins/install.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,10 @@ fn run_pip_install(
240240

241241
fn print_install_summary(pkg: &str, version: &str, count: usize, elapsed: std::time::Duration) {
242242
let elapsed_ms = elapsed.as_millis();
243-
println!(
244-
"{}",
245-
format!("Installed {} entry point(s) in {}ms", count, elapsed_ms).dimmed()
246-
);
243+
logger::debug(&format!(
244+
"Installed {} entry point(s) in {}ms",
245+
count, elapsed_ms
246+
));
247247
let disp = if version.is_empty() {
248248
format!("{}", pkg.bold())
249249
} else {

crates/r2x-cli/src/plugins/discovery.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ pub fn discover_and_register_entry_points_with_deps(
9292
return Ok(0);
9393
}
9494

95-
logger::info(&format!(
96-
"Found {} plugin(s) in package '{}'",
95+
logger::debug(&format!(
96+
"Registered {} plugin(s) from package '{}'",
9797
total_plugins, package
9898
));
9999

dist-workspace.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cargo-dist-version = "0.30.2"
88
# CI backends to support
99
ci = "github"
1010
# Additional setup steps for GitHub builds
11-
github_build_setup = ".github/workflows/build-setup.yml"
11+
github_build_setup = ".github/build-setup.yml"
1212
# The installers to generate for each app
1313
installers = ["shell", "powershell", "msi"]
1414
# Target platforms to build apps for (Rust target-triple syntax)
@@ -20,10 +20,5 @@ install-updater = false
2020
# Skip checking whether the specified configuration files are up to date
2121
allow-dirty = ["ci"]
2222

23-
[dist.dependencies.apt."python3.12"]
24-
version = "*"
25-
stage = ["build"]
26-
targets = ["aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"]
27-
2823
[workspace.metadata.dist]
2924
allow-dirty = true

0 commit comments

Comments
 (0)