-
-
Notifications
You must be signed in to change notification settings - Fork 608
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 23838 - DMD lexer / parser examples might not compile #15106
Conversation
|
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 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
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#15106" |
|
The tests are fixed but are they executed now ?
If the problem is that they rely on DUB maybe something could be added to the buildkite check then ? |
|
No, they are not enabled now. IIRC they were run at some point, but I have no idea why they were disabled. Anyway, the |
| import dmd.console; | ||
| import dmd.arraytypes; | ||
| import dmd.compiler; | ||
| import dmd.frontend; |
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.
frontend is already imported in line 22
I'm not surprised. But I don't know what uses that API outside of the test suite. |
This patch:
dub.sdlfiledub.sdlto contain errorsinkIt seems that the dub tests are not run by the testing pipeline. Anyone knows how to enable them?
If we want dmd as a lib to be usable we should be more careful when breaking the user facing api, such as the constructors of the lexer and parse (cc @WalterBright - you broke the api with your work on the parser/lexer).
Also, one thing to take into account is the fact that the parser expects a null terminated string that is bases as a
const(char)[]. So you either useparseModulefromfrontend.dwhich adds the\0or you need to manually add it (as can be seen in the updated test).