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

Replace FieldProxy with @property ref functions #8259

Merged
merged 1 commit into from Oct 3, 2021

Conversation

pbackus
Copy link
Contributor

@pbackus pbackus commented Oct 2, 2021

This simplifies the code and removes the need for a separate
version (StdDdoc) block.

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @pbackus! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8259"

Copy link
Member

@UplinkCoder UplinkCoder left a comment

Choose a reason for hiding this comment

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

Nice!

@UplinkCoder UplinkCoder added the 72h no objection -> merge The PR will be merged if there are no objections raised. label Oct 2, 2021
@CyberShadow
Copy link
Member

LGTM. Unfortunately I can't guess why I didn't do it this way in 2011, ref properties did seem to be working at that point.

@pbackus
Copy link
Contributor Author

pbackus commented Oct 2, 2021

Oops, I forgot the function attributes the first time around (and the test suite didn't catch it—could use better coverage here). Should be good to go now.

Copy link
Member

@maxhaton maxhaton left a comment

Choose a reason for hiding this comment

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

Nice

@pbackus
Copy link
Contributor Author

pbackus commented Oct 2, 2021

Auto-tester is failing on FreeBSD with this message:

core.exception.AssertError@std/process.d(1645): Assertion failure

The test in question is here:

phobos/std/process.d

Lines 1639 to 1647 in 232ca53

// last resort, try lsof (not available on all Posix)
TestScript lsof = "lsof -p$$";
auto lsofRes = execute(lsof.path, null);
if (lsofRes.status == 0)
{
assert(!lsofRes.output.canFind(path));
assert(execute(lsof.path, null, Config.inheritFDs).output.canFind(path));
return;
}

I don't see how this test could possibly be affected by this PR, so I'm going to assume for now it's a flaky test and force-push to re-run.

This simplifies the code and removes the need for a separate
version (StdDdoc) block.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
72h no objection -> merge The PR will be merged if there are no objections raised. auto-merge-squash Refactoring
Projects
None yet
5 participants