Skip to content

Conversation

@wilzbach
Copy link
Contributor

A simple fix to solve the problem of a non-existent stable Phobos directory as introduced in #1590.

The current repository layout assumes that the latest, stable phobos
(e.g. ../phobos-2.074.0) exists. For now, this is automatically ensured
before the Makefile targets are evaluated.

A similar trick is used at the DMD Makefile and we would use git clone anyways.

@wilzbach wilzbach changed the title Ensure that the directory phobos-stable exists Ensure that the phobos-stable directory exists May 10, 2017
@CyberShadow
Copy link
Member

Still getting:

find: ‘../phobos’: No such file or directory

@wilzbach wilzbach force-pushed the ensure-phobos-stable branch from bdd60f8 to 6e1bdb1 Compare May 10, 2017 23:23
The current repository layout assumes that the latest, stable phobos
(e.g. ../phobos-2.074.0) exists. For now, this is automatically ensured
before the Makefile targets are evaluated.
@wilzbach
Copy link
Contributor Author

find: ‘../phobos’: No such file or directory

Hmm, of course we could check for this as well and clone it as well as in the most likely case it will be present, but I am starting to dislike this simple solution ...

@CyberShadow
Copy link
Member

Hmm, of course we could check for this as well and clone it as well as in the most likely case it will be present, but I am starting to dislike this simple solution ...

I think it's important that we find a working solution, even if it means reverting #1590.

@MartinNowak
Copy link
Member

Look at https://github.com/dlang/dlang.org/pull/1214/files#diff-228b518f4545d060f900578830ade5da for a rough guide on how to do this correctly.

Make downstream rules depend on some assert_writeln/.done file, make that depend on the cloned repo, within the rule us find to only rewrite updated sources.
So when the repo isn't yet cloned it will get cloned. Since /.done is a phony target it will always run.
I know no good way to first clone and then still add all wildcard (found) files into make's dependencies in a single invocation. Doing it as an unconditional script (similar to the shell call now) will likely cause troubles later on, e.g. to just build phobos-release without cloning.

As always, maybe there is a better solution I'm not aware of, but the above is feasible and fixes the problem at hand.

Overall I hope we finally have a green light for dpl-docs and can dump all of that messy stuff soon.

@MartinNowak
Copy link
Member

In case you guys want mentions @wilzbach, @CyberShadow

@CyberShadow
Copy link
Member

@wilzbach ping

@CyberShadow
Copy link
Member

I'm going to merge this for now as it fixes the problem at least partially, but @wilzbach please don't forget to return to this.

@CyberShadow CyberShadow merged commit 333c99e into dlang:master Jun 7, 2017
@wilzbach wilzbach deleted the ensure-phobos-stable branch June 8, 2017 03:06
@CyberShadow
Copy link
Member

@wilzbach https://issues.dlang.org/show_bug.cgi?id=17649 looks related to this, perhaps you should have a look.

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.

3 participants