Skip to content

Report the default's literal as Violation.name for required-with-default - #33

Draft
bfrancojr wants to merge 1 commit into
mainfrom
violation-name-default-literal
Draft

bfrancojr wants to merge 1 commit into
mainfrom
violation-name-default-literal

Conversation

@bfrancojr

Copy link
Copy Markdown
Collaborator

Fixes #30

Violation.name for (pxf.required) with (pxf.default) on one field now holds the default's literal, as decided in trendvidia/protowire-go#211. Python was the last port reporting something else.

Draft, because of the pin. protowire-cpp's fix isn't in a tag: v1.2.1 hasn't been cut. The three workflows pin protowire-cpp to 4e92e324c0226b815f51b76311fd1bf6b0ffeaf5 so CI can prove this, and that is the commit v1.2.1 is intended for. It should become PROTOWIRE_CPP_REF: v1.2.1 before merge, because publish.yml builds wheels from this ref.

Evidence

  • Built locally against 4e92e32: pytest gives 104 passed, 5 skipped.
  • Rebuilt against v1.2.0, the required-with-default tests fail, which shows the build used the pinned checkout and the tests depend on the fix.
  • An empty default gives an empty name, pinned by test_empty_default_gives_an_empty_name.

protowire-cpp now fills name in, so the bridge passes it through instead
of deriving the field name from element.

The workflows pin protowire-cpp by commit until v1.2.1 is tagged.

This branch has not been deployed

No deployments
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.

Report the default's literal as Violation.name for required-with-default

1 participant