Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building projects depending on dub #21

Open
Laeeth opened this issue Apr 22, 2016 · 3 comments
Open

Building projects depending on dub #21

Laeeth opened this issue Apr 22, 2016 · 3 comments

Comments

@Laeeth
Copy link

Laeeth commented Apr 22, 2016

As I understand it, reggae won't currently build more complex dub projects like vibe-d because it doesn't implement the full dub build rules. Please correct me if I am wrong (and if you can show logic to build one of the vibe-d examples using reggae that would be great).

That's fine because one can just build them separately, set the import paths so the project is found, and static link to the library files. However dub projects put the source files in different locations (sometimes its source, sometimes src, sometimes deimos, and sometimes there is an additional degree of nesting). One can't read the file system at compile time.

Is there a way to do what I want? Use reggae to build my own projects - these being composed of multiple static libraries and some source files depending on them, but also everything depending on some code.dlang.org modules, including, but not only vibe-d.

Thanks.

Laeeth.

@atilaneves
Copy link
Owner

I didn't implement all of dub because I didn't need it and nobody else was
complaining about it. The other problem is that "dub describe" isn't
particularly well implemented at the moment, mostly because I'm probably
the only one using it for build information.

You can't read the file system at compile-time but you don't have to. All
the examples and the build descriptions I usually write are compile-time
only because they're simpler, but you can use runtime code as well. The
only requirement of a reggaefile.d file is there be one and only one public
function with the signature Build function();. So, to read the
file-system, don't use the build template mixin and write this instead:

Build mybuild() {
auto target1 = Target(...);
//...
return Build(target1, target2, ...);
}

On 22 April 2016 at 12:57, Laeeth Isharc notifications@github.com wrote:

As I understand it, reggae won't currently build more complex dub projects
like vibe-d because it doesn't implement the full dub build rules. Please
correct me if I am wrong (and if you can show logic to build one of the
vibe-d examples using reggae that would be great).

That's fine because one can just build them separately, set the import
paths so the project is found, and static link to the library files.
However dub projects put the source files in different locations (sometimes
its source, sometimes src, sometimes deimos, and sometimes there is an
additional degree of nesting). One can't read the file system at compile
time.

Is there a way to do what I want? Use reggae to build my own projects -
these being composed of multiple static libraries and some source files
depending on them, but also everything depending on some code.dlang.org
modules, including, but not only vibe-d.

Thanks.

Laeeth.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#21

@Laeeth
Copy link
Author

Laeeth commented Apr 22, 2016

Thanks, Atila. Only really need it myself for vibed, and sounds like your answer above addresses best way.

Are you going to dconf ?

Laeeth

@atilaneves
Copy link
Owner

Oh yeah, plane ticket and hotel booked and everything. Gotta make it 3
DConfs in a row!

Atila

On 22 April 2016 at 14:08, Laeeth Isharc notifications@github.com wrote:

Thanks, Atila. Only really need it myself for vibed, and sounds like your
answer above addresses best way.

Are you going to dconf ?

Laeeth


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#21 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants