Skip to content

Comments

fix issue 16966 - rdmd: AssertError@rdmd.d(489): should have been cre…#204

Merged
andralex merged 1 commit intodlang:masterfrom
aG0aep6G:16966
Dec 22, 2016
Merged

fix issue 16966 - rdmd: AssertError@rdmd.d(489): should have been cre…#204
andralex merged 1 commit intodlang:masterfrom
aG0aep6G:16966

Conversation

@aG0aep6G
Copy link
Contributor

…ated by compileRootAndGetDeps

The bug:

rdmd test.d
rdmd --build-only test.d

On the first run everything is fine.

On the second run, compileRootAndGetDeps looks at rdmd.deps to decide if it needs to compile the root module. rdmd.deps is present from the first build, so it looks like everything is up to date and there's apparently no reason to rebuild the root module. But the specified executable doesn't exist, so some code in main correctly decides that a rebuild is needed. The build cannot succeed without the root object, of course.

This fix:

I'm passing main's lastBuildTime to compileRootAndGetDeps and check there if the root module needs to be compiled even when the dependencies don't need to be obtained.

That complicates compileRootAndGetDeps some more. I'm not really happy with my fix here, but I can't seem to come up with something nicer. rdmd could probably use some refactorings.

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
16966 rdmd: AssertError@rdmd.d(489): should have been created by compileRootAndGetDeps

@andralex andralex merged commit 3353e63 into dlang:master Dec 22, 2016
@CyberShadow
Copy link
Member

CyberShadow commented Dec 22, 2016 via email

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

Successfully merging this pull request may close these issues.

4 participants