Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fail if a dependency does not exist #247

Closed
wants to merge 1 commit into from

Conversation

keianhzo
Copy link
Contributor

@keianhzo keianhzo commented Nov 7, 2023

If a dependency is already removed we are failing to remove and a confusing stacktrace is shown to the user. This PR makes us continue if a dependency doesn't exist maybe because it' been already manually removed.

@keianhzo keianhzo added this to the 1.2.2 milestone Nov 7, 2023
@Exairnous
Copy link
Contributor

But why is the dependency not there in the first place? There should be no way for a user to remove a dependency through the UI. Is this related to components in the BG add-on like BG Grabbable with its BG RigidBody and BG Physics Shape dependencies? If so and these are actual hard dependencies, then I think they need to have the isDependecy property set in their init function like so (or perhaps this property should be automatically set?):

    @classmethod
    def init(cls, obj):
        obj.hubs_component_list.items.get('rigidbody').isDependency = True

Otherwise, if they aren't hard dependencies, then we should probably introduce the concept of soft dependencies (e.g. components that are added with the main component that are likely to be useful, but aren't strictly required) and switch them to be soft.

@keianhzo
Copy link
Contributor Author

keianhzo commented Nov 8, 2023

Oh yeah, i forgot that we had that flag. That will make it. I'll close this. Thanks

@keianhzo keianhzo closed this Nov 8, 2023
@Exairnous
Copy link
Contributor

You're welcome! Happy to help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants