-
Notifications
You must be signed in to change notification settings - Fork 2
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
How to avoid "No valid config found." with snap? #8
Comments
How does the compiler usually find the config with snap? |
Must be "snap magic": just works! It could help, if dlp has a -config option like dmd. |
I'll check the code how it finds the config. |
Is there a form of "source code" or similar for the snap package? |
I found this issue, where the paths were confirmed: Otherwise, maybe @WebDrake can help? |
What happens if you place the DLP binary in the same directory as the DMD binary. Will it find the config then? |
First Google hit: https://askubuntu.com/questions/919091/why-can-snap-files-not-be-modified-in-any-way It works, however, if I add the internal snap directory |
Sorry to hear about the trouble, folks.
The compiler finds the snap-package config because it is in one of the default search locations -- the same directory as the As @linkrope correctly notes, it's not possible to place extra binaries in the snap package's Absent any specific knowledge, I would recommend searching for the compiler's expected default config locations, but searching relative to the actual compiler binary location before hardcoded locations like
That's interesting. Is |
It uses the same code as the compiler to find the config. But since the config is not located next to the DLP binary, it won't find it.
Hmm, that's an interesting idea. Not sure how easy that would be. DLP is trying to support having druntime/Phobos installed from both DMD and LDC. Perhaps DLP should ship with its own version of druntime/Phobos. Otherwise there's always the risk of breaking DLP.
DLP is using the same code as the compiler. Technically it's only on Windows the compiler is looking for looking for the config in the same directory as the binary. On Posix, it will look through |
Unfortunately that's an issue for snap packages, because the stuff in PATH is just wrapper scripts. You can probably do a workaround of assuming that if the compiler exe in the PATH is
... then the underlying compiler binary will live in But honestly this makes me think that really we need a way to be able to query the compiler for which config file it is using, otherwise apps like DLP will always be playing catch-up if the search rules change. |
So how does it work for snap packages? I linked to the code the compiler is using.
Then you need a way to find the compiler. Unless you just assume it's in the PATH. |
@linkrope I've added support for the |
It's still "No valid config found." This looks somehow destructive: I also cannot combine
|
I have not fixed automatically detecting the config file.
The above sets up the default value for the config file. dlp/source/dlp/driver/command.d Line 43 in ff01efe
Yeah, that was the intention. But I can probably fix that. I'll take a look again at the issue. |
I mean: your change does not seem to work
(However, I was able to use |
Yeah, hence the "I'll take a look again at the issue." 😉.
Cool, thanks. |
Could you please check again? You need to remove DDC (the DLP dependency), usually in |
Perhaps I should install the Snap package myself ... |
Removing DDC did not help. Would be great if you could check the Snap package yourself. There seems to be another (related?) issue with 32 vs. 64 bit.
With explicit
|
I don't think it's related. I'll take a look at that as well. I've reported it as a separate issue: #11. |
Works great! To verify the
|
Fix #8: How to avoid "No valid config found." with snap?
With snap, dmd is /snap/bin/dmd, but the config is /snap/dmd/current/bin/dmd.conf.
So, dlp is aborted with "No valid config found."
The text was updated successfully, but these errors were encountered: