removed source caches, not needed

This commit is contained in:
bQUARKz 2026-02-13 09:00:59 +00:00
parent 2638b0fc88
commit d2bf437f53
Signed by: bquarkz
SSH Key Fingerprint: SHA256:Z7dgqoglWwoK6j6u4QC87OveEq74WOhFN+gitsxtkf8
7 changed files with 8 additions and 47 deletions

View File

@ -1,9 +1,9 @@
use crate::pipeline::run_phases;
use crate::{BuildMode, PipelineConfig, PipelineInput, PipelineOutput};
use anyhow::{Context, Result};
use clap::{Parser, Subcommand};
use prometeu_deps::{load_sources, resolve_project, DepsConfig};
use std::path::{Path, PathBuf};
use prometeu_deps::{load_sources, prepare_caches, resolve_project, DepsConfig};
use crate::pipeline::run_phases;
/// Command line interface for the Prometeu Compiler.
#[derive(Parser)]
@ -134,16 +134,6 @@ fn run_pipeline(cfg: PipelineConfig, project_dir: &Path, explain_deps: bool) ->
// resolved deve te dar pelo menos:
// - graph
// - stack (deps-first topo order)
// - (opcional) caches já validados
let caches = if cfg.enable_cache {
Some(
prepare_caches(&deps_cfg, &resolved.cache_plan)
.context("deps: failed to prepare caches")?
)
} else {
None
};
let sources = load_sources(&deps_cfg, &resolved)
.context("deps: failed to load sources")?;
@ -151,8 +141,7 @@ fn run_pipeline(cfg: PipelineConfig, project_dir: &Path, explain_deps: bool) ->
let input = PipelineInput {
graph: resolved.graph,
stack: resolved.stack,
sources,
caches,
sources
};
Ok(run_phases(cfg, input))

View File

@ -1,13 +0,0 @@
use crate::{config::PipelineConfig, ctx::PipelineCtx, pipeline::PipelineInput};
pub fn run(cfg: &PipelineConfig, input: &PipelineInput, _ctx: &mut PipelineCtx) {
if !cfg.enable_cache {
return;
}
// Hard Reset stub:
// - input.caches may carry blobs validated by deps.
// - pipeline decides *when* to hydrate/use them.
// - actual cache IO/validity remains in deps by your rules.
let _ = &input.caches;
}

View File

@ -1,6 +1,5 @@
pub mod boot;
pub mod load_source;
pub mod cache;
pub mod frontend;
pub mod backend;
pub mod emit;

View File

@ -1,15 +1,12 @@
use std::path::Path;
use anyhow::Context;
use prometeu_core::Diagnostic;
use prometeu_deps::{load_sources, prepare_caches, resolve_project, BuildStack, CacheBlobs, DepsConfig, LoadedSources, ResolvedGraph};
use crate::{config::PipelineConfig, ctx::PipelineCtx, phases};
use prometeu_core::Diagnostic;
use prometeu_deps::{BuildStack, LoadedSources, ResolvedGraph};
#[derive(Debug, Clone)]
pub struct PipelineInput {
pub graph: ResolvedGraph,
pub stack: BuildStack,
pub sources: LoadedSources,
pub caches: Option<CacheBlobs>,
pub sources: LoadedSources
}
#[derive(Debug, Default, Clone)]
@ -39,9 +36,6 @@ pub(crate) fn run_phases(cfg: PipelineConfig, input: PipelineInput) -> PipelineO
// Load source: populate FileDB from LoadedSources.
phases::load_source::run(&cfg, &input, &mut ctx);
// Cache hydrate (stub for now).
phases::cache::run(&cfg, &input, &mut ctx);
// Frontend phase (stub / optional).
phases::frontend::run(&cfg, &input, &mut ctx);

View File

@ -1,10 +1,8 @@
mod model;
mod resolve_project;
mod load_sources;
mod prepare_caches;
pub use resolve_project::resolve_project;
pub use prepare_caches::prepare_caches;
pub use load_sources::load_sources;
pub use model::resolved_project::ResolvedProject;

View File

@ -4,6 +4,5 @@ use crate::{BuildStack, ResolvedGraph, ResolveExplanation, CachePlan};
pub struct ResolvedProject {
pub graph: ResolvedGraph,
pub stack: BuildStack,
pub explain: Option<ResolveExplanation>,
pub cache_plan: CachePlan,
pub explain: Option<ResolveExplanation>
}

View File

@ -1,5 +0,0 @@
use crate::{CacheBlobs, CachePlan, DepsConfig};
pub fn prepare_caches(cfg: &DepsConfig, cache_plan: &CachePlan) -> anyhow::Result<CacheBlobs> {
todo!()
}