[graph] Disallow input dependencies without registered update#52
Open
arntanguy wants to merge 1 commit intojrl-umi3218:masterfrom
Open
[graph] Disallow input dependencies without registered update#52arntanguy wants to merge 1 commit intojrl-umi3218:masterfrom
arntanguy wants to merge 1 commit intojrl-umi3218:masterfrom
Conversation
a99a717 to
52d7959
Compare
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.
This PR makes sure that we have a registered update function corresponding to an input dependency.
The reasoning is to avoid a potentially misleading edge case when inheriting from a function and declaring updates.
Currently it is possible to do
Here
DerivedFun::Update::Value(=1) is different fromBaseFun::Update::Value(=0), and onlyBaseFun::Update::Valuehas a registered update function. Yet it is possible to declare an input dependency forDerivedFun::Update::Valuethat does not have a corresponding update function. This will only fail at runtime if:DerivedFun::Update::ValueInstead we should either decare
or
This PR merely ensures that we cannot have a call to
addInputDependencywithout a corresponding update function. It however forces the user to always callregisterUpdatesbeforeaddInputDependency, which in practice is already the case with only very few exceptions.