Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
|
That won't work, because the file doesn't exists yet. Either conditionally check for it (the most resilient approach) or copy it in DMD before merging this PR. |
0d6e67d to
385b39f
Compare
|
@CyberShadow in CyberShadow/DAutoTest: Note the wrong -J../dmd/res Where is this coming from? If I grep for textfilter I get no hits anywhere in the dlang.org repository. |
|
@Geod24 yeah, well, if I leave the file in both places, then I can never escape the trap of needing to pull both PRs for either to work, since I am unable to otherwise find all the places where dmd/res is hardwired into dlang.org. |
Well no you just need to copy it, pull, then have a pull to remove it, and once it goes green you know you're done ? |
Of course, it's a dub sub package of Vibe.d.
As you have found this is the only hard-wired for the ddox build: https://github.com/dlang/dlang.org/blob/master/posix.mak#L741 Also, this won't fully work yet as for the ddoc the preprocessor uses DMD as library (via DUB): https://github.com/dlang/dlang.org/blob/master/ddoc/dub.sdl You will need to duplicate the file first before being able to remove all references or at least update the dub.sdl at dmd. edit: the build currently fails because of DMD doesn't support multiple arguments with either semi-colon or comma separation. See dlang/dmd#7863 for details. |
posix.mak
Outdated
| find ${PHOBOS_LATEST_DIR}/etc ${PHOBOS_LATEST_DIR}/std -name '*.d' | \ | ||
| sed -e /unittest.d/d | sort >> $G/.latest-files.txt | ||
| ${DMD_LATEST} -J$(DMD_LATEST_DIR)/res -J$(dir $(DMD_LATEST)) -c -o- -version=CoreDdoc \ | ||
| ${DMD_LATEST} -J$(DMD_LATEST_DIR)/src/dmd/res;$(DMD_LATEST_DIR)/res -J$(dir $(DMD_LATEST)) -c -o- -version=CoreDdoc \ |
There was a problem hiding this comment.
DMD doesn't support multiple options with comma or semicolon. You rejected this a while ago: dlang/dmd#7863
There was a problem hiding this comment.
Are you sure? I looked at the source code, and there's code to do it (buildPath() in mars.d which calls FileName.splitPath()). I tried an example, and it works.
There was a problem hiding this comment.
Well, I still think that it's still the reason why the CI fails.
Why not just do:
| ${DMD_LATEST} -J$(DMD_LATEST_DIR)/src/dmd/res;$(DMD_LATEST_DIR)/res -J$(dir $(DMD_LATEST)) -c -o- -version=CoreDdoc \ | |
| ${DMD_LATEST} -J$(DMD_LATEST_DIR)/src/dmd/res -J$(DMD_LATEST_DIR)/res -J$(dir $(DMD_LATEST)) -c -o- -version=CoreDdoc \ |
I think you need to updae |
If you mean dmd/dub.sdl, it's already done in dlang/dmd#11269 Egg, meet chicken. Chicken, meet egg! |
So I put it in both places, it goes green. I remove it from dmd first, now dlang fails because it's dependent on the old. But if I fix dlang first, it doesn't work because it isn't in the right place. |
|
Yes, you need to do it in 3 steps: 1. Add it in the new place 2. Change the other repository to use the new place, and 3. Remove it from the old place. |
Why wouldn't it be in the right place, if you duplicated it in the first place ? |
Tried that. Doesn't seem to work, either. |
|
Using two separate |
The difficulty with that is what I'm having now - I can't find all the places of "use the new place". Part of the reason for that is un-informative log files. By following your suggestion, I do a loop of PRs of removing, failing, adding it back in, fixing, removing, failing, adding it back in, etc. This loop could take days at this rate. |
I tried it with one. It works when I try it, and the code is there in mars.d to spit the paths. |
|
There's no loop. As long as the removal PR doesn't pass the CI, you know there are places left referencing the file. |
But I cannot test the dmd PR against the dlang PR until it is pulled! Hence the loop. |
You would need to do this (finding all the places) anyway, and there is no general solution to this problem other than migrating to a monorepo or investing in CIs which understand inter-PR dependencies (the CI I was working in 2016 to replace DAutoTest had this). |
|
Every missed hardcoded reference to res in dlang.org will cost another round of pulling and unpulling PRs. |
|
Thanks for finally understanding what I'm saying :-) The other solution is to simply pull the dmd one, and then keep fixing the dlang.org one until it passes. |
No, you'll duplicate at the beginning and there's no pulling/unpulling. Only additional PRs to dlang.org if you really missed anything. I am happy to handle those PRs if this makes this discussion stop and let's us move to sth. more meaningful.
No, master must stay buildable. |
|
Three contributors have given you a way to work through it, but you keep ignoring it. You keep insisting that "-Jfoo1;foo2" works. It does not. % cat walter.d
pragma(msg, import("resource"));
% ll folder1
% ll folder2
total 8
-rw-r--r-- 1 geod24 staff 7 Jun 15 17:57 resource
% cat folder2/resource
Foobar
% dmd -o- "-Jfolder2;folder1" walter.d
walter.d(1): Error: file "resource" cannot be found or not in a path specified with -J
walter.d(1): while evaluating pragma(msg, import("resource"))
% dmd -o- "-Jfolder1;folder2" walter.d
walter.d(1): Error: file "resource" cannot be found or not in a path specified with -J
walter.d(1): while evaluating pragma(msg, import("resource"))
% dmd -o- -Jfolder1 -Jfolder2 walter.d
Foobar
This is becoming extremely frustrating. |
To clarify, the general problem is when there is no simple way to break up inter-dependent PRs into three steps such as described above. In this case I also don't see the problem with copying the file as the first step (dlang/dmd#11278). |
|
@Geod24 I tried an example, and it works. The code in mars.d is also there to split the paths. I have no idea why it doesn't work for you.
For both of us. I thought that moving the file would be simple. |
Can you show your example ? |
|
Sure: |
|
Semicolon splitting for $ echo 'pragma(msg, import("test.txt"));' > test.d
$ mkdir a b
$ echo foo > b/test.txt
$ dmd -o- '-Ja;b' test.d
test.d(1): Error: file "test.txt" cannot be found or not in a path specified with -J
test.d(1): while evaluating pragma(msg, import("test.txt"))
$ dmd -o- '-Jb;a' test.d
test.d(1): Error: file "test.txt" cannot be found or not in a path specified with -J
test.d(1): while evaluating pragma(msg, import("test.txt"))
$ dmd -o- '-Jb' test.d
fooEdit: works on Wine. Yep, looks like it's Windows-only for some reason. |
|
Looking at FileName.splitPath(): @CyberShadow wins that round! |
|
@WalterBright I merged the copy res PR and update your PR here to only use the newer res import path. When this passes, you should be able to continue with your previous PR. |
|
@wilzbach thank you. But that'll only work if this PR actually finds all the places. If it doesn't, we'll be looping! |
There's no looping. If we really missed something, it will show up in a CI of dmd on your PR. Then it will just be a single PR to fix it (as both files still exists for all other repos). No need to "loop" with pulling/unpulling. |
Hypothetically multiple dlang.org PRs may be needed, as the CI on the DMD repo will only identify the first problem. But there is no need to unmerge. |
|
Now it's failing with: which doesn't seem to be related to this PR. |
I guess the real error is above: That's because we build I'm not sure why the errors below are happening. |
blocking dlang/dmd#11269