RejectedSoftware Forums

Sign up

Subсonfigurations and subpackages in 0.7.27

How to properly use options "subConfigurations" with subpackage "vibe-d:core"?

When I write in dub.json "subConfigurations": {"vibe-d": "win32"} and run dub build I receive messages

<...>
vibe-d:data 0.7.27: target for configuration "library" is up to date.
vibe-d:core 0.7.27: target for configuration "libevent" is up to date.
<...>
vibe-d 0.7.27: building configuration "win32"...

and I get dependency on libevent.

I tried to change "subConfigurations": {"vibe-d:core": "win32"}, {"vibe-d": "win32", "vibe-d:core": "win32"}, etc. But I still get dependency on libevent.

How to build "win32" configuration?

Re: Subсonfigurations and subpackages in 0.7.27

On 2016-02-18 14:18, Alex Simonov wrote:

How to properly use options "subConfigurations" with subpackage "vibe-d:core"?

When I write in dub.json "subConfigurations": {"vibe-d": "win32"} and run dub build I receive messages

<...>
vibe-d:data 0.7.27: target for configuration "library" is up to date.
vibe-d:core 0.7.27: target for configuration "libevent" is up to date.
<...>
vibe-d 0.7.27: building configuration "win32"...

and I get dependency on libevent.

I tried to change "subConfigurations": {"vibe-d:core": "win32"}, {"vibe-d": "win32", "vibe-d:core": "win32"}, etc. But I still get dependency on libevent.

How to build "win32" configuration?

I think it's a bug [1]. As a workaround you can remove the cached
packages. That is ~/.dub/packages on Posix, not sure where it's stored
on Windows.

[1] https://github.com/rejectedsoftware/vibe.d/issues/1418

/Jacob Carlborg

Re: Subсonfigurations and subpackages in 0.7.27

On Thu, 18 Feb 2016 21:25:55 +0100, Jacob Carlborg wrote:

On 2016-02-18 14:18, Alex Simonov wrote:

How to properly use options "subConfigurations" with subpackage "vibe-d:core"?

When I write in dub.json "subConfigurations": {"vibe-d": "win32"} and run dub build I receive messages

<...>
vibe-d:data 0.7.27: target for configuration "library" is up to date.
vibe-d:core 0.7.27: target for configuration "libevent" is up to date.
<...>
vibe-d 0.7.27: building configuration "win32"...

and I get dependency on libevent.

I tried to change "subConfigurations": {"vibe-d:core": "win32"}, {"vibe-d": "win32", "vibe-d:core": "win32"}, etc. But I still get dependency on libevent.

How to build "win32" configuration?

I think it's a bug [1]. As a workaround you can remove the cached
packages. That is ~/.dub/packages on Posix, not sure where it's stored
on Windows.

[1] https://github.com/rejectedsoftware/vibe.d/issues/1418

I'll look into that next. Using "subConfigurations": {"vibe-d:core": "win32"} is also a possible workaround (didn't test), but it requires adding an explicit dependency to "vibe-d:core", or it will be ignored (diagnostics really need to be improved there).

Re: Subсonfigurations and subpackages in 0.7.27

On Fri, 19 Feb 2016 10:06:40 GMT, Sönke Ludwig wrote:

On Thu, 18 Feb 2016 21:25:55 +0100, Jacob Carlborg wrote:

On 2016-02-18 14:18, Alex Simonov wrote:

How to properly use options "subConfigurations" with subpackage "vibe-d:core"?

When I write in dub.json "subConfigurations": {"vibe-d": "win32"} and run dub build I receive messages

<...>
vibe-d:data 0.7.27: target for configuration "library" is up to date.
vibe-d:core 0.7.27: target for configuration "libevent" is up to date.
<...>
vibe-d 0.7.27: building configuration "win32"...

and I get dependency on libevent.

I tried to change "subConfigurations": {"vibe-d:core": "win32"}, {"vibe-d": "win32", "vibe-d:core": "win32"}, etc. But I still get dependency on libevent.

How to build "win32" configuration?

I think it's a bug [1]. As a workaround you can remove the cached
packages. That is ~/.dub/packages on Posix, not sure where it's stored
on Windows.

[1] https://github.com/rejectedsoftware/vibe.d/issues/1418

I'll look into that next. Using "subConfigurations": {"vibe-d:core": "win32"} is also a possible workaround (didn't test), but it requires adding an explicit dependency to "vibe-d:core", or it will be ignored (diagnostics really need to be improved there).

It's properly build with "dependencies": {"vibe-d:core": "0.7.27"}, "subConfigurations": {"vibe-d:core": "win32"}.

I think depending on sub packages is the result of a full separation of the individual library components.

Re: Subсonfigurations and subpackages in 0.7.27

On Fri, 19 Feb 2016 13:07:17 GMT, Alex Simonov wrote:

It's properly build with "dependencies": {"vibe-d:core": "0.7.27"}, "subConfigurations": {"vibe-d:core": "win32"}.

I think depending on sub packages is the result of a full separation of the individual library components.

It turned out that this was caused by DUB issue #745. So the "subConfigurations" field of the downloaded vibe.d package simply got stripped. The reason that it works when building for the first time is that in that case DUB takes the package recipe downloaded from the registry instead of the one stored on disk.

I'll tag an alpha release for DUB 0.9.25, which will contain the fix, later today.