-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
unable to go run
/ go install
directly
#806
Comments
TBH I haven't taken a look at this tool for sometime now, but the thing is I kind of got tired of having to sync the cli and the library. So for starters: I didn't want to include the CLI with the library because pulling the library should not have to include CLI tools. Then regardless of its location, it needs to be a go module. I grew tired of this, and at some point I snuck in that go.mod with a However, this implies that you would need the following operations to install the library:
Anyways, that's the current situation. I'm willing to look into better ways, but what I do NOT want to do are:
So unfortunately I do not want to do either of your suggestions :/ |
Hm. I can understand you don't want to add the CLI parser to the go.mod of the library, if you want to keep the dependency closure small. However, the root If you want to keep two go modules, you could move things around, have the library and cli be their own independent modules at the repo root, as described here, but I'm not sure if local relative replacements would work for the |
TBH I don't see jwx as the main dish of this module -- it's more like "Hey, you could do this if you want" type of tool. I believe I do owe a better/up-to-date (and correct) explanation in the README, but I'm not sure I want to do anything with jwx the CLI. Please correct me if I'm wrong and there's a cool way to solve all of my pain points while allowing a clean |
Understood. But if this is meant more as an example on how to use the library, I'd really suggest to make it self-consistent (without the relative import replacement), so it can be copied around by people adopting it. The I checked other projects, https://github.com/philippgille/gokv/blob/master/examples/go.mod for example has a nested |
Ah, and apparently even with the approach currently used in the repo, you still need to bump go.sum whenever there's a change in the root |
No, I want the jwx CLI to always be in sync. Otherwise it would confuse me when bug reports arrive. Trust me, I've been doing this OSS maintenance for 20 years.
|
I'd argue bumping a go.mod could also be automated by GH actions, but hey, it's your decision. Thanks for exchanging opinions on this. |
If you are expecting me to write the code and maintain it, then right. It's my decision, and end of story. But if you have an actual implementation that fulfills what I want, and are willing to help me maintain it, please feel free to enlighten and embarrass me for not being able to pull this off. Again, I'm not against the idea. I'm against doing anything more than minimal work to keep maintaining it. |
If the "two repositories" proposal would have been an option, I would have helped with the PR in this repo, and the new structure in the other repo. There could have been some dependabot GH action automation in place that'll open a PR for you whenever you do a new release of the library, keeping the maintenance effort quite low, while still allowing But yeah, so far all the suggestions were turned down, so I guess we'll just leave it like that. |
I hear you. I know my requirements are pretty hard, but I was wondering if there was a ingenious way to do it. One thing that I want to stress is that my requirements basically boil down to ">>I<< don't want to do maintenance". So if you are up to long term commitment, you can always volunteer to maintain |
Apparently, #809 did now implement this "independent |
Hmm? So you mean it's not that we had multiple And speaking of which, the release.sh script is half-baked because I abandoned the idea of doing it right... I need to fix it |
The root-level go.mod still seems to be a problem for
However, the CLI now is self-contained - it contains a pin of |
I was able to fix this on my fork by simply:
Such that this command worked for me
this golang issue seems related: golang/go#34055 |
Describe the bug
I tried to execute the
jwx
binaries (fromcmd/jwx
) directly, throughgo run
:To Reproduce / Expected behavior
Additional context
I think it's due to the funky
go.mod
file in thecmd/jwx
folder.I read https://go.dev/doc/modules/managing-source, and it looks like it's not really supported to have nested go modules?
I tried removing
cmd/jwx/go.{sum,mod}
, but then the build fails due github.com/urfave/cli/v2
not in the top-levelgo.mod
.What do you think about removing
cmd/jwx/go.{sum,mod}
, and adding thecmd/jwx
dependencies into the rootgo.{sum,mod}
, or if that's not an option, moving the cli tools into a separate repo?The text was updated successfully, but these errors were encountered: