Skip to content

Conversation

@glucaci
Copy link
Member

@glucaci glucaci commented Dec 31, 2025

This pull request introduces several structural and code quality improvements to the Yamlify project. The most significant changes include the extraction and renaming of core YAML style enums into dedicated files, namespace unification, and updates to the source generator to reflect these changes. Additionally, the build configuration has been centralized and improved, and exception classes have been renamed for clarity.

Refactoring and Code Organization

  • Extracted ScalarStyle and CollectionStyle enums from YamlStyles.cs into their own files (src/Yamlify/Common/ScalarStyle.cs, src/Yamlify/Common/CollectionStyle.cs), and removed the old consolidated file. This clarifies the codebase and improves maintainability. [1] [2] [3]
  • Renamed and moved several files and types to unify the namespace under Yamlify (e.g., Mark, YamlTokenType, and exceptions), replacing previous Yamlify.Core and Yamlify.Exceptions usages. [1] [2] [3] [4]

Source Generator Updates

  • Updated the source generator (YamlSourceGenerator.cs) to reference the new locations and names of enums and types, including changes from DiscriminatorPositionMode.Ordered to DiscriminatorPositionMode.PropertyOrder, and updates to property names and type usages. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Exception Renaming

  • Renamed MaximumRecursionDepthExceededException to MaxRecursionDepthExceededException for brevity and consistency, and updated all constructors and references accordingly. [1] [2]

Build and CI Improvements

  • Added a centralized Directory.Build.props file to enforce common build settings, package metadata, and source link configuration across the solution.
  • Added a nuget.config to specify package sources.
  • Updated the CI workflow to include a step for checking breaking API changes using Roslyn analyzers.

Minor Project File Updates

  • Cleaned up the Yamlify.SourceGenerator.csproj by removing redundant nullable and warning settings, since these are now handled centrally.

@glucaci glucaci changed the title refactor: refactor: core types and utilities Dec 31, 2025
@glucaci glucaci changed the title refactor: core types and utilities refactor(core): types and utilities Dec 31, 2025
@glucaci glucaci merged commit 45abe2a into main Jan 1, 2026
1 check passed
@glucaci glucaci deleted the cleanup-api branch January 1, 2026 18:25
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