gotron icon indicating copy to clipboard operation
gotron copied to clipboard

Notes for install with godep

Open gecko655 opened this issue 6 years ago • 2 comments

Issue

I'm using godep for installing dependency, including gotron. At the beginning, I configured Gopkg.toml like:

[prune]
  go-tests = true
  unused-packages = true

[[constraint]]
  name = "github.com/Equanox/gotron"
  branch = "master"

This config file causes the error: my/project/vendor/github.com/Equanox/gotron/templates/app: no such file or directory because templates/ folder in this project does not contain any *.go files and godep prunes such subfolders.

$ ls -la vendor/github.com/Equanox/gotron/
total 232
drwxr-xr-x  17 user group 544  4  8 11:52 .
drwxr-xr-x   3 user group 96  4  8 12:28 ..
-rw-r--r--   1 user group 225  4  8 11:52 .gitignore
-rw-r--r--   1 user group 519  4  8 11:52 .travis.yml
-rw-r--r--   1 user group 4975  4  8 11:52 BrowserWindow.md
-rw-r--r--   1 user group 1073  4  8 11:52 LICENSE
-rw-r--r--   1 user group 1475  4  8 11:52 Makefile
-rw-r--r--   1 user group 4932  4  8 11:52 README.md
-rw-r--r--   1 user group 41003  4  8 11:52 browser_window_instance_methods.go
-rw-r--r--   1 user group 6674  4  8 11:52 browser_window_options.go
-rw-r--r--   1 user group 708  4  8 11:52 go.mod
-rw-r--r--   1 user group 3432  4  8 11:52 go.sum
-rw-r--r--   1 user group 6909  4  8 11:52 gotron.go
-rw-r--r--   1 user group 5823  4  8 11:52 gotron_methods.go
-rw-r--r--   1 user group 2453  4  8 11:52 gotron_methods_pack.go
drwxr-xr-x   4 user group 128  4  8 11:52 internal
-rw-r--r--   1 user group 216  4  8 11:52 logging.go

Solution

I had to add these lines to Gopkg.toml, to download the template/app folder and other non-go folders.

[prune]
  go-tests = true
  unused-packages = true

+  [[prune.project]]
+    name = "github.com/Equanox/gotron"
+    unused-packages = false
+

[[constraint]]
  name = "github.com/Equanox/gotron"
  branch = "master"

https://github.com/golang/dep/issues/1890#issuecomment-403393910

I think this is a godep specific issue, but creating issue within gotron repository may help someone who also encountered this problem.

gecko655 avatar Apr 08 '19 05:04 gecko655

So, document about it if the mentainer(s) want to do, or just close the issue if not.

gecko655 avatar Apr 08 '19 05:04 gecko655

Good point. Definitely worth mentioning. Will be a candidate for FAQ.

Equanox avatar Apr 10 '19 19:04 Equanox