-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Search dub's own path first to find compiler #895
Comments
Doing it without path in first argument is harder, but works in most cases: http://stackoverflow.com/q/59895/2361979 |
There is also |
I think a settings file would be great, and could be used for many other purposes. It's just more work to implement it ;-) |
It's not even really more work. There is a settings file already, it just searches only in /etc/ and ~/.dub now. |
If it is possible to specify the compiler path relative to dub itself, then the config file would work well I think. LDC does something like this: |
My idea was that all path entries in the configuration file would be allowed to be relative, and would in that case be treated as relative to the configuration file itself. Using ../etc/ instead of or in addition to the current directory would also be a possibility, although it would be good to keep the rules as simple as possible. I'll open a PR for this (hopefully later today). |
Great thanks a lot! |
PR: #897 |
Search for dub configuration in ../etc/dub/. Fixes #895.
This was never actually fixed. Here's the output from trying to run dub on linux/x64 after locally downloading the latest dmd 2.075.0 release, with no dmd in my
The same with the final ldc 1.3.0 release, no D compiler in my
All that #897 accomplished was to make ldc use the specified compiler name, in this case ldc2, from the However, I'm unsure what's the intent of specifying the D compiler in a config file at this point. It is only really useful if you know the full path to a D compiler, which any local download won't know, unless the user then modifies or creates a settings.json with that path. System installs, such as in a linux distro, could use it to specify the full path they installed the D compiler at, but that's usually right next to dub anyway. Using a relative path, as suggested above, won't work right now, as it's currently called relative to the directory from which the user invokes dub, ie I can modify the logic to always use the compiler adjacent to dub first, but I wonder if you want that to override |
Fix #895, so that dub looks for a compiler next to itself first
Would it be possible to have the dub executable search its own path first for the compiler? That way, dub will use the compiler it is packaged with. (note: this assumes dub is not on the path, but called e.g. like
~/ldc/ldc2-1.1.0-alpha1-osx-x86_64/bin/dub
)The text was updated successfully, but these errors were encountered: