Skip to content

Deprecation plan for dub.json/package.json #789

Open

Description

@wilzbach

Hey,

I am quite new to dub, so I don't know whether this has been discussed before, but from that I can tell by looking at older projects was dub in the beginning inspired by npm and used package.json in its first version. I guess that people pretty fast discovered that it doesn't work well with npm/web projects, so it was renamed to dub.json. At some point you realized that json is a horrible configuration format
and added support for sdl.

=> That's great - you learned from your mistakes and I like sdl too. However I (as a newcomer) think you should move forward. I saw that you already have a tool to convert old json project to sdl, so there's nothing that stops you from deprecation it!

As a first action I recommend to make sdl the default package format on code.dlang.org and add a deprecation warning to json. This is very important for newcomers - I myself bumped into this problem of not knowing that the support for json is deprecated.

And imho for your next major release:

  1. you should deprecate dub.json and package.json
  2. you should remove the documentation for the json format from your website

Activity

  1. s-ludwig commented on Mar 15, 2016

    @s-ludwig
    Member

    Unfortunately (IMO) it was ultimately decided to take a step back and make JSON the prominent default format again. However, while I very much favor the SDLang format, removing support for JSON would be far too disrupting at this point. Instead, it is supposed to stay as a fully supported alternative. But I'd at least agree with going one step further to deprecate "package.json", it should probably result in a warning for both, the CLI and on code.dlang.org).

  2. wilzbach commented on Mar 15, 2016

    @wilzbach
    ContributorAuthor

    Unfortunately (IMO) it was ultimately decided to take a step back and make JSON the prominent default format again.

    Wow that's sad to hear - do you recall the reasons for this decisions?

    Instead, it is supposed to stay as a fully supported alternative

    I don't know any other package manager that supports two formats. It just makes stuff more complicated to document and keep up-to-date. Imho once you decided for which format you want to go, you should make that one the prominent one and let the other at least slip into the background.
    One good example is the installation section at the front of every package page - currently it's for json - even though new projects are created in sdl.

  3. mihails-strasuns commented on Mar 15, 2016

    @mihails-strasuns

    Wow that's sad to hear - do you recall the reasons for this decisions?

    Relevant NG archive (link to Andrei opinion on topic) http://forum.dlang.org/post/[email protected]

    AFAIR Walter and Andrei are pushing for throwing SDL away and sticking to JSON. I personally hope that will never happen :)

  4. s-ludwig commented on Mar 15, 2016

    @s-ludwig
    Member

    Wow that's sad to hear - do you recall the reasons for this decisions?

    Basically, someone started a big flamewar on the newsgroup, which caused some defensive reactions.

    I agree that only having one format is desirable (although there are also differing opinions). But currently there are just two alternatives: drop SDLang, or keep them both. The latter alternative at least gives the chance to reevaluate the switch to SDLang as the default format at a later point in time.

  5. wilzbach commented on Mar 15, 2016

    @wilzbach
    ContributorAuthor

    Basically, someone started a big flamewar on the newsgroup, which caused some defensive reactions.

    Holy shit - that's so sad!

    But currently there are just two alternatives: drop SDLang, or keep them both. The latter alternative at least gives the chance to reevaluate the switch to SDLang as the default format at a later point in time.

    Use the secret backdoor and slowly make SDLang the standard ;-)

    On a related matter I proposed to add the install syntax directly to a package's registry entry as it format independent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions