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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## Unreleased

#### 🚀 Updates

- Reworked the workspace graph caching to avoid plugin calls on cache hits, which can improve
performance in large workspaces.

#### 🧰 Toolchains

- **Go**
- Fixed `go list -deps` running on non-Go projects.

## 2.4.1

#### 🐞 Fixes
Expand Down
5 changes: 2 additions & 3 deletions crates/app/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,16 +350,15 @@ impl MoonSession {
}

async fn load_workspace_graph(&self) -> miette::Result<Arc<WorkspaceGraph>> {
let cache_engine = self.get_cache_engine()?;
let context = self.create_workspace_graph_context().await?;

let workspace_graph = Arc::new(if self.workspace_config.experiments.async_graph_building {
WorkspaceBuilderAsync::new_with_cache(context, &cache_engine)
WorkspaceBuilderAsync::new_with_cache(context)
.await?
.build()
.await?
} else {
WorkspaceBuilder::new_with_cache(context, &cache_engine)
WorkspaceBuilder::new_with_cache(context)
.await?
.build()
.await?
Expand Down
4 changes: 2 additions & 2 deletions crates/app/src/watchers/workspace_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use moon_common::path::WorkspaceRelativePath;
use moon_config::WorkspaceProjects;
use moon_daemon::AtomicDaemonState;
use moon_file_watcher::*;
use moon_workspace::{STATE_GRAPH_FILE_NAME, STATE_PROJECTS_FILE_NAME};
use moon_workspace::{STATE_CACHE_FILE_NAME, STATE_GRAPH_FILE_NAME};
use proto_core::ProtoEnvironment;
use regex::Regex;
use starbase_utils::fs;
Expand Down Expand Up @@ -133,7 +133,7 @@ impl WorkspaceWatcher {
let cache_engine = self.session.get_cache_engine()?;

fs::remove_file(cache_engine.state.resolve_path(STATE_GRAPH_FILE_NAME))?;
fs::remove_file(cache_engine.state.resolve_path(STATE_PROJECTS_FILE_NAME))?;
fs::remove_file(cache_engine.state.resolve_path(STATE_CACHE_FILE_NAME))?;

// Rebuild the graphs in a background thread
self.graph_handle = Some(self.session.rebuild_graphs(Arc::clone(state)));
Expand Down
2 changes: 1 addition & 1 deletion crates/config-loader/src/toolchains_config_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl ToolchainsConfigExt {
match id.as_str() {
"bun" => Some(locate("bun_toolchain", "1.0.2")),
"deno" => Some(locate("deno_toolchain", "1.1.0")),
"go" => Some(locate("go_toolchain", "1.4.3")),
"go" => Some(locate("go_toolchain", "1.4.4")),
"javascript" => Some(locate("javascript_toolchain", "1.2.1")),
"node" => Some(locate("node_toolchain", "1.0.2")),
"npm" => Some(locate("node_depman_toolchain", "1.0.3")),
Expand Down
Loading
Loading