Skip to content
This repository was archived by the owner on Feb 3, 2018. It is now read-only.
This repository was archived by the owner on Feb 3, 2018. It is now read-only.

Change SourceManager.ListVersions() to return []PairedVersion #202

@sdboyer

Description

@sdboyer

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions