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
Please make dub find & use packages installed to system locations #838
Comments
|
This is really annoying for users, it would be awesome if this bug received some feedback & attention... |
|
I'm having issues understanding the root problem here. So the situation is that DUB will search #811 mentions pre-compiled binaries, which are problematic in the DUB ecosystem, because packages can be built in many different forms to produce different binaries (optional dependencies, different build configurations, different build modes, upwards-inherited version identifiers etc.). This is why the build results are stored in a directory that contains a hash of all build parameters that went into the build. So using a vanilla build would be an option, but generally I don't think that it makes sense to distribute pre-compiled binaries for library packages. Executables are a different matter, of course. * It's also possible to add search paths or to register individual package directories in |
|
The problem here is that Using pre-compiled binaries would be really awesome, but getting the first path issue fixed is really essential. We also can not write to an index file, so ideally I would just like to have packages installed into soe directory in |
|
@s-ludwig to put it very short : issue @ximion is trying to solve is to be able to do a Debian source package from dub package so that dub will recognize its presence in the system and not try fetching again to own cache. @ximion as a work around, have you considered post-install hook to call |
|
There is one other issue to solve, which is to separate the build output into a different directory, maybe somewhere in Regarding the |
|
@Dicebot Yes, I thought about adding such a hook, but that would mean every package shipping dub stuff would need that (or we would need to handle this via triggers), and it is a really annoying hack (I also don't know if dub behaves correctly when this gets called a lot of times - it probably will be fine). @s-ludwig Please don't use something in Hmm, |
Oh, I can actually explain this, because we use same naming scheme at work (with git submodules instead of dub packages). D module system works best when it has close mapping to filesystem layout, for example, module This pretty much limits one to either |
|
@s-ludwig and I just quickly talked about this at DConf and we think that this should be as easy as adding a read-only SystemPackageRepository to |
Allows defining additional paths that contain packages in subfolders with the pattern "(name)-(version)/(name)/" by defining a "customCachePaths" field in /etc/dub/settings.json or ~/.dub/settings.json.
Allows defining additional paths that contain packages in subfolders with the pattern "(name)-(version)/(name)/" by defining a "customCachePaths" field in /etc/dub/settings.json or ~/.dub/settings.json.
Allows defining additional paths that contain packages in subfolders with the pattern "(name)-(version)/(name)/" by defining a "customCachePaths" field in /etc/dub/settings.json or ~/.dub/settings.json.
Allows defining additional paths that contain packages in subfolders with the pattern "(name)-(version)/(name)/" by defining a "customCachePaths" field in /etc/dub/settings.json or ~/.dub/settings.json.
Allows defining additional paths that contain packages in sub folders with the pattern "(name)-(version)/(name)/" by defining a "customCachePaths" field in /etc/dub/settings.json or ~/.dub/settings.json.
|
@wilzbach This fix doesn't work (yet) because dub never reads |
|
Oh, and additionally dub doesn't seem to fetch the right version number for local packages installed in In other news, with this issue fixed I am working on some integration of dub into the Meson build system, the result will likely be pretty neat and might allow for seamlessly mixing the two build systems. |
This is a follow-up of issue #811
At time, it is impossible to properly package dub packages in Linux distributions.
In Linux distros, we need to have all stuff required to build a software present in the distribution archives, this includes dub packages which other software depends on.
Unfortunately, dub does not search for matching packages in
/usr/include/d.So, ideally dub would allow some kind of
dub -v --allow-registries=local buildcommand to build using only locally installed packages.So, I am proposing:
/usr/include/d/{package}/{version}/or/usr/share/dlang/{package}/{version}/(the former if the dub package can also be used without dub without changes, since that directory seems to be used by non-dub D software too)/usr/lib/<triplet>/libfoobar.so) to link against, instead of recompiling the package that has already been pre-built.Not having a mechanism like this creates real problems when packaging any dub-using D software for Linux distributions, see gnunn1/tilix#304 for an example.
Would be great to have this fixed, in order to be able to build D code in distributions without crude hacks.
The text was updated successfully, but these errors were encountered: