RejectedSoftware Forums

Sign up

Moving from json to sdl issue with subPackage using a configuration

First some positive words as I read several criticism about the additional sdl format. I am starting to use it and I feel its really nice, much cleaner to read and write, thanks for the addition.

That being said, unfortunately I don't get subPackage using a subConfiguration to work.

This is the working dub.json
This is the not-working dub.sdl

The configuration "with-derelict-loader" defines the version specifier "ERUPTED_FROM_DERELICT" which is used in both the subPackages (at the bottom of both the dub files).

When running e.g.: dub run erupted:devices the json version runs fine, but the sdl version complaints about undefined identifier 'DerelictErupted'. This identifier is only defined with the version ERUPTED_FROM_DERELICT, hence my guess that this version is not forwarded to dmd.

So what am I doing wrong in the sdl file?

Re: Moving from json to sdl issue with subPackage using a configuration

Am 18.07.2016 um 10:57 schrieb ParticlePeter:

First some positive words as I read several criticism about the additional sdl format. I am starting to use it and I feel its really nice, much cleaner to read and write, thanks for the addition.

That being said, unfortunately I don't get subPackage using a subConfiguration to work.

This is the working dub.json
This is the not-working dub.sdl

The configuration "with-derelict-loader" defines the version specifier "ERUPTED_FROM_DERELICT" which is used in both the subPackages (at the bottom of both the dub files).

When running e.g.: dub run erupted:devices the json version runs fine, but the sdl version complaints about undefined identifier 'DerelictErupted'. This identifier is only defined with the version ERUPTED_FROM_DERELICT, hence my guess that this version is not forwarded to dmd.

So what am I doing wrong in the sdl file?

There are a few occurrences of dependencies in the .sdl file, which
should be dependency instead. DUB should really emit a warning for
unknown directives (it doesn't error out to enabled forward
compatibility, but that doesn't mean that it can't warn).

Re: Moving from json to sdl issue with subPackage using a configuration

BTW, I'd recommend to use dub convert -f sdl as the starting point for
the conversion process. It currently still inserts some extra fields
(default "application" and "library" configurations, a "version" field,
and "sourcePaths"/"importPaths" fields), but the rest guaranteed to be a
literal translation.

Re: Moving from json to sdl issue with subPackage using a configuration

On Tue, 19 Jul 2016 08:43:14 +0200, Sönke Ludwig wrote:

Thanks, that was the problem, I must have stared to strongly :-)

BTW, I'd recommend to use dub convert -f sdl as the starting point for
the conversion process. It currently still inserts some extra fields
(default "application" and "library" configurations, a "version" field,
and "sourcePaths"/"importPaths" fields), but the rest guaranteed to be a
literal translation.

That's nice, I was missing such a converter and wanted to suggest such feature.