Skip to content

edf: RegisterTypeOf now strictly enforces field visibility checks #211

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

Closed
wants to merge 1 commit into from

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