Skip to content

Commit e507400

Browse files
committed
Enable by default.
1 parent 41779cf commit e507400

5 files changed

Lines changed: 22 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
service name.
1313
- The destination and transport are configured with the standard `OTEL_EXPORTER_OTLP_*`
1414
environment variables.
15+
- **Experiments**
16+
- The `asyncAffectedTracking`, `asyncGraphBuilding`, and `nativeFileHashing` experiments are now
17+
enabled by default. If you run into issues, please report it, and then disable the experiment to
18+
continue.
1519
- **Project graph**
1620
- Reworked the project graph to validate cycles per dependency scope partition. Production scoped
1721
dependencies (`production`, `peer`) and development scoped dependencies (`development`, `build`,

crates/config/src/workspace/experiments_config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ config_struct!(
77
pub struct ExperimentsConfig {
88
/// Track and determine affected projects and tasks asynchronously.
99
/// @since 2.2.0
10-
#[setting(env = "MOON_EXPERIMENT_ASYNC_AFFECTED_TRACKING", parse_env = env::parse_bool)]
10+
#[setting(default = true, env = "MOON_EXPERIMENT_ASYNC_AFFECTED_TRACKING", parse_env = env::parse_bool)]
1111
pub async_affected_tracking: bool,
1212

1313
/// Build the project and task graphs asynchronously.
1414
/// @since 2.2.0
15-
#[setting(env = "MOON_EXPERIMENT_ASYNC_GRAPH_BUILDING", parse_env = env::parse_bool)]
15+
#[setting(default = true, env = "MOON_EXPERIMENT_ASYNC_GRAPH_BUILDING", parse_env = env::parse_bool)]
1616
pub async_graph_building: bool,
1717

1818
/// Store task outputs in a local CAS (content-addressable storage) cache.
@@ -22,7 +22,7 @@ config_struct!(
2222

2323
/// Use native file hashing instead of using the VCS.
2424
/// @since 2.3.0
25-
#[setting(env = "MOON_EXPERIMENT_NATIVE_FILE_HASHING", parse_env = env::parse_bool)]
25+
#[setting(default = true, env = "MOON_EXPERIMENT_NATIVE_FILE_HASHING", parse_env = env::parse_bool)]
2626
pub native_file_hashing: bool,
2727
}
2828
);

packages/types/src/workspace-config.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,18 @@ export interface ExperimentsConfig {
177177
* Track and determine affected projects and tasks asynchronously.
178178
* @since 2.2.0
179179
*
180+
* @default true
180181
* @env MOON_EXPERIMENT_ASYNC_AFFECTED_TRACKING
181182
*/
182-
asyncAffectedTracking: boolean;
183+
asyncAffectedTracking?: boolean;
183184
/**
184185
* Build the project and task graphs asynchronously.
185186
* @since 2.2.0
186187
*
188+
* @default true
187189
* @env MOON_EXPERIMENT_ASYNC_GRAPH_BUILDING
188190
*/
189-
asyncGraphBuilding: boolean;
191+
asyncGraphBuilding?: boolean;
190192
/**
191193
* Store task outputs in a local CAS (content-addressable storage) cache.
192194
* @since 2.3.0
@@ -198,9 +200,10 @@ export interface ExperimentsConfig {
198200
* Use native file hashing instead of using the VCS.
199201
* @since 2.3.0
200202
*
203+
* @default true
201204
* @env MOON_EXPERIMENT_NATIVE_FILE_HASHING
202205
*/
203-
nativeFileHashing: boolean;
206+
nativeFileHashing?: boolean;
204207
}
205208

206209
/** Configures the generator for scaffolding from templates. */
@@ -868,13 +871,15 @@ export interface PartialExperimentsConfig {
868871
* Track and determine affected projects and tasks asynchronously.
869872
* @since 2.2.0
870873
*
874+
* @default true
871875
* @env MOON_EXPERIMENT_ASYNC_AFFECTED_TRACKING
872876
*/
873877
asyncAffectedTracking?: boolean | null;
874878
/**
875879
* Build the project and task graphs asynchronously.
876880
* @since 2.2.0
877881
*
882+
* @default true
878883
* @env MOON_EXPERIMENT_ASYNC_GRAPH_BUILDING
879884
*/
880885
asyncGraphBuilding?: boolean | null;
@@ -889,6 +894,7 @@ export interface PartialExperimentsConfig {
889894
* Use native file hashing instead of using the VCS.
890895
* @since 2.3.0
891896
*
897+
* @default true
892898
* @env MOON_EXPERIMENT_NATIVE_FILE_HASHING
893899
*/
894900
nativeFileHashing?: boolean | null;

website/docs/config/workspace.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ Experiments are a work in progress and may be buggy. Please report any issues yo
347347
<HeadingApiLink to="/api/types/interface/ExperimentsConfig#asyncAffectedTracking" />
348348

349349
Utilizes a new asynchronous implementation of the affected tracker that can improve performance by
350-
100-150%. Defaults to `false`.
350+
100-150%. Defaults to `true` in v2.5+, otherwise `false`.
351351

352352
```yaml title=".moon/workspace.yml" {2}
353353
experiments:
@@ -361,7 +361,7 @@ Can also be enabled with the `MOON_EXPERIMENT_ASYNC_AFFECTED_TRACKING` environme
361361
<HeadingApiLink to="/api/types/interface/ExperimentsConfig#asyncGraphBuilding" />
362362

363363
Utilizes an asynchronous graph building implementation that can improve performance by 100-170% in
364-
large workspaces. Defaults to `false`.
364+
large workspaces. Defaults to `true` in v2.5+, otherwise `false`.
365365

366366
```yaml title=".moon/workspace.yml" {2}
367367
experiments:
@@ -393,7 +393,7 @@ Can also be enabled with the `MOON_EXPERIMENT_CAS_OUTPUTS_CACHE` environment var
393393

394394
Replaces the VCS-based file hashing mechanism with a custom native implementation that runs within
395395
moon's task pool. In our benchmarks this improves performance by 10-50% depending on workspace size
396-
and file count. Defaults to `false`.
396+
and file count. Defaults to `true` in v2.5+, otherwise `false`.
397397

398398
```yaml title=".moon/workspace.yml" {2}
399399
experiments:

website/static/schemas/v2/workspace.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,13 @@
479479
"asyncAffectedTracking": {
480480
"title": "asyncAffectedTracking",
481481
"description": "Track and determine affected projects and tasks asynchronously. @since 2.2.0",
482+
"default": true,
482483
"type": "boolean"
483484
},
484485
"asyncGraphBuilding": {
485486
"title": "asyncGraphBuilding",
486487
"description": "Build the project and task graphs asynchronously. @since 2.2.0",
488+
"default": true,
487489
"type": "boolean"
488490
},
489491
"casOutputsCache": {
@@ -495,6 +497,7 @@
495497
"nativeFileHashing": {
496498
"title": "nativeFileHashing",
497499
"description": "Use native file hashing instead of using the VCS. @since 2.3.0",
500+
"default": true,
498501
"type": "boolean"
499502
}
500503
},

0 commit comments

Comments
 (0)