-
-
Notifications
You must be signed in to change notification settings - Fork 412
Fix import from rt.config #2032
Conversation
|
Thanks for your pull request, @belka-ew! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla references
|
|
Thanks. Happens even without -unittest. Looks like a regression (-deps has changed it's meaning, unfortunately, but having the import in a core module is incorrect anyway) so should be better targeting the stable branch. A bugzilla report should also be added so it appears in the changelog. |
Should I close this PR then? It was introduced by d757a7d. |
No, it should be switched to target "stable" (click "Edit" for the title) and a bugzilla entry should be added at https://issues.dlang.org/ |
|
It seems I messed it up. My branch is created from master. GitHub web interface allows to change the target branch only, not to rebase on another branch. |
|
You can just rebase locally your branch on stable and push the new state to your remote and this PR will be in a good shape again :-) |
… be read (edit) src/rt isn't shipped with druntime's imports, so it can't be imported directly from core.runtime. This PR fixes importing rt.config from a public druntime module by replacing it with an extern definition. To reproduce the bug create a file that imports 'core.runtime' and compile it with: dmd -unittest -deps filename.d The error is: /usr/include/dmd/druntime/import/core/runtime.d(653): Error: module config is in file 'rt/config.d' which cannot be read
PetarKirov
left a comment
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.
Thanks, LGTM.
|
FYI: there are two more imports: Lines 713 to 718 in 7bfaa8c
Lines 305 to 309 in 7bfaa8c
|
|
Also this should have been accompanied by a unittest, s.t. the regression can't happen again. |
|
Also @ other reviewers. This would have never been merged, because for auto-tester new users need to be approved. So if auto-tester doesn't show up in the list of CIs, head over and you will see this screen: @belka-ew I just clicked on "Approve" ;-) |
|
I'll add a test this week. Can't promise to do it today. |
If you ask like this, I can't really say no ;-)
You probably have to add a new directory to |
There seems to be a very generic problem with druntime tests. It is just a note, I still need some time to experiment with the test runner. |
|
I couldn't find a better way to write the test. Is it ok? If so, I'll try to fix other two imports. |
wilzbach
left a comment
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.
Thanks. Looks good! Not so happy about the symlinks though.
test/imports/src/core
Outdated
| @@ -0,0 +1 @@ | |||
| ../../../src/core No newline at end of file | |||
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.
Hmm, why do you need these files?
dmd isn't used with -conf= and will use the import path of druntime. If you don't trust it, you can always add -I../../import?
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.
It fails: https://circleci.com/gh/dlang/druntime/1546
Testing bug18193
/home/circleci/dmd/generated/linux/release/64/dmd -o- -deps=generated/linux/debug/64/bug18193.done -Isrc -I../../import src/bug18193
Error: cannot find source code for runtime library file 'object.d'
dmd might not be correctly installed. Run 'dmd -man' for installation instructions.
config file: /home/circleci/dmd/generated/linux/release/64/dmd.conf
|
The fix for the second part: |
|
The problem seems to be that the tests are run without the import files being copied over from the source directory. That's why the other tests specify -I../../src, too. |
|
Any chance to get it merged with or without the tests before 2.080.1? As said it is a general problem with the makefiles, which prevents such bugs from being found. And this problem is not related to this regression introduced in 2.080.0 and can be fixed in another PR. I can create an issue if needed. |
|
I added 3d153f8 to your PR. I think that should solve the problem. Sorry for the delay. |
|
Looks all good. @belka-ew do you mind if I squash your last three commits into one? No need to keep the experiments in the history. |
|
@wilzbach, thanks for your fast response. I squashed the commits and added the fixes for |
|
I assume that the tests fail because code.dlang.org is dead? |
|
No the DUB registry outage was only for two hours and we have mirrors:
Might be related to: dlang/ci#118
2.072.0 doesn't come with mirrors, will look into upgrading it. In the mean time I will |
I already did so, it's just not in |

src/rt isn't shipped with druntime's imports, so it can't be
imported directly from core.runtime. This PR fixes importing rt.config
from a public druntime module by replacing it with an extern
definition.
To reproduce the bug create a file that imports 'core.runtime' and
compile it with:
dmd -unittest -deps filename.d
The error is:
/usr/include/dmd/druntime/import/core/runtime.d(653): Error: module
config is in file 'rt/config.d' which cannot be read