Skip to content

Conversation

@chopdown
Copy link

@chopdown chopdown commented Mar 8, 2025

Changes:
EDF RegisterTypeOf now strictly enforces field visibility checks.

Related: #209 #210

@halturin
Copy link
Collaborator

halturin commented Mar 8, 2025

misleading PR description

BREAKING CHANGE
Unexported (non-public) fields are no longer serialized/deserialized.

EDF has never supported it. It always falls on the decoding of the unexported field.

@chopdown
Copy link
Author

chopdown commented Mar 8, 2025

misleading PR description

BREAKING CHANGE
Unexported (non-public) fields are no longer serialized/deserialized.

EDF has never supported it. It always falls on the decoding of the unexported field.

Apologies, I'm not very familiar with ergo. I've revised the description and commit messages accordingly.

@halturin
Copy link
Collaborator

halturin commented Mar 8, 2025

Please fix the title to reflect what this change does.

@chopdown chopdown changed the title fix(edf): remove support for unexported fields edf: RegisterTypeOf now strictly enforces field visibility checks Mar 8, 2025
f := tov.Field(i)
ft := f.Type

if f.IsExported() == false {
Copy link

Choose a reason for hiding this comment

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

Suggested change
if f.IsExported() == false {
if !f.IsExported(){

This is nit

Copy link
Collaborator

Choose a reason for hiding this comment

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

I personally prefer to use more readable way of such expressions.

@halturin
Copy link
Collaborator

It's been fixed in v310 branch already

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.

3 participants