Add build and run scripts; drop the broken Avalonia.Diagnostics reference
A wrapper around `dotnet build` earns nothing, so build.ps1/build.sh are the full local gate instead — tool restore, package restore, format check, build, test — in the order that fails cheapest first, with a non-zero exit on failure. run.ps1/run.sh default to Debug and pass extra arguments through to the app. Both flavours ship because the Desktop head targets Windows, Linux and macOS. Writing them immediately paid for itself: the very first run failed restore on Avalonia.Diagnostics 12.1.1, which does not exist — the package stops at 11.3.x because Avalonia 12 moved the inspector into a separate tool with its own installation. The reference had survived because it sat behind Condition="'$(Configuration)' == 'Debug'", and `dotnet restore` evaluates with the default configuration while every build so far had passed -c Release. So `dotnet build -c Release` worked and a bare `dotnet restore` did not. Reference removed rather than replaced: AvaloniaUI.DiagnosticsSupport pulls in a separately installed tool, which is not a dependency to add to a skeleton without asking. README and CLAUDE.md no longer promise F12, and both traps are written down where the next person will hit them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
3db9d4dfc6
commit
aeafe0af36
@@ -4,6 +4,14 @@
|
||||
|
||||
## Команды
|
||||
|
||||
Полный локальный гейт (формат → сборка → тесты) — то, что нужно прогнать перед коммитом:
|
||||
|
||||
```bash
|
||||
./build.ps1
|
||||
```
|
||||
|
||||
Отдельные шаги, если нужен только один из них:
|
||||
|
||||
```bash
|
||||
dotnet build AvParser.slnx -c Release
|
||||
```
|
||||
@@ -14,9 +22,11 @@ dotnet test AvParser.slnx -c Release
|
||||
dotnet csharpier check .
|
||||
```
|
||||
```bash
|
||||
dotnet run --project src/AvParser.Desktop
|
||||
./run.ps1
|
||||
```
|
||||
|
||||
На Linux/macOS — `./build.sh` и `./run.sh` с теми же шагами.
|
||||
|
||||
## Слои
|
||||
|
||||
`Core ← Infrastructure ← UI ← Desktop`, строго в одну сторону.
|
||||
@@ -95,6 +105,14 @@ dotnet run --project src/AvParser.Desktop
|
||||
открепленного контрола не строится визуальное дерево.
|
||||
- **csharpier — единственный владелец форматирования** (включая `.axaml` и `.csproj`).
|
||||
`IDE0055` понижен до suggestion: два форматтера с `TreatWarningsAsErrors` дерутся насмерть.
|
||||
- **`Condition="'$(Configuration)' == 'Debug'"` на `PackageReference` — ловушка.**
|
||||
`dotnet restore` вычисляется с конфигурацией по умолчанию, поэтому пакет обязан
|
||||
резолвиться, даже если эту конфигурацию никто не собирает. Так тут проехал мёртвый
|
||||
`Avalonia.Diagnostics` (его нет под Avalonia 12): `dotnet build -c Release` работал,
|
||||
а голый `dotnet restore` падал.
|
||||
- **Инспектора в Avalonia 12 нет из коробки.** `Avalonia.Diagnostics` закончился на 11.3.x;
|
||||
DevTools живут отдельно (`AvaloniaUI.DiagnosticsSupport` + `.WithDeveloperTools()`), со своей
|
||||
установкой. Зависимость намеренно не добавлена.
|
||||
|
||||
## Качество
|
||||
|
||||
|
||||
Reference in New Issue
Block a user