Thread overview
Cleaning up Dub/Dmd builds
Apr 18, 2017
WhatMeWorry
Apr 18, 2017
Stanislav Blinov
Apr 18, 2017
WhatMeWorry
Apr 18, 2017
FreeSlave
April 18, 2017
Just some basic questions regarding Dub projects with GitHub. I'm just getting
my toes wet with GitHub so these might be pretty naive questions.

I've got about 35 mini dub projects where each project holds an OpenGL tutorial.
like so:


01_01_hello_window
    .dub
        build
           application-$DFLAGS-windows-x86_64-dmd_2071-090A2D44A9209535339D8167E6A96BA6"
           o  o  o
           application-$DFLAGS-windows-x86_64-dmd_2071-D8ED32593AF993350341F03512FE4A7C"
        dub.json
     source
         (all my .d files)
     01_01_hello_window.exe
     dub.sdl
     dub.selections.json
01_02_textures
    .dub
         build
      (etc.)

When I try to upload these files to my new repo, GitHub (rightfully so) complains that
I have too many files. Since I'm using sdl and not json, can I safely delete all the files
that pertain to json?  Can I do this some way at the command line?

Also, I have tons of empty folders with cryptic names like
"application-$DFLAGS-windows-x86_64-dmd_2071-D8ED32593AF993350341F03512FE4A7C" above.
Is there some way to suppress these from even being created?

Finally, is it problematic to have so many little dub folders?  Should I have organized
things in a different (better) manner?

Thanks.
April 18, 2017
On Tuesday, 18 April 2017 at 15:07:27 UTC, WhatMeWorry wrote:

> When I try to upload these files to my new repo, GitHub (rightfully so) complains that
> I have too many files. Since I'm using sdl and not json, can I safely delete all the files
> that pertain to json?  Can I do this some way at the command line?


You shouldn't upload files from the .dub directory, that's local build cache that shouldn't  be published. You can simply add the .dub directory to your .gitignore file.
April 18, 2017
On Tuesday, 18 April 2017 at 15:15:47 UTC, Stanislav Blinov wrote:
> On Tuesday, 18 April 2017 at 15:07:27 UTC, WhatMeWorry wrote:
>
>> When I try to upload these files to my new repo, GitHub (rightfully so) complains that
>> I have too many files. Since I'm using sdl and not json, can I safely delete all the files
>> that pertain to json?  Can I do this some way at the command line?
>
>
> You shouldn't upload files from the .dub directory, that's local build cache that shouldn't  be published. You can simply add the .dub directory to your .gitignore file.

Thanks. That seems like an elegant solution.  Sorry if that is documented somewhere. I never came across it or didn't understand it when I did.
April 18, 2017
On Tuesday, 18 April 2017 at 17:58:32 UTC, WhatMeWorry wrote:
> On Tuesday, 18 April 2017 at 15:15:47 UTC, Stanislav Blinov wrote:
>> On Tuesday, 18 April 2017 at 15:07:27 UTC, WhatMeWorry wrote:
>>
>>> When I try to upload these files to my new repo, GitHub (rightfully so) complains that
>>> I have too many files. Since I'm using sdl and not json, can I safely delete all the files
>>> that pertain to json?  Can I do this some way at the command line?
>>
>>
>> You shouldn't upload files from the .dub directory, that's local build cache that shouldn't  be published. You can simply add the .dub directory to your .gitignore file.
>
> Thanks. That seems like an elegant solution.  Sorry if that is documented somewhere. I never came across it or didn't understand it when I did.

If you create dub project by "dub init" command it automatically creates .gitignore file.
Also github provides premade .gitignore files for many programming languages ("Add .gitignore" button on Create new repository). Those files are from https://github.com/github/gitignore repo.