Giter Site home page Giter Site logo

Comments (14)

jacob-carlborg avatar jacob-carlborg commented on July 2, 2024

I could do that. I just haven't taken the time to do it yet. For tools, like dstep, I prefer to make pre compiled binaries available since dub neither compiles or installs them. Although adding them to dub wouldn't hurt.

I've been planning for a while to make a new release but I would like to make it work on Windows first, if possible.

from dstep.

John-Colvin avatar John-Colvin commented on July 2, 2024

From any directory, "dub install " will fetch any package and place it in ~/.dub . "dub build " will then build that package. All that's left is to make a symlink or add the directory to your PATH and you've got a user-wide installation of the binary.

In my opinion it's enough for simple packages like dstep. (Or at least it's a useful convenience in lieu of an OS-level package, with the advantage of being always up-to-date)

BTW, I'm writing a package.json for Tango-D2 so hopefully I can get SiegeLord to merge it and add Tango to code.dlang.org

from dstep.

jacob-carlborg avatar jacob-carlborg commented on July 2, 2024

From any directory, "dub install " will fetch any package and place it in ~/.dub . "dub build " will then build that package. All that's left is to make a symlink or add the directory to your PATH and you've got a user-wide installation of the binary.

The thing is that with a tool you might not have a directory to run dub install in. I have tried dub install <package> and the only thing that it did was to clone the repository.

BTW, I'm writing a package.json for Tango-D2 so hopefully I can get SiegeLord to merge it and add Tango to code.dlang.org

That's great. I'm wondering how we should set the version. So far DMD has broken Tango in every single release. It feels wrong to create a new version just for this. Especially since there's no development on the library beside from keeping it up to date with DMD. I guess one can track the branch instead of using a tag. Then we can make releases from time to time if necessary.

from dstep.

John-Colvin avatar John-Colvin commented on July 2, 2024

dub install only clones, but dub build does the compilation. It's a bit backwards from the normal terminology e.g. git clone or wget to download, make to build followed by make install, but the functionality is there.

The thing is that with a tool you might not have a directory to run dub install in.

I'm not sure what you mean by this. dub install clones to ~/.dub/packages/<package-name>-<version>/ by default.

from dstep.

jacob-carlborg avatar jacob-carlborg commented on July 2, 2024

dub install only clones, but dub build does the compilation. It's a bit backwards from the normal terminology e.g. git clone or wget to download, make to build followed by make install, but the functionality is there.

Since dub install <package> doesn't really install anything I haven't seen what dub give me that git clone and build does.

I'm not sure what you mean by this. dub install clones to ~/.dub/packages/-/ by default.

dub seems to be more created for fetching libraries than tools. Example: if I have a project that depends on library A and B and it's using dub. Then I can navigate to the project directory and run dub and it will fetch all dependencies and build the project.

But If I want to use dub to install a tool I may not have a project directory. Since a tool (executable) is usable on its own, which a library isn't.

Anyway, I will add my projects to dub. I just need to figure out the best way to do this.

from dstep.

John-Colvin avatar John-Colvin commented on July 2, 2024

Since dub install doesn't really install anything I haven't seen what dub give me that git clone and build does.

Dependency management. If all your modules and Tango were on code.dlang.org, all I would have to do to build and install dstep would be this (regardless of what directory I'm running these from):

dub install dstep
dub build dstep
ln -s ~/.dub/packages/dstep-master/dstep /usr/local/bin/

or instead of the symbolic link, add export PATH=~/.dub/packages/dstep-master:$PATH to .bashrc

from dstep.

mihails-strasuns avatar mihails-strasuns commented on July 2, 2024

Also reminding that lack of tag is the only thing that prevents me from packaging it as part of dtools in Arch Linux ;)

from dstep.

jacob-carlborg avatar jacob-carlborg commented on July 2, 2024

Yes, I know. I want to make a proper release and not just add a tag. Before I'm doing that I would like to see if I can get it to work for Windows.

from dstep.

jacob-carlborg avatar jacob-carlborg commented on July 2, 2024

@John-Colvin how is it going with adding Tango do dub?

from dstep.

John-Colvin avatar John-Colvin commented on July 2, 2024

I made a simple package.json that works: SiegeLord/Tango-D2#57

from dstep.

John-Colvin avatar John-Colvin commented on July 2, 2024

done: http://code.dlang.org/packages/tango

from dstep.

jacob-carlborg avatar jacob-carlborg commented on July 2, 2024

Thanks. I can start looking into this now.

from dstep.

John-Colvin avatar John-Colvin commented on July 2, 2024

No problem. I look forward to it :)

from dstep.

John-Colvin avatar John-Colvin commented on July 2, 2024

Glad to see this is done. It's very convenient. Thanks :)

from dstep.

Related Issues (20)

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.