DUB - call to arms

Atila Neves atila.neves at gmail.com
Wed Apr 17 08:50:31 UTC 2019


On Tuesday, 16 April 2019 at 15:52:57 UTC, Guillaume Piolat wrote:
> On Tuesday, 16 April 2019 at 12:12:45 UTC, Atila Neves wrote:
>>
>> I'll take a look. In the meanwhile I started this:
>>
>> https://github.com/kaleidicassociates/bud
>>
>> It uses dub as a library to make sure that it works just as 
>> dub does, but bypasses what it can. The idea is to completely 
>> separate these disparate tasks:
>>
>> * Dependency version resolution (from dub.{sdl,json} -> 
>> dub.selections.json)
>> * Fetching dependencies that are not already in the file 
>> system (trivial after dub.selections.json has been generated)
>> * Extracting information from dub about source files, import 
>> paths, etc.
>> * Actually using the information from dub to build
>>
>
> Won't complain about such good news!
>
> dub.json and dub.selections.json must unify though, as 
> dub.selections.json is not self-sufficient, what if they 
> contradict themselves?

I'm not sure I know what you mean. Unless you edit 
dub.selections.json manually, it can't contradict the build 
recipe it came from. Version 1 of dub.selections.json isn't 
sufficient, but I'm leaving that as a problem to solve later.

> I think our research concluded that solving dependencies for a 
> particular platform+configuration is (in an idealized DUB) a 
> fundamentally different operation than generating a proper 
> dub.selections.json (for which you would have to find a 
> super-set for "all conf").

Could you elaborate on this please? At least for configurations, 
I don't see why it wouldn't be possible to generate the current 
JSON object in dub.selections.json, but for each configuration 
instead. And, possibly platform (linux, x86_64, etc.).

> The problem is that configurations/platform could appear and 
> disappear alongside previous versions.

Could you please give an example of this?

> (For readers: this would lead the path to platform-based 
> dependencies and configuration-based dependencies which are 
> currently not doable, such as:
>
>     "dependencies-linux": { "x11": "~>1.0" }
> )

Yep!




More information about the Digitalmars-d mailing list