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

Change module name to Tyk org #164

Closed
wants to merge 7 commits into from
Closed

Change module name to Tyk org #164

wants to merge 7 commits into from

Conversation

buger
Copy link
Member

@buger buger commented Oct 1, 2021

Unfortunately using replace directive is not possible because of this issue golang/go#30354
Replace directives can be used only for local development and can't be inherited by repos which use module fork.
Also see https://www.reddit.com/r/golang/comments/j8pqms/go_modules_making_me_rage_how_do_i_fork_a_module/

At the moment we have put "replace" directive, with the specific commit of this lib to EVERY project which depends on this lib, even Tyk Dashboard. Additionally, even users who write Go plugins have to add this replaces statement too, which creates terrible developer experience.

At the moment, re-naming all imports and module itself in fork is the only option to solve the issue.

buger added a commit that referenced this pull request Oct 1, 2021
@alephnull
Copy link

I think this is the best way of approaching this issue from the standpoint of DX. These changes would enable our open-source offering to be a better free software citizen.
I agree with Leo that there no other option than a hard fork in technical terms. I am also aware that this is a not just a code problem and impacts ownership. I feel it would be good to have these discussions sooner rather than later.

@buger
Copy link
Member Author

buger commented Oct 4, 2021

One of the downsides of such approach that it can cause quite a lot of merge conflicts. Hard to pull changes from the original upstream and etc. Plus at the moment it is literally just search and replace from text editor, e.g. manual job.

What I want to do is to create a special "tyk" branch, which will be automatically creating Tyk based module version out of master, and our future internal releases will be based on top of it. E.g. it will call some replace commands, maybe internal refactoring tooling https://pkg.go.dev/golang.org/x/tools/refactor/rename, go mod commands and etc. Such hybrid approach should have benefits for bot developers of this module and end-users.

@buger
Copy link
Member Author

buger commented Oct 4, 2021

One of the discussed options is to start using original repo instead of Fork. It is in process of research to clear some legal questions.

@sonarcloud
Copy link

sonarcloud bot commented Oct 5, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.3% 0.3% Duplication

@devsergiy devsergiy marked this pull request as draft November 2, 2021 16:16
@jensneuse jensneuse closed this Nov 8, 2021
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.

3 participants