Giter Site home page Giter Site logo

dub's People

Contributors

abscissa avatar andre2007 avatar coldencullen avatar dlang-bot avatar drug007 avatar feepingcreature avatar flying-toast avatar gdelazzari avatar gedaiu avatar geod24 avatar grogancolin avatar ibuclaw avatar john-colvin avatar kinke avatar londey avatar martinnowak avatar mdondorff avatar nordlow avatar omerfirmak avatar p0nce avatar petarkirov avatar rtbo avatar s-ludwig avatar shoo avatar thewilsonator avatar veelo avatar w0rp avatar webfreak001 avatar wilzbach avatar yoplitein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dub's Issues

Empty Project Name

Using the init sub-command without an optional <directory> parameter does not correctly deduce the project location.

Example:

$ mkdir my_project
$ cd my_project
$ dub init
Successfully created an empty project in ''.

I think the parent directory name should be used in place of the empty string. And also in the package's name field.

/tmp/dub/<numbers>: Directory not empty

Hello, I'm trying to build using dub configurations to run unittests of my library automatically when I don't specify it to be the release configuration. It picks the correct configuration, but it gives me a really odd error:

dub
Checking dependencies in '/home/isak/src/d/two.d'
Building configuration default, build type debug
Running dmd...
Error: /tmp/dub/1877056096: Directory not empty

Run 'dub help' for usage information.

My package.json looks like the following:

{
    "name": "two.d",
    "description": "2d game library for D",
    "homepage": "https://github.com/BitPuffin/two.d",
    "copyright": "Copyright © 2013, Isak Andersson ([email protected])",
    "license": "Zlib",
    "authors": ["Isak Andersson"],
    "libs": ["dallegro5", "allegro"],
    "configurations": [
        {
            "name": "default",
            "targetType": "executable",
            "dflags": ["-w", "-unittest"]
        },
        {
            "name": "release",
            "targetType": "library",
            "dflags": ["-w", "-O", "-release"]
        }
    ]
}

Is it my fault or is it an issue with dub?

Support non-repo packages

Particularly for non-public libs/projects or projects needing a specific alternate fork of a dependency, DUB needs a way to specify a dependency on an arbitrary Git repo URL (Whether local, online, login-protected, etc.)

Support optional dependencies

A dependency that is specified as optional is used/available only if it is manually installed. The user should get an informational message stating that these optional packages can be installed to extend the functionality of the package.

A -version=Have_... flag will indicate at compile time which packages are available.

Missing "~master" package reported as installed

For 0.9.12:

$ cat package.json 
{
(... snip ...)
    "dependencies": {
        "vibe-d": "~master"
    }
}

$ dub upgrade
Upgrading project in <folder>
Triggering update of package vibe-d
Could not write .dub/dub.json.
Could not write .dub/dub.json.
The following changes could be performed:
Install vibe-d ~master, systemWide
Package vibe-d ~master (systemWide) is already installed with the latest version, skipping upgrade.
(...)

$ ls /var/lib/dub/packages/vibe-d/
0.7.13  tmp

$ sudo dub install "vibe-d" --version "~master" --system
Package vibe-d ~master (systemWide) is already installed with the latest version, skipping upgrade.

Unable to build vibe-d examples with dub. As designed?

I have installed dub, and installed vibe-d as a system wide package.
I can still run the examples normally using vibe on the command line, but if try and use dub for the same purpose, I get the link error below. The temp.o file is being created.
I am running on windows 7 with dmd version 2.062.

C:\ProgramData\dub\packages\vibe-d\master\examples\daytime>dub build
Checking dependencies in 'C:\ProgramData\dub\packages\vibe-d\master\examples\daytime'
Building configuration "application", build type debug
Running dmd (compile)...
Linking...
Microsoft (R) Incremental Linker Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

LINK : fatal error LNK1181: cannot open input file 'temp.o,C:\ProgramData\dub\packages\vibe-d\master\examples\daytime\daytime-example.exe,,....\lib\win-i386\eay.lib+....\lib\win-i386\ssl.lib+....\lib\win-i386\event2.lib+wsock32.lib+ws2_32.lib/co/noi.obj'
Error: Link command failed with exit code 1181

Run 'dub help' for usage information.

Make configurations shallow

Currently configurations implicitly reach from the bottom of the dependency hiearchy to the top. Instead only the main package's configurations should be visible to the user of the package. For that to work, there has to be a way to select the configuration of the dependencies in the build flags of package.json. Any conflicting configuration specifications should cause an error.

Use dmds command file

Some systems have limits on number of characters supported on the command line. To avoid this limit, dmd has a method of reading the commands (files) from a file instead of the command line. This is what rdmd does to avoid issues with larger programs, and dub should too.

Support branches other than ~master

Currently the master branch gets some special handling. Instead, all branches should be specifyable. The upgrade procedure should also take into account the HEAD commit of the branch and not always update.

Bitbucket support in registry

I like the fact that you can let the registry automatically upgrade packages from github. Is it a lot of work to support the same for bitbucket?

dub tries to build even if nothing is found

I was expecting a help string to pop-up when I first ran dub:

dub.exe

There was no 'package.json' found for the application in 'D:\Apps\Dub'.
Checking dependencies in '/D:/Apps/Dub'
Building default configuration, build type debug
Running rdmd -g -debug --force --build-only -ofC:\DOCUME~1\Andrej\LOCALS~1\Temp\.rdmd\so
urce\1144519932-app.exe -w -property source\app.d
Error: cannot read file source\app.d
Failed: "dmd" "-g" "-debug" "-w" "-property" "-v" "-o-" "source\app.d" "-Isource"
Error: Build command failed with exit code 1

Run 'dub help' for usage information.

It's listed at the end, but dub should probably skip trying to build anything if nothing is found.

Exclude files

vibe.d includes it's own main, and dub always build all files. If you don't want to use vibes main, you're out of luck.

Group project warnings

This is regarding dub 0.9.12

Great that you print warnings for projects, but there's a couple of issues.

  1. The project name is quite hidden in the text
  2. One warning block is printed per warning

So rather than this:

Warning
=======

The following compiler flags have been specified in pegged's
package description file. They are handled by DUB and direct use in packages is
discouraged.
Alternatively, you can set the DFLAGS environment variable to pass custom flags
to the compiler, or use one of the suggestions below:

-wi: Managed by DUB, do not specify in package.json
-property: Managed by DUB, do not specify in package.json


Warning
=======

The following compiler flags have been specified in pegged's
package description file. They are handled by DUB and direct use in packages is
discouraged.
Alternatively, you can set the DFLAGS environment variable to pass custom flags
to the compiler, or use one of the suggestions below:

-ggdb: Call dub with --build=debug

( and it goes on and on and on .. )

I wold like something like this:

Warning [project = pegged]
=======
The following compiler flags have been specified in the projects
package description file. They are handled by DUB and direct use in packages is
discouraged.
Alternatively, you can set the DFLAGS environment variable to pass custom flags
to the compiler, or use one of the suggestions below:

-wi: Managed by DUB, do not specify in package.json
-property: Managed by DUB, do not specify in package.json
-ggdb: Call dub with --build=debug

libeay32.dll Bad Image error

I tried to run Hello World example, but get this:
20130222-152044-610
Log says:

Error: Program exited with code -1073741521

0.9.7 version. I added vibe-d package as described in this comment.

std.file.rmdir on non-empty folder

[simendsjo@simendsjo-laptop tmp]$ dub init t4
Successfully created an empty project in '/home/simendsjo/code/tmp/t4'.
[simendsjo@simendsjo-laptop tmp]$ cd t4
[simendsjo@simendsjo-laptop t4]$ dub -v run
[7F71AAE21071:00000000 dbg] Using dub registry url 'http://registry.vibed.org/'
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry dyaml
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry vibe-d
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry ddox
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry pegged
[7F71AAE21071:00000000 dbg] Looking for local package map at /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] Looking for local package map at /home/simendsjo/.dub/packages/
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry dyaml
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry vibe-d
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry ddox
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry pegged
[7F71AAE21071:00000000 dbg] Looking for local package map at /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] Looking for local package map at /home/simendsjo/.dub/packages/
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry dyaml
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry vibe-d
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry ddox
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry pegged
[7F71AAE21071:00000000 dbg] Looking for local package map at /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] Looking for local package map at /home/simendsjo/.dub/packages/
[7F71AAE21071:00000000 dbg] Collecting dependencies for t4
[7F71AAE21071:00000000 INF] Checking dependencies in '/home/simendsjo/code/tmp/t4'
[7F71AAE21071:00000000 dbg] dub initialized
[7F71AAE21071:00000000 dbg] Generating using build
[7F71AAE21071:00000000 dbg] Using config application for t4
[7F71AAE21071:00000000 INF] Building configuration application, build type debug
[7F71AAE21071:00000000 dbg] Application output name is '/tmp/dub/1389674440/t4'
[7F71AAE21071:00000000 dbg] Trying to use pkg-config to resolve library flags for [].
[7F71AAE21071:00000000 dbg] pkg-config failed: pkg-config exited with error code 1
[7F71AAE21071:00000000 dbg] Falling back to direct -lxyz flags.
[7F71AAE21071:00000000 INF] Running dmd...
[7F71AAE21071:00000000 dbg] dmd -w -g -debug -of/tmp/dub/1389674440/t4 -I/home/simendsjo/code/tmp/t4/source -J/home/simendsjo/code/tmp/t4/views source/app.d
[7F71AAE21071:00000000 dbg] Running /tmp/dub/1389674440/t4...
Edit source/app.d to start your project.
[7F71AAE21071:00000000 ERR] Error: /tmp/dub/1389674440: Directory not empty

[7F71AAE21071:00000000 dbg] Full exception: std.file.FileException@std/file.d(1318): /tmp/dub/1389674440: Directory not empty
----------------
dub(void std.file.rmdir(const(char[]))+0x64) [0x62ef5c]
dub(void dub.generators.build.BuildGenerator.generateProject(dub.generators.generator.GeneratorSettings)+0x11e6) [0x557cae]
dub(void dub.dub.Dub.generateProject(immutable(char)[], dub.generators.generator.GeneratorSettings)+0xa7) [0x607eab]
dub(_Dmain+0x17a7) [0x547a7b]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runMain()+0x18) [0x612880]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x6123be]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAll()+0x3b) [0x6128c7]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x6123be]
dub(_d_run_main+0x1a8) [0x612378]
dub(main+0x17) [0x6121cb]
/usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7f71aa035a15]
[7F71AAE21071:00000000 INF] Run 'dub help' for usage information.

Support "dub uninstall"

Uninstalling currently only works during "dub upgrade", but should also be available as a manual command line action.

Implement automatic generation of a packageinfo.d module

This module would contain the version of all dependencies to make it possible to have compile time decisions based on versions (e.g. for improved backwards compatibility). It could also contain the path of each used package so that their "public" (or "resources") folder can be accessed (or rather, they know where their own "public/" folder is).

Upgrade for master tag never happens?

I have a project specifying "vibe-d": "~master" an a dependency.
When I try to dub upgrade this project, it just states I'm "up to date" even if my vibe master install if from feb 27.

Empty project doesn't compile

import std.stdio;

void main()
{ 
    writeln("Edit source/app.d to start your project.");
}

dub build produces following error:

.dub\packages\vibe-d\source\vibe\appmain.d(36): Error: only one main/WinMain/DllMain allowed
Error: Build command failed with exit code 1

May be better to replace this code with Hello World example?

Add/remove compiler switches from DUB cmdline

It would be very helpful during development to be able specify, on DUB's command line, compiler switches to be added/removed, without having to edit package.json and then remember to revert the changes.

Implement package signing

An automatically generated package signature that is checked in to the repository would make it possible to detect malicious modification of security relevant packages.

A signed git tag would serve a similar purpose, so if git would be elevated to the one-and-only SCM, maybe this could also be employed somehow.

Make dependencies overridable by local working copies

It can be very useful to map e.g. {"vibe.d": "~master"} to a local git workspace where vibe.d master has been cloned when working on the dependency in the context of another project. This would probably be a user or system wide configuration setting.

ddox doesn't work

$ dub install ddox --system
Package ddox 0.9.8 (systemWide) is already installed with the latest version, skipping upgrade.

$ dub --build=ddox
Checking dependencies in '/home/simendsjo/code/tmp/cli'
Building configuration application, build type ddox
Running dmd...
DDOX in /var/lib/dub/packages/ddox/0.9.8 is not built, performing build now.
Error: Invliad configuration "" for ddox

Symlink to system packages rather than download new copy

Seems like "dub upgrade" always installs locally even if a package is installed with --system. Should dub just create a symlink to the system package instead of downloading and installing locally if a system package exsits?

Dependencies should (optionally?) be installable user or system wide

A central folder (e.g. ~/.dub/modules or /usr/local/share/modules) should be used to store and manage dependencies, with possibly multiple versions of each package. This would reduce the amount of disk space, time and download bandwith used when many projects share dependencies.

libeay32.dll Bad Image error

I tried to run Hello World example, but get this:
20130222-152044-610
Log says:

Error: Program exited with code -1073741521

0.9.7 version. I added vibe-d package as described in this comment.

Can't upgrade or install package

d:\sigod\dev\app>dub init
Successfully created an empty project in ''.

d:\sigod\dev\app>dub install --verbose vibe-d
[02750F80:00000000 dbg] Using dub registry url 'http://registry.vibed.org/'
[02750F80:00000000 dbg] Looking for local package map at C:\ProgramData\dub\packages\
[02750F80:00000000 dbg] Looking for local package map at C:\Users\sigod\AppData\Roaming\dub\packages\
[02750F80:00000000 dbg] creating new HttpClient connection, all 0 are in use
[02750F80:00000000 dbg]  ... 2753640
[02750F80:00000000 dbg] Now got 1 connections
[02750F80:00000000 dbg] dnsresolve
[02750F80:00000000 dbg] dnsresolve yield
[02750F80:00000000 dbg] dnsresolve ret 0
[02750F80:00000000 dbg] Socket event on fd 432: 128 (375A94 vs 375A94)
[02750F80:00000000 dbg] Create FreeListAlloc 8
[02750F80:00000000 dbg] Create FreeListAlloc 16
[02750F80:00000000 dbg] Create FreeListAlloc 32
[02750F80:00000000 dbg] Create FreeListAlloc 64
[02750F80:00000000 dbg] Create FreeListAlloc 128
[02750F80:00000000 dbg] Create FreeListAlloc 256
[02750F80:00000000 dbg] Create FreeListAlloc 512
[02750F80:00000000 dbg] Create FreeListAlloc 1024
[02750F80:00000000 dbg] Create FreeListAlloc 2048
[02750F80:00000000 dbg] Create FreeListAlloc 65540
[02750F80:00000000 dbg] Warning: dropping unread body.
[02750F80:00000000 INF] Installing vibe-d 0.7.12...
[02750F80:00000000 dbg] Aquiring package zip file
[02750F80:00000000 dbg] Found download URL: 'http://registry.vibed.org/packages/vibe-d/0.7.12.zip'
[02750F80:00000000 dbg] dnsresolve
[02750F80:00000000 dbg] dnsresolve yield
[02750F80:00000000 dbg] dnsresolve ret 0
[02750F80:00000000 dbg] Socket event on fd 436: 128 (8F12A4 vs 8F12A4)
[02750F80:00000000 dbg] Redirect to 'https://github.com/rejectedsoftware/vibe.d/archive/v0.7.12.zip'
[02750F80:00000000 dbg] Warning: dropping unread body.
[02750F80:00000000 dbg] dnsresolve
[02750F80:00000000 dbg] dnsresolve yield
[02750F80:00000000 dbg] dnsresolve ret 0
[02750F80:00000000 dbg] Socket event on fd 484: 128 (8F16C4 vs 8F16C4)
[02750F80:00000000 dbg] Redirect to 'https://nodeload.github.com/rejectedsoftware/vibe.d/zip/v0.7.12'
[02750F80:00000000 dbg] Warning: dropping unread body.
[02750F80:00000000 dbg] dnsresolve
[02750F80:00000000 dbg] dnsresolve yield
[02750F80:00000000 dbg] dnsresolve ret 0
[02750F80:00000000 dbg] Socket event on fd 472: 128 (8F1A44 vs 8F1A44)
[02750F80:00000000 dbg] opened file C:\Users\sigod\AppData\Local\Temp\dub-download-vibe-d-0.7.12.zip with 0 bytes as 3
[02750F80:00000000 dbg] Warning: dropping unread body.
[02750F80:00000000 dbg] opened file C:\Users\sigod\AppData\Local\Temp\dub-download-vibe-d-0.7.12.zip with 1765985 bytes as 3

And then nothing happens. Windows Task Manager shows that dub.exe *32 uses 13% CPU.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.