Repository navigation
Prefer the stored schema release over the saving year - #247
Merged
mahach666 merged 1 commit intoNov 16, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #31.
An older year parsed from
BasicFileInfocurrently overrides a recognized newer schema release. That makes the declared element rows and ID widths fail the release checks and can leave an otherwise readable element table empty.Prefer the recognized stored schema release for all existing layout decisions. Use the saving year only when the schema release is unknown. This resolves the policy question in the issue in favor of the schema in either direction; it deliberately replaces the earlier minimum-of-two rule. Declared-width consistency checks and conflicting schema-evidence handling remain in place. Diagnostics now name the actual selected layout for the reverse mismatch too.
Coverage:
Formatyear changes. Model serialization, deterministic IFC and compact JSON with properties match after normalizing only the deliberately changedMetadata.RevitVersionfield. The 2024 case runs with both the native schema reader andR22Layoutgeometry decoding.tests/RvtIO.Tests/Fixtures/README.md. No Revit models or vendor binaries are included.Validation:
dotnet restore RvtIO.slnx --source https://api.nuget.org/v3/index.jsondotnet build RvtIO.slnx -c Release --no-restore: succeeds.dotnet pack RvtIO.slnx -c Release --no-build --no-restore: succeeds.dotnet test tests/RvtIO.Tests/RvtIO.Tests.csproj -c Release --no-build --no-restore:net8.0: 10,812 passed;net10.0: 10,816 passed; 443 skipped and 0 failed per target, with both public fixture variables set.5868285: the three older-saving-year cases fail, confirming the regression.git diff --check: clean.Private fixtures/external corpora were unavailable; the three new public-sample regression cases ran and passed on both targets. Build/pack retain existing nullable/analyzer and
System.IO.Hashingnet8.0 support warnings; the changed files introduce no compiler warnings.Matching-release export comparison against
5868285, using the same CLI options (--ifc,--compact-json,--ifc-timestamp 2026-11-16T00:00:00Z):The intentionally patched year is a regression input, not a claim that Revit writes files with an older saving release than their schema. The change protects decoding from an unreliable text year while preserving the saved year in the returned metadata.