Skip to content

Conversation

@dennisdoomen
Copy link
Owner

This PR hardens encapsulation so internals can’t leak via InternalsVisibleTo. It introduces the Microsoft.CodeAnalysis.Embedded attribute and applies it to internal types, ensuring they’re embedded and never surface across assembly boundaries even when another assembly is granted internals access.

Closes #31

@github-actions
Copy link

Test Results

84 tests  ±0   84 ✅ ±0   0s ⏱️ ±0s
 3 suites ±0    0 💤 ±0 
 3 files   ±0    0 ❌ ±0 

Results for commit 77e271c. ± Comparison against base commit fb8a019.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 17012518801

Details

  • 114 of 119 (95.8%) changed or added relevant lines in 2 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 96.341%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Pathy/ChainablePath.cs 105 110 95.45%
Files with Coverage Reduction New Missed Lines %
Pathy/ChainablePath.cs 3 95.45%
Totals Coverage Status
Change from base Build 16901442165: 0.0%
Covered Lines: 172
Relevant Lines: 180

💛 - Coveralls

@dennisdoomen dennisdoomen requested a review from Copilot August 17, 2025 07:25
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.

Pull Request Overview

This PR introduces the Microsoft.CodeAnalysis.Embedded attribute to prevent internal types from being exposed through InternalsVisibleTo declarations, hardening encapsulation boundaries in the Pathy library.

  • Applies the [Microsoft.CodeAnalysis.Embedded] attribute to internal types and classes
  • Defines a custom EmbeddedAttribute class in the Microsoft.CodeAnalysis namespace
  • Updates project configuration to use PATHY_PUBLIC define instead of MYPACKAGE_COMPILE

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Pathy/ChainablePath.cs Adds EmbeddedAttribute to internal types and defines the attribute class
Pathy.Globbing/PathyGlobbing.cs Applies EmbeddedAttribute to internal extensions class and defines the attribute
Pathy.Globbing/Pathy.Globbing.csproj Changes compile constant from MYPACKAGE_COMPILE to PATHY_PUBLIC
Pathy.Specs/ChainablePathSpecs.cs Removes unused System.Linq import
Multiple API verification files Updates expected public API surface after configuration changes
Package reference updates Updates FluentAssertions, Verify.Xunit, and PackageGuard versions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

Consider a binary package as well

3 participants