fix: `mason list` errors when brick in mason.yaml does not exist
- Dominant language
- Dart
- Stars
- 1.1k
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Description
**Description**
I set up `mason_cli` a while back and haven't touched it in a while. I ran `mason init`, which helpfully told me that I already had a mason.yaml file. When I ran `mason list` to see which bricks were installed, I got the less helpful error message:
```
Could not find brick at /Users/bryanoltman/.mason-cache/hosted/registry.brickhub.dev/very_good_dart_package_0.4.1
```
It appears as though this brick does exist (https://brickhub.dev/bricks/very_good_dart_package/0.8.0) and I'm several versions behind, which might be the cause?
mason.yaml:
```yaml
bricks:
very_good_dart_package: ^0.4.0
flutter_bloc_feature: ^0.4.0
```
mason-lock.json:
```json
{"bricks":{"very_good_dart_package":"0.4.1","flutter_bloc_feature":"0.4.0"}}
```
.mason/bricks.json:
```json
{"flutter_bloc_feature":"/Users/bryanoltman/.mason-cache/hosted/registry.brickhub.dev/flutter_bloc_feature_0.4.0","very_good_dart_package":"/Users/bryanoltman/.mason-cache/hosted/registry.brickhub.dev/very_good_dart_package_0.4.1"}
```
Additional context: I just upgraded to Flutter 3.29 (which includes a new Dart version) and reran `dart pub global activate mason_cli`
Even more context: this issue persists after deleting `~/.mason_cache`
**Expected Behavior**
If my understanding of what is happening is correct, I'd expect a list with warnings for out-of-date/discontinued/deleted bricks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.