Skip to content

Notes for install with godep #39

@gecko655

Description

@gecko655

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"

golang/dep#1890 (comment)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions