Skip to content

#62 Improved FileUpdate replacement verification and error handling#63

Merged
tombogle merged 3 commits intomasterfrom
issue-62-improve-replacement-verification
Aug 7, 2023
Merged

#62 Improved FileUpdate replacement verification and error handling#63
tombogle merged 3 commits intomasterfrom
issue-62-improve-replacement-verification

Conversation

@tombogle
Copy link
Contributor

@tombogle tombogle commented Aug 4, 2023


This change is Reviewable

@tombogle tombogle added the bug Something isn't working label Aug 4, 2023
@tombogle tombogle requested a review from ermshiperete August 4, 2023 20:50
@tombogle tombogle self-assigned this Aug 4, 2023
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

Test Results

    2 files   -     2    21 suites   - 15   11s ⏱️ -18s
191 tests +    9  190 ✔️ +    8  1 💤 +1  0 ±0 
191 runs   - 173  190 ✔️  - 172  1 💤  - 1  0 ±0 

Results for commit 98793b6. ± Comparison against base commit 5b34099.

♻️ This comment has been updated with latest results.

@tombogle tombogle requested a review from andrew-polk August 4, 2023 21:00
Copy link
Contributor

@andrew-polk andrew-polk left a comment

Choose a reason for hiding this comment

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

Looks like you need a changelog entry.

Reviewed 4 of 8 files at r1, 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ermshiperete and @tombogle)


SIL.BuildTasks/FileUpdate.cs line 51 at r2 (raw file):

		}

		internal string GetModifiedContents(string content, out bool success)

Do you think this is better?

internal bool TryGetModifiedContents(string content, out string modifiedContents)

If not, looks ok as is...

…fiedContents method to simplify the signature and streamline testing
@tombogle
Copy link
Contributor Author

tombogle commented Aug 7, 2023

SIL.BuildTasks/FileUpdate.cs line 51 at r2 (raw file):

Previously, andrew-polk wrote…

Do you think this is better?

internal bool TryGetModifiedContents(string content, out string modifiedContents)

If not, looks ok as is...

I reworked this in a much simpler way. (To me, the problem with Try... is that it implies that whether it succeeds or not, the result is equally acceptable, but in this case, failure really is an exception and will normally be treated as a build failure.

Copy link
Contributor

@andrew-polk andrew-polk left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ermshiperete)

Copy link
Contributor

@andrew-polk andrew-polk left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ermshiperete)

@tombogle tombogle merged commit 3d20b9a into master Aug 7, 2023
@tombogle tombogle deleted the issue-62-improve-replacement-verification branch August 7, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants