Fix a bug in which slot ranges were not correctly inferred cross schema#13
Open
kervel wants to merge 3 commits intop2p-ld:mainfrom
Open
Fix a bug in which slot ranges were not correctly inferred cross schema#13kervel wants to merge 3 commits intop2p-ld:mainfrom
kervel wants to merge 3 commits intop2p-ld:mainfrom
Conversation
Collaborator
kervel
commented
Sep 18, 2025
- work around a missing merge strategy in the merge crate
- fix using the right prefix map when looking up slots
…oss-namespace bug (we should not use a global uri to curi converter anymore since every schema has its own prefix map) and a merge bug (which should eventually be fixed by adding a new merge strategy in the merge crate)
Comment on lines
+12872
to
+12878
|
|
||
| /// Overwrite `left` with `right` unless `right` is `None`. | ||
| fn overwrite_except_none<T>(left: &mut Option<T>, right: Option<T>) { | ||
| if right.is_some() { | ||
| *left = right; | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
maybe important to note - in general with linkml (and elsewhere) we want to be able to differentiate between an explicit None and an unset value. so it should be possible to override a value with an explicit None by providing a None, but if we just don't set the value then we don't overwrite.
Collaborator
Author
There was a problem hiding this comment.
yes, but this is to mimic the dict.update from python.
i need this because i need to merge multiple schemadefinitions (eg the one from the slot range, parent slot range, and slot_usage).
maybe in the gen-rust in linkml i should be able to customize the behaviour of merge here ..
sneakers-the-rat
approved these changes
Sep 22, 2025
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.