-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
examples/generated-source does not work. Regression in preGenerateCommands. #1474
Comments
For reference: forum post and failing use case https://forum.dlang.org/post/[email protected] |
As a work-around, Travis builds can be fixed by prepending a dummy |
If all sources are generated, the error is different: Edit: The workaround for this case is different: adding an empty |
A PoC fix for this #1708 |
The updated image is using SDK 10.14 (instead of 10.8) and is running Ubuntu 18.04. Unfortunately, the dmd version provided by 18.04 fails to build the dlang interface using dub (see dlang/dub#1474 for more details). Thus, dlang has been disabled until a fix is published.
@wilzbach my assumption is, the use case is wrong. The pre generate commands are executed "always". Generating source code using pre generate commands causing therefore a painful behavior as in the referenced issue from @MikeWey. |
I don't understand. As I read it, gtkd-developers/GlibD#6 (comment), @MikeWey says the opposite, that using preBuildCommands won't work in a fresh checkout. That's also my experience. You need commands that are always executed, so preGenerateCommands. The commands themselves should be smart enough to not generate code unnecessarily, e.g. |
@veelo my understanding is, pregenerate and prebuilt commands both suffers from a similar bug. I would say @MikeWey describes this in the first section. The list of known source files must be refreshed after both execution. Of course preGenerateCommands can implement a logic to generate code only when necessary. In my opinion this additional logic is superfluous if you use preBuildCommands. |
@veelo is right here, with the main logical problem being that pre-build commands are potentially out of reach for dub (e.g. when a Visual Studio solution is generated). The only workaround would be to inject something like a So in short, we could make pre-buid commands work for |
How? Dub will need to know on what condition to execute the commands. A proposal: #1857. |
Fixed in #2035 |
System information
Bug Description
examples/generated-sources
does not work.How to reproduce?
Produces a link error. A second invocation of
dub
succeeds.Expected Behavior
Success upon initial invocation.
Logs
Maybe add this to the
test
directory? (Make sure the generated file is deleted before the test is run.) This is a regression, see issue #144.The text was updated successfully, but these errors were encountered: