Skip to content

Commit

Permalink
fix: added some documentation on breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tdejager committed Apr 11, 2024
1 parent eacc4c4 commit d828b06
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,20 @@ To sync the colors of the different parts of the ui, we use the following rules:
- `style("task").blue()`: The task name

These styles are put in the `consts` module or are a `.fancy_display()` on the names. If you want to add a new generic color, please add it there.


## Comment for Breaking Change
If you have a work-around for a potential breaking change, please add a comment in the code where you think the breaking change will happen. And what needs to be done when we **actually** want to break it. Use `BREAK:` in the comment to denote this.

For example:
```rust
// an enum to sort by size or name
#[derive(clap::ValueEnum, Clone, Debug, Serialize)]
pub enum SortBy {
Size,
Name,
// BREAK: remove the alias
#[value(alias = "type")]
Kind,
}
```
1 change: 1 addition & 0 deletions src/cli/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use crate::Project;
pub enum SortBy {
Size,
Name,
// BREAK: remove the alias
#[value(alias = "type")]
Kind,
}
Expand Down

0 comments on commit d828b06

Please sign in to comment.