Skip to content

Conversation

@ejball
Copy link
Contributor

@ejball ejball commented Apr 10, 2025

No description provided.

@ejball ejball requested a review from Copilot April 10, 2025 20:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 61 out of 70 changed files in this pull request and generated 1 comment.

Files not reviewed (9)
  • Directory.Build.props: Language not supported
  • Directory.Packages.props: Language not supported
  • FacilityCSharp.sln: Language not supported
  • global.json: Language not supported
  • src/Facility.CodeGen.CSharp/Facility.CodeGen.CSharp.csproj: Language not supported
  • src/Facility.ConformanceApi/Facility.ConformanceApi.csproj: Language not supported
  • src/Facility.Core.Assertions/Facility.Core.Assertions.csproj: Language not supported
  • src/Facility.Core.MessagePack/Facility.Core.MessagePack.csproj: Language not supported
  • src/Facility.Core/Facility.Core.csproj: Language not supported
Comments suppressed due to low confidence (1)

src/Facility.Core.MessagePack/MessagePackServiceSerializer.cs:79

  • Using MemoryStream.TryGetBuffer without ensuring that the underlying buffer is publicly visible may lead to issues. Consider initializing the MemoryStream using a constructor that enables a publicly visible buffer or use an alternative method to retrieve the buffer safely.
stream1.TryGetBuffer(out var buffer1);

if (type != value2.GetType())
return false;

return ToJson(value1) == ToJson(value2);
Copy link

Copilot AI Apr 10, 2025

Choose a reason for hiding this comment

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

Using string equality for comparing JSON serialized representations can be sensitive to formatting and ordering differences. Consider using a structured JSON comparator such as JToken.DeepEquals to improve reliability.

Copilot uses AI. Check for mistakes.
/// <summary>
/// Deep clones the DTO.
/// </summary>
public virtual T DeepClone() => JsonSerializer.Clone((T) this);
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth a mention in the release notes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, thanks.

@ejball ejball merged commit e36221c into FacilityApi:master Apr 10, 2025
3 checks passed
@ejball ejball deleted the net9-etc branch April 10, 2025 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants