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

Relocate examples to a separate repository #1100

Merged
merged 5 commits into from Jun 21, 2021

Conversation

sagikazarmark
Copy link
Contributor

@sagikazarmark sagikazarmark commented Jun 4, 2021

Repurposed this PR to relocate examples to a separate repository.

Should be merged once https://github.com/sagikazarmark/examples is moved to go-kit.


This PR is a proof of concept of how a separate examples module would look like. Although submodules in a single repo are discouraged, this module is not supposed to be used as a dependency in other modules, so it should be fine. (The alternative would be moving examples to a separate repo, but I don't think that's a good idea)

The advantage of making the examples package a separate module is that the root module can get rid of quite a few dependencies only used in examples.

Some disadvantages of making this move:

The biggest risk is an ambiguous import path error, but it should be fine as long as people don't import the examples package (I think) which they shouldn't anyway. The alternative is renaming the package to something else.

go getting the go-kit package will no longer download the examples, so any documentation will have to be updated. However, every since go modules, go get is no longer the primary way to download the source code for a module, so this shouldn't be a problem either.

Last, but not least: updating dependencies would become somewhat redundant (common dependencies need to be updated in both modules)

In my opinion, the benefits outweigh the costs.

WDYT? @peterbourgon @ChrisHines

@sagikazarmark sagikazarmark changed the title Make the examples module a separate package Make the examples package a separate module Jun 4, 2021
@peterbourgon
Copy link
Member

Sorry, no. But breaking examples out to a separate repo + module would be fine!

@sagikazarmark
Copy link
Contributor Author

Do you want to preserve history (similar to the log module)? IMHO it's not that important for examples, but I can prepare a separate repo with the history preserved if you prefer that way.

@ChrisHines
Copy link
Member

The benefit of reducing the dependencies of go-kit/kit is worth breaking the examples out in some fashion. I'm not particular about making it a nested module or a separate repo, so I'll just second @peterbourgon's vote of a separate repo. I think it is polite to contributors to preserve the history, so I would prefer that approach.

@sagikazarmark
Copy link
Contributor Author

I prepared a repository here: https://github.com/sagikazarmark/kit-examples

I added you both as collaborators

I opened a PR with the necessary changes to make the repo functional: go-kit/examples#1

I'd suggest merging the PR if you are satisfied with the changes and then transferring (and renaming) the repo.

@peterbourgon
Copy link
Member

Is it possible to transfer a repo in this way? Any docs? Never done it before.

@sagikazarmark
Copy link
Contributor Author

sagikazarmark commented Jun 6, 2021

@sagikazarmark sagikazarmark changed the title Make the examples package a separate module Relocate examples to a separate repository Jun 11, 2021
@sagikazarmark
Copy link
Contributor Author

Repurposed this PR to relocate examples to a separate repository.

Should be merged once https://github.com/sagikazarmark/examples is moved to go-kit.

@sagikazarmark
Copy link
Contributor Author

@peterbourgon GitHub doesn't allow me to move the repo: go-kit/examples#1 (comment) :

Er... something is not right. GitHub says:

You don’t have the permission to create public repositories on go-kit

🤷

@sagikazarmark
Copy link
Contributor Author

So after reading the documentation, I need permission to create repos which I don't have at the moment.

@peterbourgon if you trust that I'm not going to abuse my new powers, you can give me repo create permission temporarily.

The alternative is what I wanted to do originally: I transfer the repo to you and you can transfer it to the go-kit organization.

This was referenced Jun 18, 2021
@sagikazarmark sagikazarmark added this to the v0.11.0 milestone Jun 19, 2021
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
@peterbourgon
Copy link
Member

Apologies for the delay. I should be back up and running at full capacity in about 2 weeks.

You should be able to create repos now, @sagikazarmark — can you confirm?

@sagikazarmark
Copy link
Contributor Author

Yep, thanks @peterbourgon. No worries!

The repo is moved here: https://github.com/go-kit/examples

If you are all happy with the result, we can merge this PR as well.

@sagikazarmark sagikazarmark merged commit 4bb60ac into go-kit:master Jun 21, 2021
@sagikazarmark sagikazarmark deleted the examples-module branch June 21, 2021 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants