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

Generate custom message types in proto file #379

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

astarche
Copy link
Collaborator

@astarche astarche commented Oct 7, 2021

Breaking Change

This fixes codegen of several types in nidaqmx that were capitalized counter to proto style rules. See change to nidaqmx.proto. This does not break existing generated clients, but calling code will have to be updated after the next protoc.
Affected messages:

  • AnalogPowerUpChannelsAndState
  • WatchdogExpChannelsAndState
  • DigitalPowerUpTypeAndChannel
  • DigitalPowerUpChannelsAndState
  • DigitalPullUpPullDownChannelsAndState
  • AnalogPowerUpChannelAndType

What does this Pull Request accomplish?

Auto-generate the custom messages from config.py instead of relying on duplicate definitions in custom_proto.mako.

Remove custom_proto.mako files that previously contained custom messages.

Fix-up some codegen that was incorrectly using camel-case for field names (and codegen that was compensating for that).

Why should this Pull Request be merged?

Encoding both was tedious and was hiding a bug in field casing.

What testing has been done?

Ran and passed all unit and integration tests. Ran and passed a cross-section of system tests.

Copy link

@gregstoll gregstoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for doing this!

@astarche astarche merged commit 84ed737 into ni:main Oct 8, 2021
@astarche astarche deleted the users/astarche/generate-custom-mako branch October 8, 2021 18:23
@astarche astarche added the binary-breaking Change to proto file that requires client updates label Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binary-breaking Change to proto file that requires client updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants