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 Issue 23977 - [REG2.102] cannot use getSymbolsByUDA on template struct with alias member #8775

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

RazvanN7
Copy link
Collaborator

@RazvanN7 RazvanN7 commented Jun 29, 2023

Need to exclude expressions when looking to get attributes.

@RazvanN7 RazvanN7 added the Regression PRs that fix regressions label Jun 29, 2023
@dlang-bot
Copy link
Contributor

dlang-bot commented Jun 29, 2023

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

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

  • In preparation for migrating from Bugzilla to GitHub Issues, the issue reference syntax has changed. Please add the word "Bugzilla" to issue references. For example, Fix Bugzilla Issue 12345 or Fix Bugzilla 12345.(Reminder: the edit needs to be done in the Git commit message, not the GitHub pull request.)

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 "stable + phobos#8775"

// exclude basic types and derived types
(isType!member && !isAggregateType!member && !is(member == enum)) ||
// exclude aliases to expressions such as string literals
__traits(compiles, { auto ex = member; }))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is probably not the best idea to test if member is an expression. I took inspiration from the isExpressions template. I did not want to use it to not cause avoidable template bloat.

@RazvanN7
Copy link
Collaborator Author

RazvanN7 commented Jun 29, 2023

I have a hard time understanding why this change causes a linker error:

generated/linux/release/64/unittest/libphobos2-ut.so: error: undefined reference to '_D11TypeInfo_BZ6__initZ'

So, there's some B symbol for which the init is not generated?

Probably a compiler bug.

@JohanEngelen
Copy link
Contributor

Ping, this bug is still preventing Weka from using newer compilers. Thanks!

@RazvanN7 RazvanN7 changed the title Fix Issue 23977 - [REG2.102] cannot use getSymbolsByUDA on template s[REG2.102] cannot use getSymbolsByUDA on template struct with alias member Fix Issue 23977 - [REG2.102] cannot use getSymbolsByUDA on template struct with alias member Apr 4, 2024
@thewilsonator thewilsonator added the Salvage This PR needs work, but we want to keep it and it can be salvaged. label Oct 27, 2024
@LightBender
Copy link
Contributor

@RazvanN7 is there anything we can do about this? Regressions are high priority and we'd like to get this fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Regression PRs that fix regressions Salvage This PR needs work, but we want to keep it and it can be salvaged.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

5 participants