Skip to content

control: add missing return after BADREQ in add/rm dep - #582

Merged
davmac314 merged 1 commit into
davmac314:masterfrom
nikitax44:fallthrough-fix
Sep 1, 2026
Merged

control: add missing return after BADREQ in add/rm dep#582
davmac314 merged 1 commit into
davmac314:masterfrom
nikitax44:fallthrough-fix

Conversation

@nikitax44

Copy link
Copy Markdown
Contributor

Firstly, I have read and understand the CONTRIBUTING guide in full.

I'm currently building systemd-like nix API on top of dinit.
While implementing a forward-port of SOFT dependency type to a current dinit version I had noticed that these return statements are missing.
(I would like to discuss bringing SOFT dependencies back in a discussion thread later).

If a request with an unknown dependency type is issued, the dinit will respond with BADREQ+ACK and add the invalid dependency to the service's dependency list (which I think is a bug that should be fixed).

@davmac314

Copy link
Copy Markdown
Owner

This change looks good, thanks.

(I would like to discuss bringing SOFT dependencies back in a discussion thread later).

You're welcome to do that if it needs further discussion, but note that in general you can get the same effect by introducing a stand-in dependency which depends on the relevant two dependencies.

Eg if you want service A with a soft "dependency" on B, you can instead introduce C (type = internal) which depends-on: A and waits-for: B, and then use C in place of A.

@davmac314
davmac314 merged commit a4361fc into davmac314:master Sep 1, 2026
7 checks passed
@nikitax44
nikitax44 deleted the fallthrough-fix branch September 1, 2026 14:31
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