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

fix: private is ignored when a public overload exists #95

Closed
mw66 opened this issue Aug 11, 2022 · 7 comments
Closed

fix: private is ignored when a public overload exists #95

mw66 opened this issue Aug 11, 2022 · 7 comments

Comments

@mw66
Copy link

mw66 commented Aug 11, 2022

Description

fix: private is ignored when a public overload exists

--- test.d
void main()
{
    import bar;
    foo(1); // Compiles, violating private.
}
--- bar.d
import std.stdio;

private void foo(int i)
{
    writeln("Private!!!");
}
void foo()
{
    writeln("Public");
}

https://issues.dlang.org/show_bug.cgi?id=21829

ldc-developers/ldc#3772

What are rough milestones of this project?

make apache-thrift build-able using LDC.

How does this project help the D community?

See also: #89

D is on an one man's island having trouble to cooperate with software components in other languages, due to unfixed bugs for a long time:

-- apache-thrift-d, LDC has build failure, because this bug (logged for a year now):

https://issues.dlang.org/show_bug.cgi?id=22083

-- D grpc client cannot talk to Python grpc server, because this bug (logged for 1.5 year now):

huntlabs/grpc-dlang#15

BTW, apache-thrift and grpc are the most important two rpc frameworks used in the industry.

Recommended skills

DMD front-end.

(If applicable, e.g. GSoC/SAoC)

GSoC & SAoC

What can students expect to get out of doing this project?

experience with DMD front-end.

Point of Contact

References

https://issues.dlang.org/show_bug.cgi?id=21829

ldc-developers/ldc#3772

@Geod24
Copy link
Member

Geod24 commented Aug 12, 2022

Fixing an issue is usually not a good fit for a project. In that specific case, workarounds exist to make apache-thrift compile, don't they ?

@mw66
Copy link
Author

mw66 commented Aug 12, 2022

If you check this comments: it's a non-trivial bug:

dlang/dmd#13257 (comment)

@Geod24
Copy link
Member

Geod24 commented Aug 12, 2022

It might be, but doesn't it have a trivial workaround ? Namely a static or renamed import ?

@mw66
Copy link
Author

mw66 commented Aug 12, 2022

Yes, but thrift guys do not want to take my workaround PR.

It's a frontend bug anyway; and if we fix it, it help all the D projects.

@BorisCarvajal
Copy link
Member

BorisCarvajal commented Aug 12, 2022

I think this should go to the "Discussion" tab on DMD repo.
I have a working fix but it's not so elegant so I never committed to it, gonna check it over again.

@mw66
Copy link
Author

mw66 commented Aug 12, 2022

@BorisCarvajal as long as it's working, it better than the current situation.

I think you should create a PR, and let people comment on it, maybe others can give better suggestions to improve it.

@RazvanN7
Copy link
Contributor

RazvanN7 commented Feb 7, 2023

Anyway, this is not a project.

@RazvanN7 RazvanN7 closed this as completed Feb 7, 2023
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

No branches or pull requests

4 participants