phobos icon indicating copy to clipboard operation
phobos copied to clipboard

Fix issue 21000 - allow use of std{in,out,err} with -preview=noshared…

Open atilaneves opened this issue 3 years ago • 4 comments

…access

atilaneves avatar Sep 09 '22 19:09 atilaneves

Thanks for your pull request and interest in making D better, @atilaneves! 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

Auto-close Bugzilla Severity Description
21000 enhancement -preview=nosharedaccess precludes use of stdin,stdout,stderr

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#8562"

dlang-bot avatar Sep 09 '22 19:09 dlang-bot

I don't know how to prove this works other than to say I tried it manually. I can't add the preview flag since this particular issue was covering up many more.

atilaneves avatar Sep 09 '22 19:09 atilaneves

There are some stand-alone tests in the test directory, maybe that would be a good place?

CyberShadow avatar Sep 09 '22 19:09 CyberShadow

ping @atilaneves

RazvanN7 avatar Sep 19 '22 07:09 RazvanN7

There are 2 ways we can go about this:

(1) add a test in the tests directory and compile it with -preview=nosharedaccess; this seems like an unpopular path since there are only 3 tests in that directory.

(2) continue fixing this up and put this test in a unittest once we are able to compile phobos with -preview=nosharedaccess`; I am inclined to go down this route as long as you are pursuing it @atilaneves .

Let me know what you prefer.

RazvanN7 avatar Sep 23 '22 03:09 RazvanN7

For now I'd prefer to put it in the test directory, but I don't see anything in the Makefile that runs those except for explicitly running the betterC tests.

TBH I think that this is overkill given that this is necessary and I'd be in favour of merging as-is.

atilaneves avatar Oct 04 '22 16:10 atilaneves