March 04, 2023
On 04/03/2023 11:56 AM, Bradley Chatha wrote:
> On Friday, 3 March 2023 at 22:12:46 UTC, 0xEAB wrote:
>> Your IDE is probably also better at auto completing DUB recipe property names than general file syntax.
> 
> It'd be better if we had a JSON schema file for dub.json as well. If we were to get it into https://www.schemastore.org/json/ then VSCode at the very least would be able to make use of it automatically. Slightly less painful than having to tab between your editor and the dub.json documentation.

We do have one.

I don't think it is maintained on dub's end, but one does exist.

https://github.com/intellij-dlanguage/intellij-dlanguage/blob/develop/dub/src/main/resources/jsonSchema/dub.json-schema.json
March 03, 2023
On Friday, 3 March 2023 at 22:56:57 UTC, Bradley Chatha wrote:
> It'd be better if we had a JSON schema file for dub.json as well.

You’re welcome:
https://github.com/Pure-D/code-d/blob/master/json-validation/dub.schema.json

Part of the code-d extension btw.
March 04, 2023
On Friday, 3 March 2023 at 23:27:01 UTC, 0xEAB wrote:
> On Friday, 3 March 2023 at 22:56:57 UTC, Bradley Chatha wrote:
>> It'd be better if we had a JSON schema file for dub.json as well.
>
> You’re welcome:
> https://github.com/Pure-D/code-d/blob/master/json-validation/dub.schema.json
>
> Part of the code-d extension btw.

And newest dub auto-checks dub.json so you don't have to use it anymore.
March 04, 2023
On 2/28/2023 6:29 AM, Mathias LANG wrote:
> Opinions ?

I don't know much technically about the various formats, but on a non-technical basis:

1. We win if we go with a well-known, popular format. We are not in the business of promoting an obscure format or inventing our own. We picked github and git long ago simply because it was the most popular, and that decision paid off handsomely for us. As you wrote, it minimizes user friction.

2. We need a quality import/export mechanism for it written in D with an easy license (preferably Boost).

I'm on board with whatever you choose.

March 04, 2023

On 3/4/23 6:25 AM, Guillaume Piolat wrote:

>

On Friday, 3 March 2023 at 23:27:01 UTC, 0xEAB wrote:

>

On Friday, 3 March 2023 at 22:56:57 UTC, Bradley Chatha wrote:

>

It'd be better if we had a JSON schema file for dub.json as well.

You’re welcome:
https://github.com/Pure-D/code-d/blob/master/json-validation/dub.schema.json

Part of the code-d extension btw.

And newest dub auto-checks dub.json so you don't have to use it anymore.

The schema helps with autocomplete though.

-Steve

March 04, 2023
On 3/1/2023 6:50 AM, Steven Schveighoffer wrote:
> We are stuck forever with both JSON and SDL as valid config formats, even if they are deprecated/undocumented.

Since the code to support them is already written, would we need to do more than just not delete it?
March 05, 2023
On 05/03/2023 9:43 AM, Walter Bright wrote:
> Since the code to support them is already written, would we need to do more than just not delete it?

The entire configuration system was replaced with configy which in turns uses some of the same libraries, but swaps others out like dyaml instead of std.json.

This has increased build times by a noticeable amount. I did push back originally to keep the old system in place, but ultimately it is gone now. All in the hope of improving error messages, successfully I might add.
March 04, 2023

On Saturday, 4 March 2023 at 21:01:45 UTC, Richard (Rikki) Andrew Cattermole wrote:

>

This has increased build times by a noticeable amount.

Are you talking about the time it takes to build dub, or the time dub takes to build a project ?

March 05, 2023
On 05/03/2023 11:12 AM, Mathias LANG wrote:
> On Saturday, 4 March 2023 at 21:01:45 UTC, Richard (Rikki) Andrew Cattermole wrote:
>> This has increased build times by a noticeable amount.
> 
> Are you talking about the time it takes to build dub, or the time dub takes to build a project ?

The time it takes to build dub.

The other is also a problem of course, but with the former being slow it doesn't make the latter easier to fix.
March 04, 2023
On Tuesday, 28 February 2023 at 14:29:28 UTC, Mathias LANG wrote:
> Currently, Dub uses two formats: JSON and SDL.
...
> But JSON is a terrible format to write configurations in, given how verbose it is, and it lacking support for comments.
...
> Obviously such a change would not happen overnight, and would need broad support from the community. Opinions ?

Anything than supports comments would we welcomed by me.  Adopting Json5 seems like the least painful.

Also, putting the build information into the source is what I do most of the time anyway, then calling `dub build --single` from a makefile.