Conversation
…ecords Object records in the versioning test datasets record what a type is called but not where it is declared, so a consumer reading one has only a type name. Method records do not have this problem: a method's declaring type is serialised assembly-qualified. Adds an `_asm` field naming the assembly the object's type came from. One property read, one field written, on the successful records only. The field is added after the ToJson, FromJson and IsEqual checks, so those run on the record as serialised and the method's verdict is unchanged. The output tuple is unchanged. Method records are skipped. The field is placed immediately before `_bhomVersion` so it sits past the positional indices Helpers.DescriptionFromJson reads. Inert to existing readers: the deserialiser skips fields whose name begins with an underscore.
sakanni
marked this pull request as ready for review
September 14, 2026 14:27
sakanni
requested review from
a team,
adecler and
peterjamesnugent
and removed request for
adecler and
peterjamesnugent
September 14, 2026 14:27
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.
Issues addressed by this PR
Object records say what a type is called, not where it is declared. Anything working out which repository a record belongs to has to guess from the namespace, and namespaces are shared, so it guesses wrong. Method records are fine, because a method's declaring type is serialised assembly-qualified. This adds an
_asmfield naming the declaring assembly. It has to happen at capture, because that is the only point in the chain where a live object still exists.9.3's dataset will need the declaring assembly backfilled by hand, as 9.2's did. That is expected. This change is what stops it repeating from 10.0 onward.
Two things it cannot disturb, both checked. The merge step keys on assembly and type name rather than on the record text, so adding a field cannot change what merges with what. BHoMBot does not read record contents: its only contact with datasets selects files by name and passes a path.
Not verified: the capture pipeline itself, which needs Grasshopper and two Rhino versions to run, and the worker process the checks hand off to.
Test files
TryToJsonAndFromJsonAndCheckIfEqualover 400 dummied object types, this branch againstdevelop: tuple width, all eight output counts and their membership identical, and with_asmremoved the 400 records are byte-identical.Helpers.DescriptionFromJsonoutput unchanged on all 400. No existing test is modified.Changelog
Captured object records carry
_asm, naming the assembly that declares the object's type.Additional comments
Nothing reads
_asmuntil BHoM/CI_Toolkit#22 lands, and existing readers ignore it, because the deserialiser skips any field whose name begins with an underscore.The field is added after
ToJson,FromJsonandIsEqualhave run and only to the successful list, so this method's own verdict cannot change. The output tuple is unchanged, content-only inside output 0, because the capture scripts bind to these outputs by position and had to be rebound by hand the last time it widened. The field sits immediately before_bhomVersion, whichVersioning_Engineappends last, keeping it clear of the fixed quote-delimited indicesHelpers.DescriptionFromJsonreads.Method records are skipped on their top-level type being
System.Reflection.MethodBase. That one rests on the code path rather than the measurement, which contains noMethodBase. A type whose assembly cannot be named is left untouched rather than guessed.