Fix VariantPaths: strict v2.0 serialization, src arch support, and public Location API#231
Merged
lubomir merged 2 commits intorelease-engineering:developmentfrom Mar 13, 2026
Conversation
…dd set_location/get_location API, and enforce strict v2.0 serialization Assisted-by: Claude Opus
Contributor
|
I have closed #229, that's not really a problem with the code, but bad usage. It might make sense to emit some warnings if the arch key under any path doesn't match architecture configured for the variant though. |
… arches Assisted-by: Claude Opus
lubomir
approved these changes
Mar 13, 2026
| "arches": ["x86_64"], | ||
| "paths": { | ||
| "repository": {"x86_64": "BaseOS/x86_64/os"}, | ||
| "source_repository": {"src": "BaseOS/source/os"}, |
Contributor
There was a problem hiding this comment.
In theory this should never be the case. Even for source repository, there should not be a pseudoarch in the dict.
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.
Summary
source_repositoryand other paths keyed by pseudo-arches like"src"being silently dropped during serialization and deserializationset_location()/get_location()public API for setting Location objects on variant pathssetattrloop with explicit attribute declarations for LSP visibility_serialize_v2— raisesValueErrorif no Location is set_deserialize_v2— raisesTypeErroron malformed v2.0 data_serialize_v1handles Location objects in field dicts by extractinglocal_pathconvert.pyuses the public API instead of accessing_locationsdirectlyFixes: