Comments (14)
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.
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.
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.
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.
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.
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.
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.
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.
@John-Colvin how is it going with adding Tango do dub?
from dstep.
I made a simple package.json that works: SiegeLord/Tango-D2#57
from dstep.
done: http://code.dlang.org/packages/tango
from dstep.
Thanks. I can start looking into this now.
from dstep.
No problem. I look forward to it :)
from dstep.
Glad to see this is done. It's very convenient. Thanks :)
from dstep.
Related Issues (20)
- Pointer arithmetic and parentheses elision
- Dstep + bindbc HOT 1
- `--normalize-modules` insert underscore in the module decl but not in the filename
- typedef function prototypes don't retain arguments HOT 5
- dub run failure - ld cannot find @linker_flags.txt HOT 4
- doc error:
- Missing import HOT 2
- Unhandled type kind objCTypeParam HOT 2
- const T arr[] gets converted to imcompatible const(T) *arr instead of a warning HOT 2
- Improper output when importing core.stdc.limits HOT 1
- Rename enum members can create invalid enum names HOT 1
- API macro erased but should be extern(System) HOT 2
- /usr/include/cuda_runtime_api.h ==> d: Error: undefined identifier `cudaError_t` HOT 6
- Assertion Failure when defining a cast from int to function pointer
- Unhandled type kind objCObject when trying to bind Foundation.framework on macOS
- enh? add enum alias (as dpp do) HOT 1
- unknown type name 'size_t' HOT 1
- `--alias-enum-members=true` shouldn't affect global anonymous enums
- Unnecessary leading dot in alias
- Add support for adding public imports
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dstep.