|
| 1 | +# roslyn-diff v0.5.0 Release Notes |
| 2 | + |
| 3 | +**Release Date:** January 15, 2026 |
| 4 | + |
| 5 | +## Release Highlights |
| 6 | + |
| 7 | +This is the first stable release of roslyn-diff, a semantic diff tool for .NET source code using the Roslyn compiler platform. Unlike traditional line-by-line diff tools, roslyn-diff understands code structure, enabling it to detect and report changes at the semantic level. |
| 8 | + |
| 9 | +### Key Capabilities |
| 10 | + |
| 11 | +- **Semantic Code Understanding** - Uses Roslyn to parse and analyze code structure |
| 12 | +- **Multi-Language Support** - Full semantic diff for C# and VB.NET; line-based diff for other files |
| 13 | +- **Intelligent Change Detection** - Detects additions, deletions, modifications, renames, and moves |
| 14 | +- **Flexible Output** - JSON for AI/tooling, HTML reports, and terminal output |
| 15 | +- **Class Comparison** - Compare specific classes with multiple matching strategies |
| 16 | + |
| 17 | +## Features |
| 18 | + |
| 19 | +### Semantic Diff Engine |
| 20 | + |
| 21 | +- **C# Support** - Full semantic analysis of C# source files (.cs) |
| 22 | +- **VB.NET Support** - Full semantic analysis of Visual Basic source files (.vb) |
| 23 | +- **Line-by-Line Fallback** - Traditional diff for non-.NET files using DiffPlex |
| 24 | +- **Rename Detection** - Identifies when symbols are renamed rather than added/removed |
| 25 | +- **Move Detection** - Detects code that has been relocated within a file |
| 26 | + |
| 27 | +### Change Detection |
| 28 | + |
| 29 | +Detects changes to: |
| 30 | +- Classes, structs, records, and interfaces |
| 31 | +- Methods and functions |
| 32 | +- Properties and fields |
| 33 | +- Namespaces |
| 34 | +- Statement-level changes (in Roslyn mode) |
| 35 | + |
| 36 | +### CLI Commands |
| 37 | + |
| 38 | +#### `diff` Command |
| 39 | +Compare two files with semantic understanding: |
| 40 | +```bash |
| 41 | +roslyn-diff diff old.cs new.cs |
| 42 | +roslyn-diff diff old.cs new.cs --output json |
| 43 | +roslyn-diff diff old.cs new.cs --output html --out-file report.html |
| 44 | +``` |
| 45 | + |
| 46 | +**Options:** |
| 47 | +- `--mode <auto|roslyn|line>` - Select diff algorithm |
| 48 | +- `--ignore-whitespace` / `-w` - Ignore whitespace differences |
| 49 | +- `--ignore-comments` / `-c` - Ignore comment differences |
| 50 | +- `--context` / `-C` - Control context lines |
| 51 | +- `--output` / `-o` - Select output format (json, html, text, plain, terminal) |
| 52 | +- `--rich` / `-r` - Rich terminal output with colors |
| 53 | + |
| 54 | +#### `class` Command |
| 55 | +Compare specific classes between files: |
| 56 | +```bash |
| 57 | +roslyn-diff class old.cs:Calculator new.cs:Calculator |
| 58 | +roslyn-diff class old.cs new.cs --match-by interface --interface IRepository |
| 59 | +``` |
| 60 | + |
| 61 | +**Options:** |
| 62 | +- `--match-by <exact|interface|similarity|auto>` - Matching strategy |
| 63 | +- `--interface` / `-i` - Interface name for interface matching |
| 64 | +- `--similarity` / `-s` - Similarity threshold (0.0-1.0) |
| 65 | + |
| 66 | +### Output Formats |
| 67 | + |
| 68 | +| Format | Description | Best For | |
| 69 | +|--------|-------------|----------| |
| 70 | +| `json` | Machine-readable structured output | AI tools, CI/CD, automation | |
| 71 | +| `html` | Interactive report with syntax highlighting | Code reviews, documentation | |
| 72 | +| `text` | Unified diff format (like git diff) | Quick review, command line | |
| 73 | +| `plain` | Simple text without ANSI codes | Piping, scripting | |
| 74 | +| `terminal` | Rich console output with colors | Interactive terminal use | |
| 75 | + |
| 76 | +### Programmatic API |
| 77 | + |
| 78 | +Use roslyn-diff as a library in your .NET applications: |
| 79 | + |
| 80 | +```csharp |
| 81 | +using RoslynDiff.Core.Differ; |
| 82 | +using RoslynDiff.Core.Models; |
| 83 | + |
| 84 | +var factory = new DifferFactory(); |
| 85 | +var differ = factory.GetDiffer("file.cs", new DiffOptions()); |
| 86 | +var result = differ.Compare(oldContent, newContent, options); |
| 87 | +``` |
| 88 | + |
| 89 | +## Installation |
| 90 | + |
| 91 | +### As a .NET Tool (Recommended) |
| 92 | + |
| 93 | +```bash |
| 94 | +dotnet tool install -g roslyn-diff |
| 95 | +``` |
| 96 | + |
| 97 | +### From Source |
| 98 | + |
| 99 | +```bash |
| 100 | +git clone https://github.com/randlee/roslyn-diff.git |
| 101 | +cd roslyn-diff |
| 102 | +dotnet build |
| 103 | +``` |
| 104 | + |
| 105 | +### Run Without Installing |
| 106 | + |
| 107 | +```bash |
| 108 | +cd src/RoslynDiff.Cli |
| 109 | +dotnet run -- diff old.cs new.cs |
| 110 | +``` |
| 111 | + |
| 112 | +## Requirements |
| 113 | + |
| 114 | +- .NET 10.0 or later |
| 115 | + |
| 116 | +## Dependencies |
| 117 | + |
| 118 | +- Microsoft.CodeAnalysis.CSharp 4.12.0 |
| 119 | +- Microsoft.CodeAnalysis.VisualBasic 4.12.0 |
| 120 | +- DiffPlex 1.7.2 |
| 121 | +- Spectre.Console 0.49.x |
| 122 | +- System.CommandLine 2.0.0-beta4 |
| 123 | + |
| 124 | +## Breaking Changes |
| 125 | + |
| 126 | +None - this is the initial stable release. |
| 127 | + |
| 128 | +## Known Issues |
| 129 | + |
| 130 | +- Large files (1000+ methods) may experience longer processing times (3-10 seconds) |
| 131 | +- Roslyn mode requires .cs or .vb files; other extensions fall back to line diff |
| 132 | +- System.CommandLine is in beta; some edge cases in argument parsing may exist |
| 133 | + |
| 134 | +## Migration from Pre-release Versions |
| 135 | + |
| 136 | +If upgrading from 0.x pre-release versions: |
| 137 | + |
| 138 | +1. **CLI Changes** |
| 139 | + - `--format` has been renamed to `--output` / `-o` |
| 140 | + - Default output format is now `text` (was `terminal`) |
| 141 | + - Use `--rich` / `-r` for colored terminal output |
| 142 | + |
| 143 | +2. **API Changes** |
| 144 | + - `DiffResult` is now a record type (immutable) |
| 145 | + - `Change.Location` split into `OldLocation` and `NewLocation` |
| 146 | + - `OutputFormatter` interface renamed to `IOutputFormatter` |
| 147 | + |
| 148 | +3. **JSON Output Schema** |
| 149 | + - Schema version updated to `roslyn-diff-output-v1` |
| 150 | + - `summary` object structure changed |
| 151 | + - Location objects now include `startColumn` and `endColumn` |
| 152 | + |
| 153 | +## Documentation |
| 154 | + |
| 155 | +- [README](./README.md) - Getting started guide |
| 156 | +- [Usage Guide](./docs/usage.md) - Detailed CLI usage |
| 157 | +- [Output Formats](./docs/output-formats.md) - Format specifications |
| 158 | +- [API Reference](./docs/api.md) - Programmatic API documentation |
| 159 | +- [Architecture](./docs/architecture.md) - Project design |
| 160 | +- [Performance Guide](./docs/performance.md) - Benchmarks and optimization |
| 161 | + |
| 162 | +## Future Roadmap |
| 163 | + |
| 164 | +Planned for future releases: |
| 165 | +- MCP Server integration for AI tooling (v1.x) |
| 166 | +- Folder/project comparison (v2.0) |
| 167 | +- Git integration (compare commits, branches) (v2.0) |
| 168 | +- F# support via FSharp.Compiler.Service (v2.0) |
| 169 | +- Solution-level comparison (v3.0) |
| 170 | + |
| 171 | +## Acknowledgments |
| 172 | + |
| 173 | +- [Roslyn](https://github.com/dotnet/roslyn) - The .NET Compiler Platform |
| 174 | +- [DiffPlex](https://github.com/mmanela/diffplex) - .NET Diff library |
| 175 | +- [Spectre.Console](https://github.com/spectreconsole/spectre.console) - Beautiful console applications |
| 176 | + |
| 177 | +## License |
| 178 | + |
| 179 | +MIT License - see [LICENSE](./LICENSE) for details. |
| 180 | + |
| 181 | +--- |
| 182 | + |
| 183 | +Full changelog available at [CHANGELOG.md](./CHANGELOG.md) |
0 commit comments