Skip to content

refactor: make Common implementation details internal#1695

Merged
JamieMagee merged 1 commit intomainfrom
jamiemagee/access-modifiers-common
Mar 6, 2026
Merged

refactor: make Common implementation details internal#1695
JamieMagee merged 1 commit intomainfrom
jamiemagee/access-modifiers-common

Conversation

@JamieMagee
Copy link
Copy Markdown
Member

Summary

Make ~50 classes internal in the Common project. These are implementation details not intended to be part of the public API surface.

Categories of changes

Telemetry records (~34 classes):

  • All concrete telemetry records (NuGetProjectAssetsTelemetryRecord, PyPiCacheTelemetryRecord, LinuxScannerTelemetryRecord, etc.)
  • Kept BaseDetectionTelemetryRecord public — subclassed by component-detection-internal

Utility classes:

  • Column, TabularStringFormat, ComponentComparer, DependencyScopeComparer, DirectoryItemFacade(Optimized)

Docker reference exceptions (11 classes)

Concrete service implementations (all registered via DI as interfaces):

  • CommandLineInvocationService, EnvironmentVariableService, PathUtilityService, FileUtilityService, DirectoryUtilityService, DockerService, ConsoleWritingService, SafeFileEnumerableFactory, ComponentStreamEnumerableFactory, FastDirectoryWalkerFactory

Kept public

  • FileWritingService / IFileWritingService — used by sbom-tool
  • ComponentStream, LazyComponentStream — used in detector base class signatures
  • ComponentRecorder — used in Orchestrator public API
  • CommandLineInvocationResult — returned by public interface
  • BaseDetectionTelemetryRecord — subclassed externally
  • All interfaces

Stacked on #1694

Part of #455

@JamieMagee JamieMagee requested a review from a team as a code owner March 6, 2026 05:02
@JamieMagee JamieMagee requested review from AMaini503 and removed request for a team March 6, 2026 05:02
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.0%. Comparing base (68436c2) to head (545a7a2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #1695   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JamieMagee JamieMagee force-pushed the jamiemagee/access-modifiers-detectors branch from 7913f32 to c0bd795 Compare March 6, 2026 17:42
Base automatically changed from jamiemagee/access-modifiers-detectors to main March 6, 2026 21:18
Make ~50 classes internal in the Common project:

- Telemetry records (~34 concrete classes): NuGetProjectAssetsTelemetryRecord,
  PyPiCacheTelemetryRecord, LinuxScannerTelemetryRecord, etc.
  Kept BaseDetectionTelemetryRecord public for external subclassing.
- Utility classes: Column, TabularStringFormat, ComponentComparer,
  DependencyScopeComparer, DirectoryItemFacade(Optimized)
- Docker reference exceptions (11 classes)
- Concrete service implementations: CommandLineInvocationService,
  EnvironmentVariableService, PathUtilityService, FileUtilityService,
  DirectoryUtilityService, DockerService, ConsoleWritingService,
  SafeFileEnumerableFactory, ComponentStreamEnumerableFactory,
  FastDirectoryWalkerFactory

Kept public: FileWritingService, ComponentStream, LazyComponentStream,
ComponentRecorder, CommandLineInvocationResult, CommandLineTelemetryService,
BaseDetectionTelemetryRecord, and all interfaces.

Part of #455
@JamieMagee JamieMagee force-pushed the jamiemagee/access-modifiers-common branch from 0bb1f7f to 545a7a2 Compare March 6, 2026 21:21
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 6, 2026

👋 Hi! It looks like you modified some files in the Detectors folder.
You may need to bump the detector versions if any of the following scenarios apply:

  • The detector detects more or fewer components than before
  • The detector generates different parent/child graph relationships than before
  • The detector generates different devDependencies values than before

If none of the above scenarios apply, feel free to ignore this comment 🙂

@JamieMagee JamieMagee merged commit aeb08db into main Mar 6, 2026
28 of 29 checks passed
@JamieMagee JamieMagee deleted the jamiemagee/access-modifiers-common branch March 6, 2026 21:34
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