Skip to content
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

syncthing: Update to 0.13.2. Update legacy version to 0.12.25 #15674

Closed
wants to merge 1 commit into from

Conversation

lfam
Copy link

@lfam lfam commented May 24, 2016

Motivation for this change

Version 0.13.x is the latest release series of Syncthing, including many improvements and bug fixes, including a security fix:
https://forum.syncthing.net/t/syncthing-v0-13-2-and-v0-12-25-released/7421

We keep the previous release series packaged because there are 3rd party implementations that may not have been updated to 0.13.x, which is incompatible with 0.12.x.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

  • pkgs/top-level/go-packages.nix (syncthing): Update to 0.13.2.
    (syncthing-011): Replace with ...
    (syncthing-012): ... this.

@polendri
Copy link
Contributor

You're missing a semicolon :P. I was just in the process of doing precisely this myself, but I'm a nix (and Go) newb so I couldn't figure out how to test it. Would anyone be kind enough to link to or explain how to go about that? A "nix-build -A goPackages.syncthing" was throwing me all kinds of build errors, e.g. "undefined: xdr.Marshaller".

@polendri
Copy link
Contributor

Also, syncthing-protocol has a syncthing-protocol011 counterpart, so perhaps that one also ought to have a syncthing-protocol012 added?

rev = "v${version}";
owner = "syncthing";
repo = "syncthing";
sha256 = "0c0dcvxrvjc84dvrsv90790aawkmavsj9bwp8c6cd6wrwj3cp9lq";
sha256 = "108w7gvm3nbbsgp3h5p84fj4ba0siaz932i7yyryly486gzvpm43;"
Copy link
Member

Choose a reason for hiding this comment

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

The semicolon is in the wrong place here.

@lfam
Copy link
Author

lfam commented May 24, 2016

The semicolon is in the wrong place here.

Sorry for not testing. An updated patch is on the way...

Also, syncthing-protocol has a syncthing-protocol011 counterpart, so perhaps that one also ought to have a syncthing-protocol012 added?

I asked on #syncthing, and it turns out that the protocol code is now included in syncthing. The protocol repository is maintained as a reference.

@lfam
Copy link
Author

lfam commented May 24, 2016

A "nix-build -A goPackages.syncthing" was throwing me all kinds of build errors, e.g. "undefined: xdr.Marshaller".

This happens to me, too.

The syncthing012 package also fails to build, as below. Any advice?

$ nix-build -A syncthing012 nixpkgs/default.nix 
these derivations will be built:
  /nix/store/iix2sx7ah88yjkr2mm0ndh11vsw2bv2k-go1.5-syncthing-0.12.25.drv
building path(s) ‘/nix/store/b2gbmyi61fyk9y4k2s4nng9lfmqvx437-go1.5-syncthing-0.12.25-bin’, ‘/nix/store/lc2g10hdf9rxyarjq9ycvm9w9917nh3w-go1.5-syncthing-0.12.25’
unpacking sources
unpacking source archive /nix/store/pppgz2sw84akwzj63fqfn5g7l1x0kivi-syncthing-v0.12.25-src
source root is syncthing-v0.12.25-src
patching sources
configuring
grep: Invalid range end
building
Renaming code.google.com/p/snappy-go/snappy to github.com/golang/snappy
Renaming github.com/bugsnag/osext to github.com/kardianos/osext
Renaming bitbucket.org/kardianos/osext to github.com/kardianos/osext
Renaming code.google.com/p/go.crypto to golang.org/x/crypto
Renaming github.com/golang/crypto to golang.org/x/crypto
Renaming code.google.com/p/go.net to golang.org/x/net
Renaming github.com/hashicorp/go.net to golang.org/x/net
Renaming github.com/golang/net to golang.org/x/net
Renaming github.com/golang/text to golang.org/x/text
can't load package: package github.com/syncthing/syncthing: no buildable Go source files in /tmp/nix-build-go1.5-syncthing-0.12.25.drv-0/go/src/github.com/syncthing/syncthing
github.com/syncthing/syncthing/lib/logger
github.com/syncthing/syncthing/lib/dialer
github.com/syncthing/syncthing/lib/sync
github.com/syncthing/syncthing/lib/osutil
github.com/syncthing/syncthing/lib/symlinks
github.com/syncthing/syncthing/cmd/stcompdirs
github.com/syncthing/syncthing/cmd/stevents
go/src/github.com/syncthing/syncthing/lib/scanner/walk.go:19:2: cannot find package "github.com/rcrowley/go-metrics" in any of:
        /nix/store/b7373bfmsvkjkd7z953ygq6gq9x53kkl-go-1.5.3/share/go/src/github.com/rcrowley/go-metrics (from $GOROOT)
        /tmp/nix-build-go1.5-syncthing-0.12.25.drv-0/go/src/github.com/rcrowley/go-metrics (from $GOPATH)
        /nix/store/39nw79qp1dd9rcnxc799iamg0abh4vgl-go1.5-go-lz4-74ddf82/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/li1x7n5bc22ixp5r5pxacb59022amsfw-go1.5-du-2015-08-05/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/vw9wbig5gc5112ykzp419l92nyb1xr6r-go1.5-luhn-2015-01-13/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/6xnny2bi0c15bwvfxgn2qv13rx6z5fnm-go1.5-xdr-2015-04-08/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/ppm1f4ydchnjb41k1xgxz0sjykvg35xw-go1.5-snappy-2015-07-21/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/vnm92gx6gljqadb0al5cd758i8skik5s-go1.5-ratelimit-2015-06-19/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/9qhacypb046j7byidasifg2pw26w95cf-go1.5-osext-29ae4ff/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/20858bwpazwqnc68rm4p5x9vh2n13q36-go1.5-goleveldb-2015-08-19/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/v5kr9v1dyhwk349z07ipp4przqzg3v9c-go1.5-ginkgo-5ed93e4/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/qalfp24v5x4bf32wqh5ia7d4r0hlac76-go1.5-gomega-8adf9e1/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/9qfcangaz55s8xzvdahwppv0jx3vvy96-go1.5-suture-1.0.1/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/1h4xp9ms82h85bhxp1grxxkkm6sdy8qs-go1.5-qart-ccb109c/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/23fzqsqv90ac67kg98g9m6cfr43yfpr4-go1.5-crypto-2015-08-29/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/8xc5qw2zb18b8y6labn0b98lsrvnbk95-go1.5-net-2015-11-04/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/wfx69xmh8q9pn6wynk6pc6jlsfx958x4-go1.5-text-2015-08-27/share/go/src/github.com/rcrowley/go-metrics
github.com/syncthing/syncthing/lib/events
github.com/syncthing/syncthing/lib/protocol
github.com/syncthing/syncthing/lib/config
github.com/syncthing/syncthing/lib/beacon
github.com/syncthing/syncthing/lib/discover
github.com/syncthing/syncthing/cmd/stfinddevice
github.com/syncthing/syncthing/lib/db
github.com/syncthing/syncthing/cmd/stindex
github.com/syncthing/syncthing/lib/signature
github.com/syncthing/syncthing/lib/upgrade
github.com/syncthing/syncthing/cmd/stsigtool
github.com/syncthing/syncthing/cmd/stwatchfile
go/src/github.com/syncthing/syncthing/cmd/syncthing/gui.go:28:2: cannot find package "github.com/rcrowley/go-metrics" in any of:
        /nix/store/b7373bfmsvkjkd7z953ygq6gq9x53kkl-go-1.5.3/share/go/src/github.com/rcrowley/go-metrics (from $GOROOT)
        /tmp/nix-build-go1.5-syncthing-0.12.25.drv-0/go/src/github.com/rcrowley/go-metrics (from $GOPATH)
        /nix/store/39nw79qp1dd9rcnxc799iamg0abh4vgl-go1.5-go-lz4-74ddf82/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/li1x7n5bc22ixp5r5pxacb59022amsfw-go1.5-du-2015-08-05/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/vw9wbig5gc5112ykzp419l92nyb1xr6r-go1.5-luhn-2015-01-13/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/6xnny2bi0c15bwvfxgn2qv13rx6z5fnm-go1.5-xdr-2015-04-08/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/ppm1f4ydchnjb41k1xgxz0sjykvg35xw-go1.5-snappy-2015-07-21/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/vnm92gx6gljqadb0al5cd758i8skik5s-go1.5-ratelimit-2015-06-19/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/9qhacypb046j7byidasifg2pw26w95cf-go1.5-osext-29ae4ff/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/20858bwpazwqnc68rm4p5x9vh2n13q36-go1.5-goleveldb-2015-08-19/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/v5kr9v1dyhwk349z07ipp4przqzg3v9c-go1.5-ginkgo-5ed93e4/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/qalfp24v5x4bf32wqh5ia7d4r0hlac76-go1.5-gomega-8adf9e1/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/9qfcangaz55s8xzvdahwppv0jx3vvy96-go1.5-suture-1.0.1/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/1h4xp9ms82h85bhxp1grxxkkm6sdy8qs-go1.5-qart-ccb109c/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/23fzqsqv90ac67kg98g9m6cfr43yfpr4-go1.5-crypto-2015-08-29/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/8xc5qw2zb18b8y6labn0b98lsrvnbk95-go1.5-net-2015-11-04/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/wfx69xmh8q9pn6wynk6pc6jlsfx958x4-go1.5-text-2015-08-27/share/go/src/github.com/rcrowley/go-metrics
can't load package: package github.com/syncthing/syncthing/cmd/todos: no buildable Go source files in /tmp/nix-build-go1.5-syncthing-0.12.25.drv-0/go/src/github.com/syncthing/syncthing/cmd/todos
github.com/syncthing/syncthing/lib/auto
go/src/github.com/syncthing/syncthing/lib/scanner/walk.go:19:2: cannot find package "github.com/rcrowley/go-metrics" in any of:
        /nix/store/b7373bfmsvkjkd7z953ygq6gq9x53kkl-go-1.5.3/share/go/src/github.com/rcrowley/go-metrics (from $GOROOT)
        /tmp/nix-build-go1.5-syncthing-0.12.25.drv-0/go/src/github.com/rcrowley/go-metrics (from $GOPATH)
        /nix/store/39nw79qp1dd9rcnxc799iamg0abh4vgl-go1.5-go-lz4-74ddf82/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/li1x7n5bc22ixp5r5pxacb59022amsfw-go1.5-du-2015-08-05/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/vw9wbig5gc5112ykzp419l92nyb1xr6r-go1.5-luhn-2015-01-13/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/6xnny2bi0c15bwvfxgn2qv13rx6z5fnm-go1.5-xdr-2015-04-08/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/ppm1f4ydchnjb41k1xgxz0sjykvg35xw-go1.5-snappy-2015-07-21/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/vnm92gx6gljqadb0al5cd758i8skik5s-go1.5-ratelimit-2015-06-19/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/9qhacypb046j7byidasifg2pw26w95cf-go1.5-osext-29ae4ff/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/20858bwpazwqnc68rm4p5x9vh2n13q36-go1.5-goleveldb-2015-08-19/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/v5kr9v1dyhwk349z07ipp4przqzg3v9c-go1.5-ginkgo-5ed93e4/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/qalfp24v5x4bf32wqh5ia7d4r0hlac76-go1.5-gomega-8adf9e1/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/9qfcangaz55s8xzvdahwppv0jx3vvy96-go1.5-suture-1.0.1/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/1h4xp9ms82h85bhxp1grxxkkm6sdy8qs-go1.5-qart-ccb109c/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/23fzqsqv90ac67kg98g9m6cfr43yfpr4-go1.5-crypto-2015-08-29/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/8xc5qw2zb18b8y6labn0b98lsrvnbk95-go1.5-net-2015-11-04/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/wfx69xmh8q9pn6wynk6pc6jlsfx958x4-go1.5-text-2015-08-27/share/go/src/github.com/rcrowley/go-metrics
github.com/syncthing/syncthing/lib/fnmatch
github.com/syncthing/syncthing/lib/ignore
go/src/github.com/syncthing/syncthing/lib/scanner/walk.go:19:2: cannot find package "github.com/rcrowley/go-metrics" in any of:
        /nix/store/b7373bfmsvkjkd7z953ygq6gq9x53kkl-go-1.5.3/share/go/src/github.com/rcrowley/go-metrics (from $GOROOT)
        /tmp/nix-build-go1.5-syncthing-0.12.25.drv-0/go/src/github.com/rcrowley/go-metrics (from $GOPATH)
        /nix/store/39nw79qp1dd9rcnxc799iamg0abh4vgl-go1.5-go-lz4-74ddf82/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/li1x7n5bc22ixp5r5pxacb59022amsfw-go1.5-du-2015-08-05/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/vw9wbig5gc5112ykzp419l92nyb1xr6r-go1.5-luhn-2015-01-13/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/6xnny2bi0c15bwvfxgn2qv13rx6z5fnm-go1.5-xdr-2015-04-08/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/ppm1f4ydchnjb41k1xgxz0sjykvg35xw-go1.5-snappy-2015-07-21/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/vnm92gx6gljqadb0al5cd758i8skik5s-go1.5-ratelimit-2015-06-19/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/9qhacypb046j7byidasifg2pw26w95cf-go1.5-osext-29ae4ff/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/20858bwpazwqnc68rm4p5x9vh2n13q36-go1.5-goleveldb-2015-08-19/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/v5kr9v1dyhwk349z07ipp4przqzg3v9c-go1.5-ginkgo-5ed93e4/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/qalfp24v5x4bf32wqh5ia7d4r0hlac76-go1.5-gomega-8adf9e1/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/9qfcangaz55s8xzvdahwppv0jx3vvy96-go1.5-suture-1.0.1/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/1h4xp9ms82h85bhxp1grxxkkm6sdy8qs-go1.5-qart-ccb109c/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/23fzqsqv90ac67kg98g9m6cfr43yfpr4-go1.5-crypto-2015-08-29/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/8xc5qw2zb18b8y6labn0b98lsrvnbk95-go1.5-net-2015-11-04/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/wfx69xmh8q9pn6wynk6pc6jlsfx958x4-go1.5-text-2015-08-27/share/go/src/github.com/rcrowley/go-metrics
github.com/syncthing/syncthing/lib/rc
github.com/syncthing/syncthing/lib/relay/protocol
github.com/syncthing/syncthing/lib/relay/client
github.com/syncthing/syncthing/lib/relay
go/src/github.com/syncthing/syncthing/lib/scanner/walk.go:19:2: cannot find package "github.com/rcrowley/go-metrics" in any of:
        /nix/store/b7373bfmsvkjkd7z953ygq6gq9x53kkl-go-1.5.3/share/go/src/github.com/rcrowley/go-metrics (from $GOROOT)
        /tmp/nix-build-go1.5-syncthing-0.12.25.drv-0/go/src/github.com/rcrowley/go-metrics (from $GOPATH)
        /nix/store/39nw79qp1dd9rcnxc799iamg0abh4vgl-go1.5-go-lz4-74ddf82/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/li1x7n5bc22ixp5r5pxacb59022amsfw-go1.5-du-2015-08-05/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/vw9wbig5gc5112ykzp419l92nyb1xr6r-go1.5-luhn-2015-01-13/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/6xnny2bi0c15bwvfxgn2qv13rx6z5fnm-go1.5-xdr-2015-04-08/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/ppm1f4ydchnjb41k1xgxz0sjykvg35xw-go1.5-snappy-2015-07-21/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/vnm92gx6gljqadb0al5cd758i8skik5s-go1.5-ratelimit-2015-06-19/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/9qhacypb046j7byidasifg2pw26w95cf-go1.5-osext-29ae4ff/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/20858bwpazwqnc68rm4p5x9vh2n13q36-go1.5-goleveldb-2015-08-19/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/v5kr9v1dyhwk349z07ipp4przqzg3v9c-go1.5-ginkgo-5ed93e4/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/qalfp24v5x4bf32wqh5ia7d4r0hlac76-go1.5-gomega-8adf9e1/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/9qfcangaz55s8xzvdahwppv0jx3vvy96-go1.5-suture-1.0.1/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/1h4xp9ms82h85bhxp1grxxkkm6sdy8qs-go1.5-qart-ccb109c/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/23fzqsqv90ac67kg98g9m6cfr43yfpr4-go1.5-crypto-2015-08-29/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/8xc5qw2zb18b8y6labn0b98lsrvnbk95-go1.5-net-2015-11-04/share/go/src/github.com/rcrowley/go-metrics
        /nix/store/wfx69xmh8q9pn6wynk6pc6jlsfx958x4-go1.5-text-2015-08-27/share/go/src/github.com/rcrowley/go-metrics
github.com/syncthing/syncthing/lib/stats
github.com/syncthing/syncthing/lib/tlsutil
github.com/syncthing/syncthing/lib/upnp
github.com/syncthing/syncthing/lib/versioner
can't load package: package github.com/syncthing/syncthing/script: no buildable Go source files in /tmp/nix-build-go1.5-syncthing-0.12.25.drv-0/go/src/github.com/syncthing/syncthing/script
can't load package: package github.com/syncthing/syncthing/test: no buildable Go source files in /tmp/nix-build-go1.5-syncthing-0.12.25.drv-0/go/src/github.com/syncthing/syncthing/test
builder for ‘/nix/store/iix2sx7ah88yjkr2mm0ndh11vsw2bv2k-go1.5-syncthing-0.12.25.drv’ failed with exit code 5
error: build of ‘/nix/store/iix2sx7ah88yjkr2mm0ndh11vsw2bv2k-go1.5-syncthing-0.12.25.drv’ failed

@joachifm joachifm added 9.needs: reporter feedback This issue needs the person who filed it to respond 6.topic: golang labels May 24, 2016
* pkgs/top-level/go-packages.nix (syncthing): Update to 0.13.2.
(syncthing-011): Replace with ...
(syncthing-012): ... this.
* pkgs/top-level/all-packages.nix: Adjust accordingly.
@polendri
Copy link
Contributor

polendri commented May 25, 2016

I'm grasping at straws as much as you are here, but every error there relates to finding the go-metrics source and this one is what seems suspect to me:

/nix/store/b7373bfmsvkjkd7z953ygq6gq9x53kkl-go-1.5.3/share/go/src/github.com/rcrowley/go-metrics (from $GOROOT)

That appears to be the path to the rcrowley/go-metrics package, so why would it not find the source in there? What do you see in that directory?

Also thanks for the labels @joachifm :)

@lfam
Copy link
Author

lfam commented May 25, 2016

On Wed, May 25, 2016 at 06:14:32AM -0700, Paul Hendry wrote:

I'm grasping at straws as much as you are here, but every error there relates to finding the go-metrics source and this one is what seems suspect to me:

/nix/store/b7373bfmsvkjkd7z953ygq6gq9x53kkl-go-1.5.3/share/go/src/github.com/rcrowley/go-metrics (from $GOROOT)

That appears to be the path to the rcrowley/go-metrics package, so why would it not find the source in there? What do you see in that directory?

I'm not sure how Nix does it, but in Guix, it would be very unusual to
put a 3rd party library into the store directory of Go itself. So, I
wonder if that path is being generated incorrectly.

@polendri
Copy link
Contributor

I've made some progress. On March 5th Syncthing switched to using the Go vendoring feature for dependency management (see syncthing/syncthing@65aaa60), which is on by default in 1.6 but by flag only in 1.5. We're still specifying its dependencies manually in go-packages.nix, so we're bound to end up with all sorts of incompatibilities.

Try replacing the buildInputs line in the syncthing definition with this one:

preBuild = ''
  export GO15VENDOREXPERIMENT=1
'';

This seems to solve everything for me, except that I'm getting the following errors now:

go/src/github.com/syncthing/syncthing/cmd/syncthing/gui.go:143: undefined: auto.Assets
go/src/github.com/syncthing/syncthing/cmd/syncthing/gui.go:304: undefined: auto.Assets

I had a look in that file and auto is a package defined in syncthing/syncthing and it's being properly imported into that source file, so I have no idea why it's showing up undefined. Still hoping a go-aware person can swoop in and help out.

@polendri
Copy link
Contributor

Holy shit, I got it to build. I had to add this abomination to my preBuild section I mentioned earlier:

preBuild = ''
  export GO15VENDOREXPERIMENT=1
  go run go/src/github.com/syncthing/syncthing/script/genassets.go go/src/github.com/syncthing/syncthing/gui > go/src/github.com/syncthing/syncthing/lib/auto/gui.files.go
'';

Surely there's a variable somewhere which stores that "go/src/github.com/syncthing/syncthing" path which could be used instead. Anyway, this runs the script which generates the gui.files.go source file.

Seems like a deeper problem though, in that we're not using the build.sh or build.go script that syncthing provides for building their application. Can't we just call that directly to save having to track any changes they make to how they build? I imagine we could do that by defining syncthing as a regular nix package as opposed to a goPackage?

@AudriusButkevicius
Copy link

Go generate would probably deal with that. Or just using our build scripts.

@lfam
Copy link
Author

lfam commented May 26, 2016

As mentioned on the #syncthing IRC channel, we should be trying to package 0.13.4 now.

@calmh
Copy link

calmh commented May 26, 2016

The asset thing isn't behind go generate, for raisins. However, the easiest starting point ought to be

go run build.go -no-upgrade install

which should do the right thing, assuming the build directory is in the correct place in $GOPATH or in a place that could be made to be the right place by guessing a $GOPATH.

If you make that work, we'll guarantee it keeps working, as that is how we build all our stuff.

@lfam
Copy link
Author

lfam commented May 26, 2016

@pshendry You seem to have a stronger grasp on Go than me. Do you want to take this over?

@polendri polendri mentioned this pull request May 26, 2016
7 tasks
@polendri
Copy link
Contributor

I've put up a PR: #15730

@lfam
Copy link
Author

lfam commented May 26, 2016

Please refer to #15730

@lfam lfam closed this May 26, 2016
@fpletz fpletz removed the 9.needs: reporter feedback This issue needs the person who filed it to respond label May 26, 2016
@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: golang 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants