You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 3, 2018. It is now read-only.
Currently, SourceManager.ListVersions() returns a []Version, but every current vcs-backed implementation is actually returning a []PairedVersion, just with the elements masquerading as Version (which works because PairedVersion composes Version).
I did this originally because I wanted to design against the possibility that some future source implementations might not have PairedVersions to offer. However, this has been misleading for folks working on dep, and because we can't convert slice types, it just ends up being a general PITA.
So, it'd be better just to have SourceManager.ListVersions() return a []PairedVersion, and in the unlikely event there is a source type in the future that has no revisions, they can just return an empty string for it. Implementations can treat the empty string as a special value and act accordingly.
The text was updated successfully, but these errors were encountered:
Currently,
SourceManager.ListVersions()
returns a[]Version
, but every current vcs-backed implementation is actually returning a[]PairedVersion
, just with the elements masquerading asVersion
(which works becausePairedVersion
composesVersion
).I did this originally because I wanted to design against the possibility that some future source implementations might not have
PairedVersion
s to offer. However, this has been misleading for folks working on dep, and because we can't convert slice types, it just ends up being a general PITA.So, it'd be better just to have
SourceManager.ListVersions()
return a[]PairedVersion
, and in the unlikely event there is a source type in the future that has no revisions, they can just return an empty string for it. Implementations can treat the empty string as a special value and act accordingly.The text was updated successfully, but these errors were encountered: