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

Confusing error for unconsumed message #13

Closed
drahnr opened this issue Oct 24, 2022 · 0 comments · Fixed by #15
Closed

Confusing error for unconsumed message #13

drahnr opened this issue Oct 24, 2022 · 0 comments · Fixed by #15

Comments

@drahnr
Copy link
Collaborator

drahnr commented Oct 24, 2022

#[orchestra(gen=AllMessages, ..)]
struct X {
#[subsystem(MsgA, sends: [Unconsumed])
foo: Foo,
#[subsystem(MsgB, sends: [Unconsumed])
bar: Bar,
}

will raise an error about missing enum variant AllMessages::Unconsumed which is non-obvious how to resolve.

Will be obsoleted once #11 is implemented, would possibly make sense to add a sense check to the proc-macro for the time being.
CC @MathisWellmann

drahnr added a commit that referenced this issue Dec 8, 2022
If a message type is never sent or never received,
this leads to From<$ty> implementations being missing.

The implementation here adds a check and throws and error
pointint to the messages.

Closes #13
drahnr added a commit that referenced this issue Dec 8, 2022
If a message type is never sent or never received,
this leads to From<$ty> implementations being missing.

The implementation here adds a check and throws and error
pointint to the messages.

Closes #13
drahnr added a commit that referenced this issue Dec 9, 2022
If a message type is never sent or never received,
this leads to From<$ty> implementations being missing.

The implementation here adds a check and throws and error
pointint to the messages.

Closes #13

Signed-off-by: Bernhard Schuster <bernhard@ahoi.io>
@drahnr drahnr closed this as completed in #15 Dec 9, 2022
drahnr added a commit that referenced this issue Dec 9, 2022
…#15)

Error out if a message is not sent that is consumed and vice versa

If a message type is never sent or never received,
this leads to From<$ty> implementations being missing.

The implementation here adds a check and throws and error
pointing to the messages in question.

It also allows to skip the consuming message without a placeholder
and generated a dummy message of the form "{$ty}Message" which
have to be imported for those subsystems.

Closes #13

Signed-off-by: Bernhard Schuster <bernhard@ahoi.io>
drahnr added a commit that referenced this issue Dec 13, 2022
…#15)

Error out if a message is not sent that is consumed and vice versa

If a message type is never sent or never received,
this leads to From<$ty> implementations being missing.

The implementation here adds a check and throws and error
pointing to the messages in question.

It also allows to skip the consuming message without a placeholder
and generated a dummy message of the form "{$ty}Message" which
have to be imported for those subsystems.

Closes #13

Signed-off-by: Bernhard Schuster <bernhard@ahoi.io>
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 a pull request may close this issue.

1 participant