Skip to content

Refactor SourceType handling to enum#6313

Open
Trenly wants to merge 4 commits into
microsoft:masterfrom
Trenly:trenly/source-type-enum-4463
Open

Refactor SourceType handling to enum#6313
Trenly wants to merge 4 commits into
microsoft:masterfrom
Trenly:trenly/source-type-enum-4463

Conversation

@Trenly

@Trenly Trenly commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

📖 Description

This refactor moves internal source-type handling to Repository::SourceType enum paths across repository, CLI, and COM layers, while preserving string conversion only at external boundaries (CLI/JSON/GP/COM input-output). It also removes accidental string-based source construction paths and updates source-related tests/fixtures to use canonical source type values.

Key changes include:

  • SourceDetails.Type and internal source factory routing now use SourceType.
  • ISourceFactory::GetForType now takes SourceType.
  • Source constructor string-type overload removal and default-type string helper removal at call sites.
  • Source parsing/serialization boundaries explicitly convert using TryConvertToSourceTypeEnum/SourceTypeEnumToString.
  • Source-related tests updated for enum semantics, including legacy tombstone/override source-list parsing compatibility.

Copilot assisted with implementation.

🔗 References

Resolves #4463

🔍 Validation

  • Executed source-focused test subset:
    • ./src/x64/Debug/AppInstallerCLITests/AppInstallerCLITests.exe -v high -d yes 'Source'

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

Trenly and others added 4 commits June 21, 2026 16:08
Migrate SourceDetails and source factory internals to use SourceType enum paths while keeping string conversion at input/output boundaries.

Align CLI/COM/repository flows and source-related tests with canonical enum conversion behavior, and keep legacy user source tombstone/override parsing behavior intact.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Trenly Trenly marked this pull request as ready for review June 21, 2026 21:30
@Trenly Trenly requested a review from a team as a code owner June 21, 2026 21:30
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.

Move SourceType to an Enum

1 participant