Skip to content
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

dub build --compiler=ldmd2 overwrites files in ~/.dub written by dub build #1305

Open
timotheecour opened this issue Dec 10, 2017 · 0 comments

Comments

@timotheecour
Copy link

timotheecour commented Dec 10, 2017

can dub build --compiler=ldmd2 coexist with dub build? it seems like it creates conflicts as it overwrites the generated files in ~/.dub
shouldn't dub cache the generated files in directories that depend on cmd line options (eg dmd vs ldmd2)?

EDIT: dub build --compiler=ldmd2 --cache=local still seems to affect ~/.dub

in dub/source/dub/dub.d I see HOME is hardcoded:
m_dirs.userSettings = NativePath(environment.get("HOME")) ~ ".dub/";
a temporary fix is to use:
HOME=other_dir dub build --compiler=ldmd2
however this is hacky and not a good idea to override HOME; could we use a different environment variable for this? eg: DUB_HOME which defaults to HOME?

or preferably a dub option: dub build --dub_home=...

NOTE: it's also being used in dub describe and probably other commands

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

No branches or pull requests

1 participant