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

Manifest methods should return maps instead of slices #80

Closed
sdboyer opened this issue Jul 27, 2016 · 0 comments
Closed

Manifest methods should return maps instead of slices #80

sdboyer opened this issue Jul 27, 2016 · 0 comments
Assignees
Milestone

Comments

@sdboyer
Copy link
Owner

sdboyer commented Jul 27, 2016

type Manifest interface {
    DependencyConstraints() []ProjectConstraint
    TestDependencyConstraints() []ProjectConstraint
}

This is dumb.

There is no case in which it makes sense to return more than one ProjectConstraint for a given ProjectRoot. But having the method return a slice allows exactly that. These methods should be changed to return map[ProjectRoot]ProjectProperties - the same as overrides. There are still fugly ambiguities than can occur with a map, but fewer than with a slice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant