Skip to content

Commit

Permalink
internal: Final v1.29 polish. (#1675)
Browse files Browse the repository at this point in the history
* Fix serde.

* Update deps.

* Added image.
  • Loading branch information
milesj authored Oct 5, 2024
1 parent bbae617 commit 4f20a8f
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 35 deletions.
42 changes: 29 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ cached = "0.53.1"
chrono = { version = "0.4.38", features = ["serde"] }
cd_env = "0.2.0"
ci_env = "0.3.0"
clap = { version = "4.5.18", default-features = false, features = [
clap = { version = "4.5.19", default-features = false, features = [
"std",
"error-context",
] }
clap_complete = "4.5.29"
clap_complete = "4.5.32"
compact_str = { version = "0.8.0", default-features = false, features = [
"serde",
] }
console = "0.15.8"
dirs = "5.0.1"
indexmap = "2.5.0"
indexmap = "2.6.0"
miette = "7.2.0"
once_cell = "1.20.1"
pathdiff = "0.2.1"
Expand Down Expand Up @@ -61,14 +61,14 @@ serde = { version = "1.0.210", features = ["derive"] }
serde_json = "1.0.128"
serde_yaml = "0.9.34"
starbase = { version = "0.8.4" }
starbase_archive = { version = "0.8.6", default-features = false, features = [
starbase_archive = { version = "0.8.7", default-features = false, features = [
"miette",
"tar-gz",
] }
starbase_events = "0.6.3"
starbase_sandbox = "0.7.4"
starbase_shell = "0.5.7"
starbase_styles = { version = "0.4.3", features = ["relative-path"] }
starbase_styles = { version = "0.4.4", features = ["relative-path"] }
starbase_utils = { version = "0.8.9", default-features = false, features = [
"editor-config",
"miette",
Expand Down
9 changes: 3 additions & 6 deletions crates/affected/src/affected.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ impl fmt::Display for UpstreamScope {
}
}

#[derive(Debug, Default, Serialize, PartialEq)]
#[cfg_attr(debug_assertions, derive(Deserialize))]
#[derive(Debug, Default, Deserialize, Serialize, PartialEq)]
#[serde(default)]
pub struct AffectedProjectState {
#[serde(skip_serializing_if = "FxHashSet::is_empty")]
Expand Down Expand Up @@ -106,8 +105,7 @@ impl AffectedProjectState {
}
}

#[derive(Debug, Default, Serialize, PartialEq)]
#[cfg_attr(debug_assertions, derive(Deserialize))]
#[derive(Debug, Default, Deserialize, Serialize, PartialEq)]
#[serde(default)]
pub struct AffectedTaskState {
#[serde(skip_serializing_if = "FxHashSet::is_empty")]
Expand Down Expand Up @@ -153,8 +151,7 @@ impl AffectedTaskState {
}
}

#[derive(Debug, Default, Serialize)]
#[cfg_attr(debug_assertions, derive(Deserialize))]
#[derive(Debug, Default, Deserialize, Serialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Affected {
#[serde(skip_serializing_if = "FxHashMap::is_empty")]
Expand Down
9 changes: 3 additions & 6 deletions crates/app/src/queries/projects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ use std::{
};
use tracing::{debug, trace};

#[derive(Default, Serialize)]
#[cfg_attr(debug_assertions, derive(Deserialize))]
#[derive(Default, Deserialize, Serialize)]
pub struct QueryProjectsOptions {
pub alias: Option<String>,
pub affected: Option<Affected>,
Expand All @@ -36,15 +35,13 @@ pub struct QueryProjectsOptions {
pub type_of: Option<String>,
}

#[derive(Serialize)]
#[cfg_attr(debug_assertions, derive(Deserialize))]
#[derive(Deserialize, Serialize)]
pub struct QueryProjectsResult {
pub projects: Vec<Arc<Project>>,
pub options: QueryProjectsOptions,
}

#[derive(Serialize)]
#[cfg_attr(debug_assertions, derive(Deserialize))]
#[derive(Deserialize, Serialize)]
pub struct QueryTasksResult {
pub tasks: BTreeMap<Id, BTreeMap<Id, Task>>,
pub options: QueryProjectsOptions,
Expand Down
22 changes: 18 additions & 4 deletions website/blog/2024-10-07_moon-v1.29.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ slug: moon-v1.29
title: moon v1.29 - Improved affected tracking, experimental Pkl configuration, and more
authors: [milesj]
tags: [affected, detection, tracker, project, task, config, pkl]
# image: ./img/moon/v1.28.png
image: ./img/moon/v1.29.png
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

In this release, we're excited to introduce a new (but experimental) configuration format!
In this release, we're excited to introduce an improved affected tracker and a new (but
experimental) configuration format!

<!--truncate-->

Expand Down Expand Up @@ -317,8 +318,8 @@ isn't moon experimenting with those? The answer is, we may! Just so long as they
requirements. With that said, we do have some opinions below:

- [Starlark/Skylark](https://github.com/bazelbuild/starlark/) - On our list to evaluate.
- [Nickel](https://nickel-lang.org), [Jsonnet](https://jsonnet.org) - On our list to evaluate in the
future, but not a fan of the JSON-like syntax.
- [Nickel](https://nickel-lang.org), [Jsonnet](https://jsonnet.org) - On our list to evaluate, but
not a fan of the JSON-like syntax.
- [Dhall](https://dhall-lang.org) - While this meets most of our requirements, the syntax isn't as
readable or user-friendly as we'd like.
- [CUE](https://cuelang.org/) - No Rust support, so unlikely. It also works quite differently than
Expand All @@ -327,6 +328,19 @@ requirements. With that said, we do have some opinions below:

If there's another format you think we should investigate, drop us a line in Discord!

## Looking for contributors!

Are you a fan of moon (or proto)? Interested in learning Rust or writing more Rust? Want to
contribute to an awesome project (we think so)? Well it just so happens that we are looking for
active contributors!

We have a very long roadmap of features we would like to implement, but do not have enough time or
resources to implement them in the timeframe we would like. These features range from very small
(low hanging fruit) to very large (and quite complex).

If this sounds like something you may be interested in, post a message in Discord and let us know!
Only a few hours a week commitment is good enough for us.

## Other changes

View the [official release](https://github.com/moonrepo/moon/releases/tag/v1.29.0) for a full list
Expand Down
Binary file added website/blog/img/moon/v1.29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion website/docs/concepts/task-inheritance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ one of the following strategy values.
positional arguments.
- `preserve` - Preserve the original global task values. This should rarely be used, but exists for
situations where an inheritance chain is super long and complex, but we simply want to the base
values.
values. <VersionLabel version="1.29.0" />
- `replace` - Values found in the local task entirely _replaces_ the values in the global task. This
strategy is useful when you need full control.

Expand Down

0 comments on commit 4f20a8f

Please sign in to comment.