Skip to content

Allow module to be directly required#1

Closed
Uzume wants to merge 1 commit intocli:named-queriesfrom
Uzume:patch-1
Closed

Allow module to be directly required#1
Uzume wants to merge 1 commit intocli:named-queriesfrom
Uzume:patch-1

Conversation

@Uzume
Copy link

@Uzume Uzume commented Nov 20, 2020

Allow module to be directly required without needing a replace directive.

This directly affects cli/cli#1389.

For reference, it might be good to consider pushing this type of thing upstream, e.g., shurcooL#53.

Allow module to be directly required without needing a replace directive.
Uzume referenced this pull request Nov 20, 2020
Copy link

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Thanks for the suggestion!

@@ -1,4 +1,4 @@
module github.com/shurcooL/graphql
module github.com/cli/shurcooL-graphql
Copy link

@mislav mislav Nov 23, 2020

Choose a reason for hiding this comment

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

By just doing this one-line change, is the cli/cli project that depends on this fork now immediately go-getable? Wouldn't we need to also replace every github.com/shurcooL/graphql import directive in this fork with ithub.com/cli/shurcooL-graphql?

Copy link
Author

Choose a reason for hiding this comment

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

I believe so, yes. I did a quick code search and beyond the go.mod there only seem to be a few references:

That said, some of its other dependencies also refer to the same thing:

So perhaps such a change would not work without further forking that as well (however that module is even smaller than this one).

The political approach is to push for these:

I am not sure how long that would take though (especially since they both seem to have bogus failures in their CI).

@Uzume
Copy link
Author

Uzume commented Nov 24, 2020

@mislav It is too bad you cannot directly refer to shurcooL/graphql@a4a48d3 in go.mod with a line like:

       github.com/shurcooL/graphql v0.0.0-20200728183420-a4a48d3af0f4

I tried this and make just complained with an invalid version: unknown revision error.

@samcoe
Copy link

samcoe commented Nov 16, 2021

Going to close this as #3 will address this and allow the module to be required.

@samcoe samcoe closed this Nov 16, 2021
@Uzume Uzume deleted the patch-1 branch November 17, 2021 06:08
@Uzume Uzume restored the patch-1 branch November 17, 2021 06:14
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