use deterministic ids in more places (#6064)

* dont redact the ids now that they are deterministic

Signed-off-by: Jess Frazelle <github@jessfraz.com>

pass arouund id generator more

Signed-off-by: Jess Frazelle <github@jessfraz.com>

change the anme space

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates and re-run

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixups

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* cleanup old files

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* cleanup old files

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2025-03-29 21:23:11 -07:00
committed by GitHub
parent 0bdc50c78f
commit 017fac7041
10 changed files with 38 additions and 543 deletions

View File

@ -64,7 +64,11 @@ impl ExecutorContext {
let new_units = exec_state.length_unit();
if !self.engine.execution_kind().await.is_isolated() {
self.engine
.set_units(new_units.into(), annotation.as_source_range())
.set_units(
new_units.into(),
annotation.as_source_range(),
exec_state.id_generator(),
)
.await?;
}
} else {
@ -143,7 +147,9 @@ impl ExecutorContext {
// command and we'd need to flush the batch again.
// This avoids that.
if !exec_kind.is_isolated() && new_units != old_units && *path != ModulePath::Main {
self.engine.set_units(old_units.into(), Default::default()).await?;
self.engine
.set_units(old_units.into(), Default::default(), exec_state.id_generator())
.await?;
}
self.engine.replace_execution_kind(original_execution).await;

View File

@ -2,7 +2,7 @@
use crate::execution::ModuleId;
const NAMESPACE_KCL: uuid::Uuid = uuid::uuid!("efcd6508-4ce6-4a09-8317-e6a6994a3cd7");
const NAMESPACE_KCL: uuid::Uuid = uuid::uuid!("8bda3118-75eb-58c7-a866-bef1dcb495e7");
/// A generator for ArtifactIds that can be stable across executions.
#[derive(Debug, Clone, Default, PartialEq)]

View File

@ -618,7 +618,7 @@ impl ExecutorContext {
if reapply_settings
&& self
.engine
.reapply_settings(&self.settings, Default::default())
.reapply_settings(&self.settings, Default::default(), old_state.id_generator())
.await
.is_err()
{
@ -636,7 +636,7 @@ impl ExecutorContext {
CacheResult::NoAction(true) => {
if self
.engine
.reapply_settings(&self.settings, Default::default())
.reapply_settings(&self.settings, Default::default(), old_state.id_generator())
.await
.is_ok()
{
@ -737,7 +737,7 @@ impl ExecutorContext {
// Re-apply the settings, in case the cache was busted.
self.engine
.reapply_settings(&self.settings, Default::default())
.reapply_settings(&self.settings, Default::default(), exec_state.id_generator())
.await
.map_err(KclErrorWithOutputs::no_outputs)?;