-
-
Notifications
You must be signed in to change notification settings - Fork 212
Add support for forward compatible binlog format #732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
KirillOsenkov
merged 11 commits into
KirillOsenkov:main
from
JanKrivanek:dev/port-forward-compatibility
Jan 9, 2024
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9481a34
Add support for forward compatible binlog format
JanKrivanek b1fa69a
Fix nuspec
JanKrivanek 6683712
Preserve version on raw events replay
JanKrivanek c280abc
Expose ForwardCompatibilityReadingHandler for external usage
JanKrivanek 7c58067
Remove unused using
JanKrivanek b8cc013
Add forward compatibility reading unit tests
JanKrivanek 04be72e
Add 'Do not ask again' option
JanKrivanek 54302bc
Mirroring changes from MSBuild PR
JanKrivanek 4397d63
Simplifying the experience
JanKrivanek 8cd23de
Cleaning up the code and api
JanKrivanek 738c8d1
Fix raw replay and redact perf
JanKrivanek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| using System.IO; | ||
| using Microsoft.Build.Logging.StructuredLogger; | ||
|
|
||
| namespace BinlogTool | ||
| { | ||
| public abstract class BinlogToolCommandBase | ||
| { | ||
| protected Build ReadBuild(string binLogFilePath, bool throwOnPathNotFound = true) | ||
| { | ||
| if (string.IsNullOrEmpty(binLogFilePath) || !File.Exists(binLogFilePath)) | ||
| { | ||
| if(throwOnPathNotFound) | ||
| { | ||
| throw new FileNotFoundException("Specified binlog was not found.", binLogFilePath); | ||
| } | ||
|
|
||
| return null; | ||
| } | ||
|
|
||
| return BinaryLog.ReadBuild(binLogFilePath); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,16 @@ | ||
| using System.Linq; | ||
| using System.Linq; | ||
| using Microsoft.Build.Logging.StructuredLogger; | ||
|
|
||
| namespace BinlogTool | ||
| { | ||
| public class SaveStrings | ||
| public class SaveStrings : BinlogToolCommandBase | ||
| { | ||
| public void Run(string binLogFilePath, string outputFilePath) | ||
| { | ||
| var build = BinaryLog.ReadBuild(binLogFilePath); | ||
| var build = this.ReadBuild(binLogFilePath); | ||
| var strings = build.StringTable.Instances.OrderBy(s => s).ToArray(); | ||
|
|
||
| Serialization.WriteStringsToFile(outputFilePath, strings); | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.