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

Remove protected metadata #3382

Merged
merged 10 commits into from
Jan 21, 2025
Merged

Remove protected metadata #3382

merged 10 commits into from
Jan 21, 2025

Conversation

pepone
Copy link
Member

@pepone pepone commented Jan 20, 2025

Fix #3360

Copy link
Member

@bernardnormier bernardnormier left a comment

Choose a reason for hiding this comment

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

Looks good, except I would remove the protected tests, not leave them behind without protected.

@@ -61,15 +61,15 @@ class D
bool postUnmarshalInvoked;
}

["protected"] class E
Copy link
Member

Choose a reason for hiding this comment

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

We should remove these tests since they were apparently all about testing protected.

@@ -149,7 +149,7 @@ exception RequiredException extends OptionalException
class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
Copy link
Member

Choose a reason for hiding this comment

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

Same here. lp is the same as l (great name) except protected.

Copy link
Member

@InsertCreativityHere InsertCreativityHere left a comment

Choose a reason for hiding this comment

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

Looks good, but I agree we should get rid of the lp field in the Ice/optional test.

It looks like we use E in the Ice/Objects test for other purposes. So maybe that one is fine to leave.

@@ -2258,55 +2258,15 @@ Slice::Gen::DataDefVisitor::visitClassDefEnd(const ClassDefPtr& p)

// Emit data members. Access visibility may be specified by metadata.
const DataMemberList dataMembers = p->dataMembers();
const bool prot = p->hasMetadata("protected");
bool inProtected = false;
bool needSp = true;

Choose a reason for hiding this comment

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

What does the formatting look like without needSp?
It seems like this field was for emitting a newline before the first data member, more than it was for protected stuff.

cpp/test/Slice/errorDetection/WarningInvalidMetadata.ice Outdated Show resolved Hide resolved
cpp/test/Slice/errorDetection/WarningInvalidMetadata.ice Outdated Show resolved Hide resolved
cpp/test/Slice/errorDetection/WarningInvalidMetadata.ice Outdated Show resolved Hide resolved
@pepone pepone merged commit 1217034 into zeroc-ice:main Jan 21, 2025
24 checks passed
InsertCreativityHere pushed a commit to InsertCreativityHere/compiler-comparison that referenced this pull request Jan 21, 2025
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.

Remove protected Slice metadata
3 participants