Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

go install of irc-medialink fails with replace directive in main module #75

Open
zapotah opened this issue Jan 28, 2023 · 1 comment
Open
Assignees

Comments

@zapotah
Copy link

zapotah commented Jan 28, 2023

go install fails with
#go install github.com/icedream/irc-medialink@latest
go: github.com/icedream/irc-medialink@latest (in github.com/icedream/irc-medialink@v1.2.0):
The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.

This is discussed in golang/go#44840 and golang/go#40276

@icedream icedream self-assigned this Feb 6, 2023
@icedream
Copy link
Owner

icedream commented Feb 6, 2023

  • We have to check whether same behavior applies if the main code is moved to a cmd/medialink subpackage.
    • If yes, just do that and tag it as new minor. makes no difference
    • If no, We can't really get rid of the replace in go.mod now as the forked version of go-reddit has Application Only authentication built in which we use.
      • We could vendor everything. I would rather want to stay away from having to copy dependencies into my own repository though.
      • We could fork the fork and change the import paths. That seems like the most ugly solution as it is slightly discrediting, detaching from Git flow and high-maintenance to keep track. We have another potential fork used on develop.
      • We could try and find an alternative implementation. This seems unlikely to happen as go-reddit is pretty much the go-to library for Reddit access.
      • We could remove the dependency and reimplement just the parts we need. If things come to worst, this may be the path to go for. We have another potential fork used on develop.
      • We could remove the Reddit parser code altogether. Lowest effort solution with a feature dropped that we literally just introduced. We have another potential fork used on develop.

EDIT: Striking out a few of the solutions based on the fact there is another potential feature (code not uploaded yet) requiring usage of a fork.

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

No branches or pull requests

2 participants