Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
17 changes: 7 additions & 10 deletions crates/r2x-ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ impl AstDiscovery {
_package_version: Option<&str>,
) -> Result<(Vec<PluginSpec>, Vec<DecoratorRegistration>)> {
let start_time = std::time::Instant::now();
logger::info(&format!("AST discovery started for: {}", package_name_full));
logger::debug(&format!("AST discovery started for: {}", package_name_full));

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

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

logger::info(&format!(
"Phase 1 complete: Extracted {} plugins",
logger::debug(&format!(
"Extracted {} plugins from register_plugin",
plugins.len()
));

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

logger::info(&format!(
"Phase 2 complete: Resolved references for {} plugins",
plugins.len()
));
logger::debug("Resolved class/function references for extracted plugins");

// Phase 3: Scan for decorator registrations and associate with plugins
let decorator_registrations = Self::scan_package_for_decorators(&plugins_py)?;
logger::info(&format!(
"Phase 3 complete: Found {} decorator registrations",
logger::debug(&format!(
"Found {} decorator registrations",
decorator_registrations.len()
));

Expand Down
8 changes: 4 additions & 4 deletions crates/r2x-cli/src/commands/plugins/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ fn run_pip_install(

fn print_install_summary(pkg: &str, version: &str, count: usize, elapsed: std::time::Duration) {
let elapsed_ms = elapsed.as_millis();
println!(
"{}",
format!("Installed {} entry point(s) in {}ms", count, elapsed_ms).dimmed()
);
logger::debug(&format!(
"Installed {} entry point(s) in {}ms",
count, elapsed_ms
));
let disp = if version.is_empty() {
format!("{}", pkg.bold())
} else {
Expand Down
4 changes: 2 additions & 2 deletions crates/r2x-cli/src/plugins/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ pub fn discover_and_register_entry_points_with_deps(
return Ok(0);
}

logger::info(&format!(
"Found {} plugin(s) in package '{}'",
logger::debug(&format!(
"Registered {} plugin(s) from package '{}'",
total_plugins, package
));

Expand Down
7 changes: 1 addition & 6 deletions dist-workspace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cargo-dist-version = "0.30.2"
# CI backends to support
ci = "github"
# Additional setup steps for GitHub builds
github_build_setup = ".github/workflows/build-setup.yml"
github_build_setup = ".github/build-setup.yml"
# The installers to generate for each app
installers = ["shell", "powershell", "msi"]
# Target platforms to build apps for (Rust target-triple syntax)
Expand All @@ -20,10 +20,5 @@ install-updater = false
# Skip checking whether the specified configuration files are up to date
allow-dirty = ["ci"]

[dist.dependencies.apt."python3.12"]
version = "*"
stage = ["build"]
targets = ["aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"]

[workspace.metadata.dist]
allow-dirty = true