Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Commit 4139a87

Browse files
committed
fix: remove debugging
1 parent f8d13d6 commit 4139a87

5 files changed

Lines changed: 17 additions & 90 deletions

File tree

lib/dal/src/pkg/import.rs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2666,11 +2666,11 @@ async fn import_schema_variant(
26662666

26672667
SchemaVariant::finalize(ctx, schema_variant.id()).await?;
26682668

2669-
info!("importing sockets");
2669+
// info!("importing sockets");
26702670
for socket in variant_spec.sockets()? {
26712671
import_socket(ctx, change_set_id, socket, schema_variant.id(), thing_map).await?;
26722672
}
2673-
info!("importing action funcs");
2673+
// info!("importing action funcs");
26742674

26752675
for action_func in &variant_spec.action_funcs()? {
26762676
let prototype = import_action_func(
@@ -2691,7 +2691,7 @@ async fn import_schema_variant(
26912691
}
26922692
}
26932693

2694-
info!("importing auth funcs");
2694+
// info!("importing auth funcs");
26952695
for auth_func in &variant_spec.auth_funcs()? {
26962696
let prototype = import_auth_func(
26972697
ctx,
@@ -2711,7 +2711,7 @@ async fn import_schema_variant(
27112711
}
27122712
}
27132713

2714-
info!("importing leaf funcs");
2714+
// info!("importing leaf funcs");
27152715

27162716
for leaf_func in variant_spec.leaf_functions()? {
27172717
import_leaf_function(
@@ -2723,7 +2723,7 @@ async fn import_schema_variant(
27232723
)
27242724
.await?;
27252725
}
2726-
info!("setting default values");
2726+
// info!("setting default values");
27272727

27282728
// Default values must be set before attribute functions are configured so they don't
27292729
// override the prototypes set there
@@ -2748,7 +2748,7 @@ async fn import_schema_variant(
27482748
set_default_value(ctx, name_default_value_info).await?;
27492749
}
27502750

2751-
info!("configuring si_prop_funcs");
2751+
// info!("configuring si_prop_funcs");
27522752
for si_prop_func in variant_spec.si_prop_funcs()? {
27532753
let prop_id = Prop::find_prop_id_by_path(
27542754
ctx,
@@ -2774,7 +2774,7 @@ async fn import_schema_variant(
27742774
)
27752775
.await?;
27762776
}
2777-
info!("configuring root prop funcs");
2777+
// info!("configuring root prop funcs");
27782778

27792779
let mut has_resource_value_func = false;
27802780
for root_prop_func in variant_spec.root_prop_funcs()? {
@@ -2809,7 +2809,7 @@ async fn import_schema_variant(
28092809
if !has_resource_value_func {
28102810
attach_resource_payload_to_value(ctx, schema_variant.id()).await?;
28112811
}
2812-
info!("configuring attr funcs");
2812+
// info!("configuring attr funcs");
28132813

28142814
for attr_func in side_effects.attr_funcs {
28152815
import_attr_func_for_prop(
@@ -2823,7 +2823,7 @@ async fn import_schema_variant(
28232823
.await?;
28242824
}
28252825

2826-
info!("configuring map key funcs");
2826+
// info!("configuring map key funcs");
28272827
for (key, map_key_func) in side_effects.map_key_funcs {
28282828
import_attr_func_for_prop(
28292829
ctx,
@@ -2835,7 +2835,7 @@ async fn import_schema_variant(
28352835
)
28362836
.await?;
28372837
}
2838-
info!("done");
2838+
// info!("done");
28392839

28402840
Some(schema_variant)
28412841
}
@@ -3218,7 +3218,6 @@ async fn create_dal_prop(
32183218
}
32193219
};
32203220

3221-
info!("prop new");
32223221
let prop = Prop::new(
32233222
ctx,
32243223
&data.name,
@@ -3246,7 +3245,7 @@ async fn create_prop(
32463245
parent_prop_info: Option<ParentPropInfo>,
32473246
ctx: &PropVisitContext<'_>,
32483247
) -> PkgResult<Option<ParentPropInfo>> {
3249-
info!("creating prop");
3248+
// info!("creating prop");
32503249
let prop = match ctx.change_set_id {
32513250
None => {
32523251
let data = spec.data().ok_or(PkgError::DataNotFound("prop".into()))?;
@@ -3284,7 +3283,7 @@ async fn create_prop(
32843283
}
32853284
};
32863285

3287-
info!("created prop");
3286+
// info!("created prop");
32883287

32893288
let prop_id = prop.id();
32903289

@@ -3365,7 +3364,7 @@ async fn create_prop(
33653364
});
33663365
}
33673366

3368-
info!("done with create prop side effect creation");
3367+
// info!("done with create prop side effect creation");
33693368

33703369
Ok(Some(ParentPropInfo {
33713370
prop_id: prop.id(),

lib/dal/src/schema/variant.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ impl SchemaVariant {
212212
NodeWeight::new_content(change_set, id, ContentAddress::SchemaVariant(hash))?;
213213
workspace_snapshot.add_node(node_weight).await?;
214214

215-
info!("added sv content node");
216-
217215
// Schema --Use--> SchemaVariant (this)
218216
workspace_snapshot
219217
.add_edge(
@@ -223,8 +221,6 @@ impl SchemaVariant {
223221
)
224222
.await?;
225223

226-
info!("edge from schema to sv node");
227-
228224
let schema_variant_id: SchemaVariantId = id.into();
229225
let root_prop = RootProp::new(ctx, schema_variant_id).await?;
230226
let _func_id = Func::find_intrinsic(ctx, IntrinsicFunc::Identity).await?;
@@ -829,11 +825,6 @@ impl SchemaVariant {
829825
)
830826
.await?;
831827

832-
info!(
833-
"adding root child func arg: {:?}, {:?}",
834-
input_prop_id, input.location
835-
);
836-
837828
let new_apa = AttributePrototypeArgument::new(
838829
ctx,
839830
existing_proto_id,

lib/dal/src/schema/variant/root_prop.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,15 @@ impl RootProp {
125125
.await?;
126126
let root_prop_id = root_prop.id();
127127

128-
info!("setting up si, domain and secrets");
129128
let si_prop_id = Self::setup_si(ctx, root_prop_id).await?;
130129

131-
info!("setting domain");
132-
133130
let domain_prop = Prop::new_without_ui_optionals(
134131
ctx,
135132
"domain",
136133
PropKind::Object,
137134
PropParent::OrderedProp(root_prop_id),
138135
)
139136
.await?;
140-
info!("setting secrets");
141137

142138
let secrets_prop = Prop::new_without_ui_optionals(
143139
ctx,
@@ -147,16 +143,11 @@ impl RootProp {
147143
)
148144
.await?;
149145

150-
info!("setting up resource");
151146
let resource_prop_id = Self::setup_resource(ctx, root_prop_id).await?;
152-
info!("setting up resource value");
153147
let resource_value_prop_id = Self::setup_resource_value(ctx, root_prop_id).await?;
154-
info!("setting up code");
155148
let code_prop_id = Self::setup_code(ctx, root_prop_id).await?;
156-
info!("setting up qualification");
157149
let qualification_prop_id = Self::setup_qualification(ctx, root_prop_id).await?;
158150

159-
info!("setting up deleted at");
160151
let deleted_at_prop = Prop::new(
161152
ctx,
162153
"deleted_at",

lib/dal/src/workspace.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ impl Workspace {
9898
#[instrument(skip_all)]
9999
pub async fn setup_builtin(ctx: &mut DalContext) -> WorkspaceResult<()> {
100100
// Check if the builtin already exists. If so, update our tenancy and visibility using it.
101-
info!("finding builtins");
102101
if let Some(found_builtin) = Self::find_builtin(ctx).await? {
103102
ctx.update_tenancy(Tenancy::new(*found_builtin.pk()));
104103
let change_set = ChangeSet::find(ctx, found_builtin.default_change_set_id)
@@ -110,13 +109,11 @@ impl Workspace {
110109
.await?;
111110
return Ok(());
112111
}
113-
info!("after if let");
114112

115113
// If not, create the builtin workspace with a corresponding base change set and initial
116114
// workspace snapshot.
117115
let mut change_set = ChangeSet::new(ctx, DEFAULT_CHANGE_SET_NAME, None).await?;
118116
let workspace_snapshot = WorkspaceSnapshot::initial(ctx, &change_set).await?;
119-
info!("after workspace snapshot");
120117
change_set
121118
.update_pointer(ctx, workspace_snapshot.id().await)
122119
.await?;

lib/dal/src/workspace_snapshot.rs

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ use tokio::fs::File;
5454
use tokio::io::AsyncWriteExt;
5555
use tokio::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard};
5656
use tokio::task::JoinError;
57-
use tokio::time::Instant;
5857

5958
use ulid::Ulid;
6059

@@ -348,10 +347,8 @@ impl WorkspaceSnapshot {
348347
let new_address = {
349348
self.cleanup().await?;
350349

351-
info!("after cleanup");
352350
// Mark everything left as seen.
353351
self.mark_graph_seen(vector_clock_id).await?;
354-
info!("after mark");
355352

356353
let (new_address, status_reader) = ctx
357354
.layer_db()
@@ -482,16 +479,7 @@ impl WorkspaceSnapshot {
482479

483480
self.add_node(node_weight).await?;
484481

485-
let current_index = self.get_node_index_by_id(id).await?;
486-
info!("{:?} = {:?}?", current_index, node_weight_index);
487-
let old_local_weight = self
488-
.working_copy()
489-
.await
490-
.get_node_weight(node_weight_index)?;
491-
let new_local_weight = self.working_copy().await.get_node_weight(current_index);
492-
493-
info!("old: {:?}", old_local_weight);
494-
info!("new: {:?}", new_local_weight);
482+
let _current_index = self.get_node_index_by_id(id).await?;
495483

496484
Ok(())
497485
}
@@ -574,38 +562,25 @@ impl WorkspaceSnapshot {
574562
let from_node_id = from_node_id.into();
575563
let to_node_id = to_node_id.into();
576564

577-
let start = Instant::now();
578565
self.add_edge(from_node_id, edge_weight, to_node_id).await?;
579-
info!("add edge took {:?}", start.elapsed());
580566

581567
// Find the ordering node of the "container" if there is one, and add the thing pointed to
582568
// by the `to_node_id` to the ordering. Also point the ordering node at the thing with
583569
// an `Ordinal` edge, so that Ordering nodes must be touched *after* the things they order
584570
// in a depth first search
585-
let start = Instant::now();
586571
if let Some(mut container_ordering_node) =
587572
self.ordering_node_for_container(from_node_id).await?
588573
{
589-
info!("fetched ordering node in {:?}", start.elapsed());
590-
591-
let start = Instant::now();
592574
self.add_edge(
593575
container_ordering_node.id(),
594576
EdgeWeight::new(change_set, EdgeWeightKind::Ordinal)?,
595577
to_node_id,
596578
)
597579
.await?;
598-
info!("added ordinal edge in {:?}", start.elapsed());
599580

600581
container_ordering_node.push_to_order(change_set, to_node_id)?;
601-
let start = Instant::now();
602582
self.add_node(NodeWeight::Ordering(container_ordering_node))
603583
.await?;
604-
info!("replaced ordering node in {:?}", start.elapsed());
605-
info!(
606-
"address map size: {}",
607-
self.working_copy().await.address_map_len()
608-
);
609584
};
610585

611586
Ok(())
@@ -763,7 +738,7 @@ impl WorkspaceSnapshot {
763738
{
764739
// If the merkle tree hashes are the same, then the entire sub-graph is
765740
// identical, and we don't need to check any further.
766-
println!(
741+
debug!(
767742
"onto {}, {:?} and to rebase {}, {:?} merkle tree hashes are the same",
768743
onto_local_node_weight.merkle_tree_hash(),
769744
onto_node_index,
@@ -1028,7 +1003,7 @@ impl WorkspaceSnapshot {
10281003
});
10291004
}
10301005
} else {
1031-
info!(
1006+
debug!(
10321007
"edge weight entry for to rebase vector clock id {:?} is older than onto last saw {:?}",
10331008
only_to_rebase_edge_info.edge_weight.vector_clock_first_seen().entry_for(to_rebase_vector_clock_id),
10341009
onto_last_saw_to_rebase,
@@ -1105,22 +1080,11 @@ impl WorkspaceSnapshot {
11051080
&self,
11061081
original_node_index: NodeIndex,
11071082
) -> WorkspaceSnapshotResult<()> {
1108-
let start = Instant::now();
11091083
// Climb from the original node, up to root, rewriting outgoing edges
11101084
// along the way. But we have to be sure to climb to root once for each
11111085
// sibling node that we encounter as we walk up to root.
11121086
let mut outer_queue = VecDeque::from([original_node_index]);
11131087

1114-
let root_idx = self.root().await?;
1115-
info!("root index: {:?}", root_idx);
1116-
info!(
1117-
"root index merkle: {:?}",
1118-
self.working_copy()
1119-
.await
1120-
.get_node_weight(root_idx)?
1121-
.address()
1122-
);
1123-
11241088
while let Some(old_node_index) = outer_queue.pop_front() {
11251089
let mut work_queue = VecDeque::from([old_node_index]);
11261090

@@ -1193,22 +1157,7 @@ impl WorkspaceSnapshot {
11931157
}
11941158
}
11951159

1196-
let new_root_idx = self.working_copy_mut().await.update_root_index()?;
1197-
info!("updated root index: {:?}", new_root_idx);
1198-
1199-
// self.working_copy_mut()
1200-
// .await
1201-
// .update_merkle_tree_hash_to_root(new_node_idx)?;
1202-
1203-
info!(
1204-
"root index merkle: {:?}",
1205-
self.working_copy()
1206-
.await
1207-
.get_node_weight(new_root_idx)?
1208-
.address()
1209-
);
1210-
1211-
info!("replace references took: {:?}", start.elapsed(),);
1160+
self.working_copy_mut().await.update_root_index()?;
12121161

12131162
Ok(())
12141163
}

0 commit comments

Comments
 (0)