Skip to content

Wire Mqtt OBS5004 member shape and OBS5005 Reactive diagnostics#67

Merged
Skymly merged 1 commit into
mainfrom
feature/mqtt/obs5004-parser
Jun 6, 2026
Merged

Wire Mqtt OBS5004 member shape and OBS5005 Reactive diagnostics#67
Skymly merged 1 commit into
mainfrom
feature/mqtt/obs5004-parser

Conversation

@Skymly
Copy link
Copy Markdown
Owner

@Skymly Skymly commented Jun 6, 2026

Summary

  • Emit OBS5004 for Mqtt boundary attribute / member shape mismatches
  • Emit OBS5005 via shared ObservableReturnTypeParser when R3 generator sees IObservable<T>

Test plan

  • Generator tests OBS5004 / OBS5005
  • CI build-test + pack

Closes #62


Note

Low Risk
Changes are confined to compile-time source generator diagnostics and tests; no runtime MQTT or API behavior changes.

Overview
The MQTT source generator now reports OBS5004 when publish/subscribe attributes are on the wrong member kind: [MqttSubscribe] on a method or [MqttPublish] on a property, instead of treating those as generic invalid members.

Observable return-type validation in Parser is routed through shared ObservableReturnTypeParser, so the R3 generator can emit OBS5005 when an interface uses IObservable<T> without the Reactive package reference, alongside existing unsupported-return handling.

R3 generator tests assert OBS5004 and OBS5005 appear in the diagnostic snapshot for those scenarios.

Reviewed by Cursor Bugbot for commit b274dc4. Configure here.

1、Report OBS5004 when MqttPublish/MqttSubscribe used on wrong member shape

2、Use ObservableReturnTypeParser to emit OBS5005 on R3 generator for IObservable

3、Add generator tests for OBS5004 and OBS5005

Closes #62
@Skymly Skymly merged commit db26bc9 into main Jun 6, 2026
@Skymly Skymly deleted the feature/mqtt/obs5004-parser branch June 6, 2026 12:42
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.

Wire Mqtt OBS5004 member shape and OBS5005 Reactive package diagnostics

1 participant