RejectedSoftware Forums

Sign up

Best way to get various build info

What is the best way to get a list - for a given configuration - of include directories, library directories, libraries, version flags etc...

I need to get this info to pass to another build system (celeriD)

Re: Best way to get various build info

Am 23.07.2014 15:13, schrieb John Colvin:

What is the best way to get a list - for a given configuration - of include directories, library directories, libraries, version flags etc...

I need to get this info to pass to another build system (celeriD)

dub describe (with the appropriate configuration/architecture flags).
The output is in JSON format, so it still needs to be transformed to
whatever celeriD needs. An alternative would be to write a "generator"
similar to the VisualD one, which directly outputs a celeriD compatible
build description.

Re: Best way to get various build info

On Wed, 23 Jul 2014 15:39:23 +0200, Sönke Ludwig wrote:

Am 23.07.2014 15:13, schrieb John Colvin:

What is the best way to get a list - for a given configuration - of include directories, library directories, libraries, version flags etc...

I need to get this info to pass to another build system (celeriD)

dub describe (with the appropriate configuration/architecture flags).
The output is in JSON format, so it still needs to be transformed to
whatever celeriD needs. An alternative would be to write a "generator"
similar to the VisualD one, which directly outputs a celeriD compatible
build description.

dub describe doesn't give different information about dependencies when --config is changed. All that appears to change is the "configuration" field for the root package.

P.S. there's something really off with this text box in the forum, it expands downwards by a few pixels with every keypress, even just arrow keys.

Re: Best way to get various build info

Am 24.07.2014 16:03, schrieb John Colvin:

On Wed, 23 Jul 2014 15:39:23 +0200, Sönke Ludwig wrote:

Am 23.07.2014 15:13, schrieb John Colvin:

What is the best way to get a list - for a given configuration - of include directories, library directories, libraries, version flags etc...

I need to get this info to pass to another build system (celeriD)

dub describe (with the appropriate configuration/architecture flags).
The output is in JSON format, so it still needs to be transformed to
whatever celeriD needs. An alternative would be to write a "generator"
similar to the VisualD one, which directly outputs a celeriD compatible
build description.

dub describe doesn't give different information about dependencies when --config is changed. All that appears to change is the "configuration" field for the root package.

That would be a bug, do you have a reproduction case you can share? It's
definitely intended to give information about the exact build
configuration that was given - recursively applied to the dependencies.

P.S. there's something really off with this text box in the forum, it expands downwards by a few pixels with every keypress, even just arrow keys.

For which browser/version is that? The vertical scaling was quite hairy
and I settled for a simpler solution than anticipated especially to
avoid such glitches, but apparently that was not enough :(

Re: Best way to get various build info

On Thu, 24 Jul 2014 17:22:02 +0200, Sönke Ludwig wrote:

Am 24.07.2014 16:03, schrieb John Colvin:

On Wed, 23 Jul 2014 15:39:23 +0200, Sönke Ludwig wrote:

Am 23.07.2014 15:13, schrieb John Colvin:

What is the best way to get a list - for a given configuration - of include directories, library directories, libraries, version flags etc...

I need to get this info to pass to another build system (celeriD)

dub describe (with the appropriate configuration/architecture flags).
The output is in JSON format, so it still needs to be transformed to
whatever celeriD needs. An alternative would be to write a "generator"
similar to the VisualD one, which directly outputs a celeriD compatible
build description.

dub describe doesn't give different information about dependencies when --config is changed. All that appears to change is the "configuration" field for the root package.

That would be a bug, do you have a reproduction case you can share? It's
definitely intended to give information about the exact build
configuration that was given - recursively applied to the dependencies.

% cat dub.json
{
	"name": "dubtest",
	"description": "A minimal D application.",
	"copyright": "Copyright © 2014, john",
	"authors": ["john"],
	"targetType": "executable",
            "configurations":
	[
		{
			"name": "a",
			"dependencies": { "derelict-util": ">=1.0.2" }
		},
		{
			"name": "b"
		}
	]
}
% dub describe --config=a > a.json
% dub describe --config=b > b.json
% diff b.json a.json                   
112c112
< 	"configuration": "b",
---
> 	"configuration": "a",

>

P.S. there's something really off with this text box in the forum, it expands downwards by a few pixels with every keypress, even just arrow keys.

For which browser/version is that? The vertical scaling was quite hairy
and I settled for a simpler solution than anticipated especially to
avoid such glitches, but apparently that was not enough :(

linux x64 firefox 30.0

I also see <br> tags everywhere in the forum itself (not the input box). In addition, the preview pane is erratic in it's updates, it sometimes works instantly, other times (in particular on code blocks) it doesn't do anything until something else is changed.

Re: Best way to get various build info

On Fri, 25 Jul 2014 11:35:23 GMT, John Colvin wrote:

On Thu, 24 Jul 2014 17:22:02 +0200, Sönke Ludwig wrote:

Am 24.07.2014 16:03, schrieb John Colvin:

On Wed, 23 Jul 2014 15:39:23 +0200, Sönke Ludwig wrote:

Am 23.07.2014 15:13, schrieb John Colvin:

What is the best way to get a list - for a given configuration - of include directories, library directories, libraries, version flags etc...

I need to get this info to pass to another build system (celeriD)

dub describe (with the appropriate configuration/architecture flags).
The output is in JSON format, so it still needs to be transformed to
whatever celeriD needs. An alternative would be to write a "generator"
similar to the VisualD one, which directly outputs a celeriD compatible
build description.

dub describe doesn't give different information about dependencies when --config is changed. All that appears to change is the "configuration" field for the root package.

That would be a bug, do you have a reproduction case you can share? It's
definitely intended to give information about the exact build
configuration that was given - recursively applied to the dependencies.

% cat dub.json
{
	"name": "dubtest",
	"description": "A minimal D application.",
	"copyright": "Copyright © 2014, john",
	"authors": ["john"],
	"targetType": "executable",
            "configurations":
	[
		{
			"name": "a",
			"dependencies": { "derelict-util": ">=1.0.2" }
		},
		{
			"name": "b"
		}
	]
}
% dub describe --config=a > a.json
% dub describe --config=b > b.json
% diff b.json a.json                   
112c112
< 	"configuration": "b",
---
> 	"configuration": "a",


Any further insight into this? Am I just misunderstanding what dub describe should do?

Re: Best way to get various build info

On Fri, 08 Aug 2014 11:24:56 GMT, John Colvin wrote:

On Fri, 25 Jul 2014 11:35:23 GMT, John Colvin wrote:

% cat dub.json
{
	"name": "dubtest",
	"description": "A minimal D application.",
	"copyright": "Copyright © 2014, john",
	"authors": ["john"],
	"targetType": "executable",
            "configurations":
	[
		{
			"name": "a",
			"dependencies": { "derelict-util": ">=1.0.2" }
		},
		{
			"name": "b"
		}
	]
}
% dub describe --config=a > a.json
% dub describe --config=b > b.json
% diff b.json a.json                   
112c112
< 	"configuration": "b",
---
> 	"configuration": "a",


Any further insight into this? Am I just misunderstanding what dub describe should do?

Okay, dependencies are currently handled specially, so that IDEs can always display the whole dependency tree. But they obviously should have a flag that specifies if a certain dependency is actually to be used (e.g. "dependencies": { "derelict-util": ">=1.0.2", "active": false })*.

But apart from that, build settings should be output correctly. For example this:

"configurations": [
	{
		"name": "a",
		"dependencies": { "derelict-util": ">=1.0.2" },
		"versions": ["TestA"]
	},
	{
		"name": "b",
		"versions": ["TestB"]
	}
]

will output different versions depending on the configuration.

* Added a ticket: #393