-
Notifications
You must be signed in to change notification settings - Fork 15
Allow using 1.12.x patch versions of dub #17
Allow using 1.12.x patch versions of dub #17
Conversation
The `~>1.12.0` syntax (which is short for `>=1.12.0 <1.13.0`) should be preferred as it allows bug fixes from dub to propagate to dls, while preventing breaking changes. For this to work, the exact dub version should be removed from `dub.selections.json`, as this file overrides any flexibility in `dub.json` / `dub.sdl`. See the pull request which merged this commit for more details.
I originally had tried using fixed dependencies in |
Do you need a new tag for buildkite ? |
This is the wrong fix. It’s correct to use |
This is why I opened up dlang/ci#345, to put Dub back in |
Hmm, I see. But I don’t see why a separate tag can’t be created for Dub without doing a full release of DMD. |
Tagged the patched dub as https://github.com/dlang/dub/releases/tag/v1.12.0-1 See also: dlang/dub#1601 (comment) |
I'll update as soon as it's up on code.dlang.org |
Ah damn. I remembered SemVer wrongly:
So |
I see there is a |
I don't see this. I only see 1.12.0-rc.1
Good idea, I renamed it to |
Actually my eyes were wrong, there is only 1.12.0-rc.1 indeed. |
A new tag using dub 1.12.1-alpha.1 is up |
The
~>1.12.0
syntax (which is short for>=1.12.0 <1.13.0
) should be preferred as it allows bug fixes published as patch versions from dub to propagate to dls, while preventing breaking changes (if we assume that such may happen in a minor version). For this to work, the exact dub version should be removed fromdub.selections.json
, as this file overrides any flexibility indub.json
/dub.sdl
.Context:
All pull requests against core D repos (dmd, druntime, phobos and dub) in addition to their own testing, are also tested on the BuildKite project tester (e.g. https://github.com/dlang/ci).
It builds and tests popular projects such as yours with the combination of the master branches of all D repos and the branch of the PR. For example, a PR against dmd would combine: dmd/pull9017 + druntime/master + phobos/master + dub/master, where as a PR against druntime would combine: dmd/master + druntime/pull2376 + phobos/master + dub/master.
A DMD bug fix dlang/dmd#9017 is blocked a by wrong cast in dub's code base. The wrong cast was removed in dlang/dub#1600, however your project is still failing on BuildKite for dlang/dmd#9017, because due to the way
dub.json
anddub.selections.json
were configured, only dub1.12.0
can be used.With this pull request is accepted, if we publish the fix in a dub patch release (e.g.
1.12.1
), when your project is build on BuildKite it will automatically use that version, instead of1.12.0
. This is necessary for dlang/dmd#9017 to succeed on BuildKite.To ease maintenance in the future, prefer using the version specification format which allows a range of patch versions (e.g.
~>1.12.0
,~>1.13.0
, and so on) and don't commit to git changes todub.selections.json
that add a fixed version of dub.Of course,
dub.selections.json
has its place - locking dependency versions is a good idea for applications that don't trust their dependencies w.r.t breaking changes, but given that no PRs against dub will be accepted if they break your project, I think it's reasonable to trust the dub release process in this case.