v2.2.0 fails to compile (reproducible via Nix buildGoModule): missing wiki methods/types in forgejo-sdk #47
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/OpenSpec
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
RFC - Request For Comments
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
hermes-attempted
hermes-needs-clarification
hermes-ready
hermes-review
hermes-wip
human-required
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
agentic-forges/forgejo-mcp#47
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi! Thanks for the project.
I’m currently trying to package forgejo-mcp for Nix/NixOS using buildGoModule.
The build fails reproducibly with Go compile errors in the wiki operation.
Context: Nix packaging
I’m using nixpkgs buildGoModule (pinned dependencies via vendorHash). This makes the build environment “clean” and reproducible.
Nix derivation:
Reproduction
nix build(NixOS / Linux x86_64)go build ./...in a clean environment.Build log excerpt
Expected
forgejo-mcp builds successfully from the v2.2.0 tag.
Suspected cause
It looks like the wiki implementation expects forgejo-sdk to expose wiki methods/types that are not present in:
codeberg.org/mvdkleijn/forgejo-sdk/forgejo/v2.Do you have a recommended forgejo-sdk version / replace directive for this, or should wiki be implemented via custom HTTP calls instead of the SDK?
I’ll have a look at it in the coming days. Thanks for reporting!
@malik I have released https://codeberg.org/goern/forgejo-mcp/src/tag/v2.3.0 please try it out.
feel free to open this issue again if it does not work as expected.
The changes have not fixed it. The package definition now looks like this:
And the logs like this:
I remember i had (maybe) the same problem.
My tip: The Go tool chain tries to update the packages (dependencies) and this does not work because as i understand it the nix build env for it's sake of reproducibility is prohibiting inbound impact (in process updates).
You can check my build solution here: a flake of this mcps
For me as a not very experienced user of nix(os) and go-lang my digging went like that:
I was able to build the repo manually (mutable) so the repo is fine.
I double checked that while changing the linking order of dependencies and got clear that all dependencies weren't working in the build env.
I have not debugged it completely but forcing the build env to act only local and with the given dependencies was doing the trick for me.
I hope that works for you @malik
@byteflavour is there something I can do on my side to test/make sure that it will work on nix?
@byteflavour @malik Thanks for the analysis and the working flake example!
The root cause is that
operation/wiki/wiki.gouses forgejo-sdk methods that don't exist yet in the released SDK (v2.0.0). The wiki tools were never actually registered/enabled, but the code still gets compiled when runninggo build ./....I've added a Go build tag to exclude the wiki package from default builds:
This means:
go build ./...) now skip the wiki package entirelysubPackages = [ "." ]This fix will be in the next release. In the meantime, the workaround with
subPackages = [ "." ]andenv.GOTOOLCHAIN = "local"continues to work.See
docs/plans/wiki-support.mdfor the upstream contribution plan to add wiki methods to forgejo-sdk.@malik let me know if
codeberg.org/goern/forgejo-mcp@7b7536a10dhelpsThanks for your work, the issue is fixed