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

add ascii to functional #7501

Closed
wants to merge 1 commit into from
Closed

add ascii to functional #7501

wants to merge 1 commit into from

Conversation

heavyk
Copy link

@heavyk heavyk commented May 28, 2020

ran into this when trying to install dlangide

fixes buggins/dlangide#398

@heavyk heavyk requested a review from andralex as a code owner May 28, 2020 03:07
@dlang-bot
Copy link
Contributor

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

Copy link
Contributor

@thewilsonator thewilsonator left a comment

Choose a reason for hiding this comment

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

I'm not entirely sure that this is a phobos bug and should be fixed here, but at the very least this import should go on line 213-214. See also unaryFun

Copy link
Contributor

@MoonlightSentinel MoonlightSentinel left a comment

Choose a reason for hiding this comment

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

Sorry, but buggins/dlangide#398 not a phobos issue. String mixin's are evaluated in the scope of the mixin statement (=> std.functional.binaryFun) and not in the module where reduce is instantiated. Use a lambda instead if you need access to local symbols.

One could consider an enhancement request to binaryFun and frieds which add an import std; to it's implementation but that has some other problems, e.g. name conflicts for symbols from different modules (std.file.write vs. std.stdio.write).

@@ -68,6 +68,7 @@ module std.functional;

import std.meta : AliasSeq, Reverse;
import std.traits : isCallable, Parameters;
import std.ascii;
Copy link
Contributor

Choose a reason for hiding this comment

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

Surely this can't be the way forward. Why exactly can't this be local?

Copy link
Contributor

Choose a reason for hiding this comment

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

See the other two comments.

Copy link
Contributor

Choose a reason for hiding this comment

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

I did. Still not 100% sure.

@heavyk
Copy link
Author

heavyk commented May 28, 2020

ok, just let me know what you want me to change when it's decided :)

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

You should try to get this fix merged instead.

@heavyk
Copy link
Author

heavyk commented Jun 14, 2020

@NilsLankila yes that seems quite appropriate, actually. nevermind then :)

@heavyk heavyk closed this Jun 14, 2020
@heavyk heavyk deleted the patch-1 branch June 24, 2020 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants