RejectedSoftware Forums

Sign up

dub/code.dlang.org registry support in bigger upstream projects

Hi all,

I just noticed that Shin Myoung-Su added a package for my Thrift D bindings to the code.dlang.org registry. While I'm happy to see this happening in general – after all, I have been meaning to do that myself –, I'm not so fond of the way it was executed.

Basically, dub requires
1) a package.json file to be in the root directory, and
2) the repository to be hosted on GitHub/Bitbucket.

Requirement 2) isn't such a big problem here, as all the Apache repositories are mirrored on GitHub, but because of 1), Shin had no other option than to manually create a repository containing a snapshot of the official repository on his GitHub account (I presume, at least, as I haven't heard from him yet).

This is quite obviously a suboptimal solution, as it disconnects DUB, which is quickly becoming the "blessed" way to obtain D libraries, from official upstream development and the associated release process.

Ideally, I'd like to incorporate the required metadata in the upstream repository, but currently, this is not quite realistic, as I don't think a patch adding a "package.json" file in the root directory of the repository (shared among all languages supported by Thrift) would be accepted upstream, for two reasons:

1) The file really belongs into the lib/d subdirectory, as it doesn't have anything to do with the other languages.
2) "package.json" is not very descriptive, and conflicts with node.js/npm.

Regarding 1), would it be possible to add a field for the "root" path to the registry? Any other bigger projects that do not exclusively support D are likely to run into similar problems.

And regarding 2), I already found a mention of "dub.json" somewhere in the dub(-registry) source code. Are there plans to follow through with this and support it in dub? In fact, I'd even like to see become the default, as it is much more self-descriptive and avoids confusion with Node, which is certainly the more widely known and used library at this point.

Thanks,
David

Re: dub/code.dlang.org registry support in bigger upstream projects

I like how Arch Linux handles this with AUR/PKGBUILD's :P

Re: dub/code.dlang.org registry support in bigger upstream projects

Just noticed that I've accidentally sent an email instead of replying to the newsgroup. This is the original message:

Am 06.01.2014 18:18, schrieb David Nadlinger:

Hi all,

I just noticed that Shin Myoung-Su added a package for my Thrift D bindings to the code.dlang.org registry. While I'm happy to see this happening in general – after all, I have been meaning to do that myself –, I'm not so fond of the way it was executed.

Basically, dub requires
1) a package.json file to be in the root directory, and
2) the repository to be hosted on GitHub/Bitbucket.

Requirement 2) isn't such a big problem here, as all the Apache repositories are mirrored on GitHub, but because of 1), Shin had no other option than to manually create a repository containing a snapshot of the official repository on his GitHub account (I presume, at least, as I haven't heard from him yet).

This is quite obviously a suboptimal solution, as it disconnects DUB, which is quickly becoming the "blessed" way to obtain D libraries, from official upstream development and the associated release process.

Ideally, I'd like to incorporate the required metadata in the upstream repository, but currently, this is not quite realistic, as I don't think a patch adding a "package.json" file in the root directory of the repository (shared among all languages supported by Thrift) would be accepted upstream, for two reasons:

1) The file really belongs into the lib/d subdirectory, as it doesn't have anything to do with the other languages.
2) "package.json" is not very descriptive, and conflicts with node.js/npm.

Regarding 1), would it be possible to add a field for the "root" path to the registry? Any other bigger projects that do not exclusively support D are likely to run into similar problems.

That should be relatively simple, I'll do that when I get some time.

And regarding 2), I already found a mention of "dub.json" somewhere in the dub(-registry) source code. Are there plans to follow through with this and support it in dub? In fact, I'd even like to see become the default, as it is much more self-descriptive and avoids confusion with Node, which is certainly the more widely known and used library at this point.

Definitely, the plan was originally to defer that to post 0.9.21, but recent changes have raised the priority for it. There is already a "dub_json" branch for that, but it will need some testing (as well as the revamped build graph code).

Re: dub/code.dlang.org registry support in bigger upstream projects

On Mon, 06 Jan 2014 17:18:51 GMT, David Nadlinger wrote:

I just noticed that Shin Myoung-Su added a package for my Thrift D bindings to the code.dlang.org registry. While I'm happy to see this happening in general – after all, I have been meaning to do that myself –, I'm not so fond of the way it was executed.
...
This is quite obviously a suboptimal solution, as it disconnects DUB, which is quickly becoming the "blessed" way to obtain D libraries, from official upstream development and the associated release process.

I am really interested to see this sorted out. The disconnection from the official upstream thrift repo worries me a little bit.

Regards
Tavi Cacina