I just created a dub package. Frankly, the whole thign is backward.

Tobias Pankrath tobias at pankrath.net
Fri Apr 29 17:48:44 UTC 2022


On Friday, 29 April 2022 at 17:02:55 UTC, rikki cattermole wrote:
> On 30/04/2022 4:50 AM, Tobias Pankrath wrote:
>> On Friday, 29 April 2022 at 16:33:57 UTC, rikki cattermole 
>> wrote:
>>>
>>> On 30/04/2022 12:52 AM, Tobias Pankrath wrote:
>>>> Do you do this for every build or per compiler? `dub 
>>>> describe` doesn't work that well if you use multiple 
>>>> compilers.
>>>
>>> How can ``dub describe`` be improved for multiple compilers?
>> 
>> `dub describe` specifically should provide paths to the actual 
>> artifacts
>> instead of the symlinked locations, which are the same for all
>> build configurations.
>> 
>> While integrating it with nix, I have wished for:
>> 
>> 1. Better control over where dub places and searches for 
>> stuff, although `HOME=. dub ..` works.
>> 
>> 2. A way to just download a projects and all it's dependencies 
>> and place it somewhere.
>
> $ dub fetch vibelog --cache=local
> $ dub build vibelog --cache=local

That doesn't really work, you need `HOME=.`.

> That'll do it, but you shouldn't need to build to do all the 
> dependencies...
>
> https://github.com/dlang/dub/issues/1930

I've started a PR for that some years ago, but gave up 
https://github.com/dlang/dub/pull/1898

> Okay so:
>
> $ dub describe vibelog --cache=local
>
> Will also do the job.
>
>> 3. That dub describe points to the actual build artifacts 
>> instead of symlinked locations
>> used by differnet locations.
>
> targetPath	string	The destination path of the output binary - 
> this setting does not support platform suffixes
>
> That needs to support platform suffixes for what you are 
> wanting.
> Describe would just follow suit.
>
> On Windows the artifacts are copied not symlinked. So the paths 
> are correct (even if not desirable).

That doesn't change the issue that `dub describe --compiler=ldc` 
says that a file it at <path/to/file>, but then you do `dub build 
--compiler=dmd` and suddenly <path/to/file> is something 
different.




More information about the Digitalmars-d mailing list