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

Give error/warning when removing component (service) that is not in the system #1023

Closed
rodrigomha opened this issue Oct 25, 2023 · 3 comments
Assignees
Labels

Comments

@rodrigomha
Copy link
Contributor

Currently, you are allowed to remove a service from another system if they have the same name (I think) but then it breaks the uuid from devices that have the service.

@daniel-thom
Copy link
Contributor

The title of this issue seems to conflict with the description.

Regarding the title, if you call remove_component!(Service, sys, name) and there is no such service stored, it should throw an exception. Are you saying that this doesn’t work? (The exact Service type must be concrete.)

Regarding the description, the function signature is as follows:

function remove_component!(
    ::Type{T},
    sys::System,
    name::AbstractString,
) where {T <: Component}

If the system has a service matching type and name, it will be removed. If you call this on the wrong system, how can we detect that?

@rodrigomha
Copy link
Contributor Author

I believe this issue was more complicated than this. I'm killing myself here for not adding the code that created this issue, and I'm not able to replicate this issue.

I'm guessing this could be related with #1016, of adding the same service in two different systems, and then trying to remove one, creating issues in another system.

This is my bad, since I can't recall what was the test case I was using for this issue. @jd-lara Do you remember exactly about this issue? If not, we can close it for now, and re-open it once we encounter it again.

@daniel-thom
Copy link
Contributor

Since #1016 is fixed and this issue can’t be reproduced, I’ll close it.

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

No branches or pull requests

2 participants