dotnet / dotnet/orleans

fix(samples): investigate ShoppingCart Razor compilation failures in CI

Closed
#11,235 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.9k
Forks
2.1k
Avg merge
14h 42m
Merged PRs (30d)
354

Description

## Failure

The `Build documentation projects and samples` job fails while compiling the ShoppingCart silo with .NET SDK `10.0.400` on the GitHub-hosted Linux runner.

- Run: https://github.com/dotnet/orleans/actions/runs/34522441923
- Job: https://github.com/dotnet/orleans/actions/runs/34522441923/job/103022989442
- Head: `41323038cdb41909b799a4112a11dabf4e0d9b79` (#10588)
- Command: `./samples/Build-Samples.ps1 -Configuration Release -NoIncremental -SkipExternalAssets`

The documentation-project tests completed successfully (44 passed) before the sample build failed.

```text
samples/ShoppingCart/Silo/Components/ManageProductModal.razor(28,19): error RZ1021: Markup in a code block must start with a tag and all start tags must be matched with end tags.
samples/ShoppingCart/Silo/Components/ShoppingCartSummary.razor(25,10): error RZ1021: Markup in a code block must start with a tag and all start tags must be matched with end tags.
samples/ShoppingCart/Silo/Components/ManageProductModal.razor(27,18): error CS1002: ; expected
samples/ShoppingCart/Silo/Components/ShoppingCartSummary.razor(23,14): error CS1525: Invalid expression term '/'
```

Additional CS1002/CS1525 errors follow in those same blocks.

## Scope and investigation

The two Razor files, ShoppingCart project, and sample-build script are unchanged by #10588. The checked-in failing regions contain a self-closing `MudProgressCircular` inside an `@if` and matching `MudStack` tags inside a loop. The root cause and whether this is intermittent remain unconfirmed; this has not been reproduced locally.

Investigate the Razor-generated sources and sample build binlog to distinguish parser/compiler behavior from sample markup or build-environment problems. Keep the sample compilation requirement enabled.

## Expected outcome

The ShoppingCart silo compiles successfully through the standard sample-build command on the supported SDK.

Contributor guide

Open the contributing guide

Research direction

Start with samples/ShoppingCart/Silo/Components/ManageProductModal.razor and ShoppingCartSummary.razor, then run ./samples/Build-Samples.ps1 -Configuration Release -NoIncremental -SkipExternalAssets. Inspect the Razor-generated sources and sample-build binlog to determine whether the failure comes from the markup, parser/compiler behavior, or the build environment; done means the ShoppingCart silo compiles successfully with the standard command.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, github-actions, powershell
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.