Skip to content

Commit

Permalink
Add debugs
Browse files Browse the repository at this point in the history
  • Loading branch information
maciektr committed Dec 21, 2024
1 parent 6769c8b commit 893586c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scarb/src/compiler/plugin/proc_macro/compilation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ impl SharedLibraryProvider for Package {

fn prebuilt_lib_path(&self) -> Option<Utf8PathBuf> {
let target_triple = target!();
dbg!(&target_triple);

let prebuilt_name = format!(
"{name}_v{version}_{target}{suffix}",
Expand All @@ -83,6 +84,7 @@ impl SharedLibraryProvider for Package {
.join("scarb")
.join("cairo-plugin")
.join(prebuilt_name);
dbg!(&prebuilt_path);

prebuilt_path.exists().then_some(prebuilt_path)
}
Expand Down
5 changes: 5 additions & 0 deletions scarb/src/ops/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,11 @@ pub fn generate_cairo_plugin_compilation_units(
// Whether loading a prebuilt library is both allowed and requested.
load_prebuilt: bool,
) -> Result<ProcMacroCompilationUnit> {
dbg!(member.id);
dbg!(load_prebuilt);
let load_prebuilt = load_prebuilt && member.prebuilt_lib_path().is_some();
dbg!(member.prebuilt_lib_path());
dbg!(member.prebuilt_lib_path().is_some());
let prebuilt = load_prebuilt
.then_some(
ProcMacroInstance::try_load_prebuilt(member.clone())
Expand All @@ -827,6 +831,7 @@ pub fn generate_cairo_plugin_compilation_units(
.map(Arc::new),
)
.flatten();
dbg!(prebuilt.is_some());
let components = vec![CompilationUnitComponent::try_new(
member.clone(),
vec![member
Expand Down

0 comments on commit 893586c

Please sign in to comment.