-
-
Notifications
You must be signed in to change notification settings - Fork 610
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 visiblity and lookup deprecation #7241
Conversation
|
Thanks for your pull request, @MartinNowak! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
7c674ae to
a9906de
Compare
|
If memory serves me well, that should also automatically fix some of the issues we've seen in the past, e.g. |
a9906de to
56368b8
Compare
That at least needs to wait until we also remove the access check which is run after symbol resolution. |
|
You might want to check this out [1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
56368b8 to
ba7f15c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me
|
@MartinNowak status? |
src/ddmd/dscope.d
Outdated
| @@ -647,6 +576,10 @@ struct Scope | |||
| return cast(void*)s; | |||
| } | |||
|
|
|||
| Dsymbol scopesym = null; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test case for this added code?
src/ddmd/dsymbol.d
Outdated
| @@ -697,6 +697,9 @@ extern (C++) class Dsymbol : RootObject | |||
|
|
|||
| if (global.gag) | |||
| return null; // don't do it for speculative compiles; too time consuming | |||
| // search for exact name ignoring visibility first | |||
| if (auto s = search(Loc(), ident, IgnoreErrors | IgnoreSymbolVisibility)) | |||
| return s; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test case for added code?
|
This needs moving forward. @wilzbach I'd put this as something for the next release schedule. |
|
@MartinNowak - please rebase and add coverage tests. |
ba7f15c to
cdc0f4f
Compare
|
(rebased) |
cdc0f4f to
9f6aa3c
Compare
|
@MartinNowak status of this? |
a99e767 to
9aedb20
Compare
This is still needed:
|
9aedb20 to
245460b
Compare
Sorry for the late answer. The overall philosophy (obviously not quite cast in stone yet) is that introspection should be able to bypass protection for object layout. Possibly essential tasks such as construction and destruction. On the other hand, private module-level functions are entirely the business of the respective module and it would be unreasonable to export them just to make them accessible for introspection from another module. Same goes about private member functions. All in all, a topic worth a closer look. |
|
@andralex Where are we with |
|
@jacob-carlborg I think @MartinNowak worked on this recently. |
At the same place as before, allMembers and getMember can see private symbols, and we exempted getMember from the soon to be removed access checks. In any case that's not part of this PR. |
Not sure about your terminology, to clarify this. Line 875 in 59b705c
There are still the old access checks that have been here since ever. Those will be removed once the deprecation phase for visibility ended (this PR). It's weird that a thread with a consensus (https://forum.dlang.org/post/nq512d$9po$1@digitalmars.com) still leaves so much confusion and uncertainty. |
There is an old mechanism (access checks) and a new one (visibility checks). Once visibility is fully deprecated (with this PR), we'll remove the access checks. |
FYI: this has been reduced by Mike to https://issues.dlang.org/show_bug.cgi?id=19107 and been proposed as #8519 |
|
Superseded by #9636 |
No description provided.