Skip to content

Allow specifying RazorLangVersion - #174

Merged
jjonescz merged 1 commit into
features/hackathon2026from
razor-lang-version
Sep 30, 2026
Merged

jjonescz merged 1 commit into
features/hackathon2026from
razor-lang-version

Conversation

@jjonescz

Copy link
Copy Markdown
Owner

No description provided.

@jjonescz
jjonescz requested a balanced review from Copilot September 30, 2026 14:15
@jjonescz jjonescz added the enhancement New feature or request label Sep 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation is consistent across both toolchains and has comprehensive compatibility and validation coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Adds configurable Razor language versions for both supported Razor compilation toolchains, with backward-compatible defaults and validation.

Changes:

  • Adds RazorLangVersion file-level directive parsing and suggestions.
  • Applies the selected version to source-generator and internal-API compilation.
  • Adds coverage for valid, invalid, default, reset, and older-compiler behavior.
File Description
src/​Compiler/​Compiler.cs Applies the selected Razor language version.
src/​Compiler/​FileLevelDirectiveParser.cs Defines the new directive property.
src/​Compiler/​Utils/​Utils.cs Adds compatible defaulting and configuration cloning.
test/​UnitTests/​CompilerProxyTests.cs Tests both Razor toolchains and compatibility.
test/​UnitTests/​FileLevelDirectiveTests.cs Tests parsing, suggestions, and configuration.
test/​UnitTests/​UnitTests.csproj References Razor compiler APIs needed by tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jjonescz
jjonescz merged commit cdb95e4 into features/hackathon2026 Sep 30, 2026
6 of 7 checks passed
@jjonescz
jjonescz deleted the razor-lang-version branch September 30, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants