Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Fixed package names to allow importing module from external sources #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

theFido
Copy link

@theFido theFido commented Aug 12, 2019

This change is required to allow other projects to import this module. Without it, importing results in a "unexpected module path 'gremgo'" exception during build. Additionally, it would be required to drop the "-neptune" suffix in the name of the repo or it will mismatch the actual package name.

@schwartzmx
Copy link
Owner

Hi @theFido, thanks for the PR, and sorry for breaking that. Is there a reason to drop -neptune, instead of just changing the package name throughout the module?

I'm perfectly ok with changing the name back to gremgo or to another name, either works for me.

@elfido
Copy link

elfido commented Aug 12, 2019

@schwartzmx I tried to keep the -neptune but the module system kept flagging it because it doesn't match the code package name, the modules system is very strict about keeping consistency here.

@schwartzmx
Copy link
Owner

right @elfido I was just thinking on changing the package gremgo-neptune would fix this? https://github.com/schwartzmx/gremgo-neptune/blob/master/client.go#L1

@elfido
Copy link

elfido commented Aug 12, 2019

@schwartzmx I tried that too but my IDE linter flags it as an invalid module name and that's mostly why I though it might work better to fix everything following go standards now :)

@schwartzmx
Copy link
Owner

schwartzmx commented Aug 12, 2019

I just don't know if anyone is already using this as https://github.com/schwartzmx/gremgo-neptune - that's my only concern. Otherwise I'm all for making it more standard

@elfido
Copy link

elfido commented Aug 12, 2019

Yeah, I understand. I mean, for modules I doubt is working for anyone, we tried multiple combinations and nothing seemed to work. But I think you are right and it would break projects using dep or vendor folders. Do you have any idea of how can we make it work for everyone? I tested renaming the package by itself as you suggested but doesn't seem to be working for me. So, I don't see a solution where it just works for all the dependency management approaches.

@@ -1,4 +1,4 @@
module gremgo
module github.com/schwartzmx/gremgo
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elfido should we just be able to change the module path in go.mod to the full url, as described here, https://github.com/golang/go/wiki/Modules#gomod
module github.com/schwartzmx/gremgo-neptune?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we try that and I can make another release?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will give a try, thanks. I'll keep you posted

@kmhagan
Copy link

kmhagan commented Aug 13, 2019

Hi @schwartzmx, you might want to consider the approach nats streaming client took. They renamed their project but also created an archived project with the previous name with an updated README pointing to the new name.

Archived (old name): https://github.com/nats-io/go-nats-streaming
Current (new name): https://github.com/nats-io/stan.go

@schwartzmx
Copy link
Owner

I see, @kmhagan maybe that is the best way to go then, any suggestions on a new name? cc: @elfido

@kmhagan
Copy link

kmhagan commented Aug 13, 2019

If you would like a name other than gremgo and something that's unique, my suggestion would be gremtune :)

@elfido
Copy link

elfido commented Aug 13, 2019

I like that gremtune name

@schwartzmx
Copy link
Owner

schwartzmx commented Aug 14, 2019

@elfido @kmhagan I renamed and moved the project to https://github.com/schwartzmx/gremtune, and I'm going to archive this repository (gremgo-neptune).

Please file an issue there if something still is not right. Also if you have any contributions please feel free to open a PR. Thanks!

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