Make dub part of the standard dmd distribution

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 4 10:44:44 PDT 2015


On 6/4/15 11:07 AM, Sönke Ludwig wrote:
> Am 04.06.2015 um 15:07 schrieb Steven Schveighoffer:
>> On 6/4/15 4:58 AM, Sönke Ludwig wrote:
>>>
>>> As of recently, you can also directly specify dependencies to the "dub
>>> init" command, for example "dub init myproject tango derelict-gl".
>>
>> That's nice. But it still isn't self-explanatory. Nor additive.
>
> A command to add/remove dependencies might be useful. But the question
> is where to stop. Does it make sense to have a command to edit the
> description? Or add compiler flags? Or manage configurations or sub
> packages? It also gets a little hairy w.r.t. keeping possible user
> formatting in the package description file, especially once support for
> comments gets added.

Editing strings that don't affect the build doesn't seem like a 
necessary thing. An interactive init would probably solve that.

However, things like adding or removing a dependency would be very nice 
without having to know the format of the file. I'm trying to think of 
things that a simple first-time user would use dub for, aside from 
adding dependencies. Perhaps creating a debug build. Other than that, I 
think editing the file for nitty gritty details is probably OK.

The use case I'm thinking of is basically:

import somepackage.somemodule;
...

compile -> can't find somepackage.somemodule.
did you mean somepackage.somemodule from libgeneric on code.dlang.org?
    (url)
    to add: dub depend add libgeneric

dub depend add libgeneric => found it, added it, added dependency

I don't have to look up anything on code.dlang.org, I don't have to do 
anything, dub figures it all out from the description file online.

I think of things like linux shell on my linuxmint installation (ubuntu 
based), which uses some cool things:

user> blah
No command 'blah' found, did you mean:
  Command 'blam' from package 'blam' (universe)

>> Of course, you could just say "well, edit the json file!". You really
>> need a format that supports comments...
>
> Agreed, that is really needed. It's almost on top of the TODO list.

That is good!

>> In any case, this doesn't negate the concerns others have raised.
>>
>> I don't mean to bash dub, it's better than nothing. But I haven't used
>> it for any real project yet. And when I did use it, it was not a
>> straightforward experience.
>>
>
> The important part is to not stop with voicing criticism, but to
> actively help to improve the situation. Opening tickets or "voting" on
> existing ones, or even making an enhancement proposal or an actual PR
> would be the most constructive.

Not using dub frequently means I have a very sparse relationship with 
it. It's kind of that chicken and egg thing. I'm sure if I started 
having to use dub for a project, I would become more involved :)

> Sorry for the slightly OT reply, most of this isn't targeted at you, I
> just went through the newsgroup posts for the first time after a while
> and needed to get this out.

No problem, please keep up the dialogue!

-Steve


More information about the Digitalmars-d mailing list