Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split examples from library #289

Open
pires opened this issue Apr 19, 2017 · 7 comments
Open

Split examples from library #289

pires opened this issue Apr 19, 2017 · 7 comments
Labels

Comments

@pires
Copy link
Contributor

pires commented Apr 19, 2017

Mixing library code and dependencies with examples seems a little messy and actually limits adopting dependency management solutions like glide (see #283). Therefore, I suggest moving examples to a new repo, i.e. mesos-go-examples.

@pires
Copy link
Contributor Author

pires commented Apr 19, 2017

It's actually breaking godoc usage for v1 as one must navigate to https://godoc.org/github.com/mesos/mesos-go/api/v1/lib to actually see the documentation.

@jdef
Copy link
Contributor

jdef commented Apr 20, 2017 via email

@pires
Copy link
Contributor Author

pires commented Apr 20, 2017

I'm not arguing v0 and v1 should be split. I'm arguing examples could move to a separate repo.

Now, the fact v1 code is in folder api/v1/lib makes godoc unable to render the doc unless you explicitly navigate to the api/v1/lib. If examples were to move elsewhere, you wouldn't need the lib folder.

@pires
Copy link
Contributor Author

pires commented Apr 20, 2017

@jdef
Copy link
Contributor

jdef commented Apr 21, 2017

Thought about this proposal some more. I think there's real value in keeping the examples and the library code in the same repo. Maybe the "nature" of the examples should change. For example, they could be repackaged in the form of automated e2e tests.

Your point about "messy" dependencies is noted. However, even if the examples are refactored into automated e2e tests that doesn't solve the dependency issue.

The fact that godoc users need to "click through" to the lib package to see the API types doesn't bother me at all. To reduce the "surprise" factor for this, we could add a doc.go file to the api/v1 package to add commentary that directs users to the appropriate subpackage (and provides example library usage).

@pires
Copy link
Contributor Author

pires commented Apr 21, 2017

I can second that.

@jdef jdef added the api/v1 label Apr 24, 2017
@jdef
Copy link
Contributor

jdef commented Apr 24, 2017

skeleton docs in #292

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

No branches or pull requests

2 participants