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

Fail to get git submodule of a package after the dep ensure command #1633

Closed
ykyuen opened this Issue Feb 6, 2018 · 14 comments

Comments

Projects
None yet
6 participants
@ykyuen
Copy link

ykyuen commented Feb 6, 2018

What version of dep are you using (dep version)?

v0.4.1-34-g42f17824

What dep command did you run?

$ dep ensure -v
Gopkg.lock was already in sync with imports and Gopkg.toml
(1/2) Wrote github.com/pkg/errors@v0.8.0
(2/2) Wrote github.com/go-goracle/goracle@v2.1.13

What did you expect to see?

All the files of the packages could be found inside the vendor folder.

What did you see instead?

The dep ensure command runs without problem. But when i navigate to the ./vendor/github.com/go-goracle/goracle/odpi, the folder is empty.

The ./vendor/github.com/go-goracle/goracle/odpi is a git submodule (ODPI-C version 2.0.3) of the github.com/go-goracle/goracle package. Supposingly it should contain all the files of the ODPI-C project.

I checked the cache folder at $GOPATH/pkg/dep/sources/https---github.com-go--goracle-goracle/ and the odpi folder there is NOT empty.

In an article, @sdboyer suggests turning off unused-packages in Gopkg.toml but according to the documentation:

Pruning is disabled by default. It can be enabled by setting them to true at the root level.

i did try adding the prune settings in the Gopkg.toml as follow but still no luck.

[prune]
  [[prune.project]]
    name = "github.com/go-goracle/goracle"
    unused-packages = false
    go-tests = false
    non-go = false

I have created an example repository which could repeat the scenario.

My current workaround is removing the go-goracle/goracle dependency from the project and go get it instead.

And thanks for developing the dep module. 💕

@ykyuen ykyuen changed the title Fail to get git submodule of a package aft er the dep ensure command Fail to get git submodule of a package after the dep ensure command Feb 6, 2018

@mewmew

This comment has been minimized.

Copy link

mewmew commented Feb 9, 2018

I haven't tried it myself, but it could be possible that not pruning unused packages makes it work?

[prone]
  unused-packages = false

Edit: read your post a bit closer and noticed you already set it to not prune unused packages. Sorry for the noise.

@ykyuen

This comment has been minimized.

Copy link
Author

ykyuen commented Feb 10, 2018

Thx for your comment @mewmew, i tried and actually it is not allowed to set the prune attribute to false at root level.

error while parsing /home/ykyuen/go/src/gitlab.com/ykyuen/dep-submodule-example/Gopkg.toml: manifest validation failed: root prune options must be omitted instead of being set to false
@mewmew

This comment has been minimized.

Copy link

mewmew commented Feb 10, 2018

Ah, that's because pruning is false by default I guess.

From https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md

Pruning is disabled by default. It can be enabled by setting them to true at the root level.

@cemremengu

This comment has been minimized.

Copy link

cemremengu commented Mar 1, 2018

So for v2.1.15+, the owner added odpi as a direct sub-folder but still does not work and I think it became even worse now since dep completely fails for the newest versions.

> dep ensure -v -add github.com/go-goracle/goracle@2.1.17
Fetching sources...
(1/1) github.com/go-goracle/goracle@2.1.17

Root project is "ttgint.com/test"
 1 transitively valid internal packages
 1 external packages imported from 1 projects
(0)   ✓ select (root)
(1)     ? attempt github.com/go-goracle/goracle with 1 pkgs; 28 versions to try
(1)         try github.com/go-goracle/goracle@v2.1.17
(1)     ✗   unable to update checked out version: error: The following untracked working tree files would be overwritten by checkout:
(1)             odpi/CONTRIBUTING.md
(1)             odpi/LICENSE.md
(1)             odpi/README.md
(1)             odpi/embed/README.md
(1)             odpi/embed/dpi.c
(1)             odpi/include/dpi.h
(1)             odpi/src/dpiConn.c
(1)             odpi/src/dpiContext.c
(1)             odpi/src/dpiData.c
(1)             odpi/src/dpiDebug.c
(1)             odpi/src/dpiDeqOptions.c
(1)             odpi/src/dpiEnqOptions.c
(1)             odpi/src/dpiEnv.c
(1)             odpi/src/dpiError.c
(1)             odpi/src/dpiErrorMessages.h
(1)             odpi/src/dpiGen.c
(1)             odpi/src/dpiGlobal.c
(1)             odpi/src/dpiHandleList.c
(1)             odpi/src/dpiHandlePool.c
(1)             odpi/src/dpiImpl.h
(1)             odpi/src/dpiLob.c
(1)             odpi/src/dpiMsgProps.c
(1)             odpi/src/dpiObject.c
(1)             odpi/src/dpiObjectAttr.c
(1)             odpi/src/dpiObjectType.c
(1)             odpi/src/dpiOci.c
(1)             odpi/src/dpiOracleType.c
(1)             odpi/src/dpiPool.c
(1)             odpi/src/dpiRowid.c
(1)             odpi/src/dpiStmt.c
(1)             odpi/src/dpiSubscr.c
(1)             odpi/src/dpiUtils.c
(1)             odpi/src/dpiVar.c
(1)       Please move or remove them before you switch branches.
(1)       Aborting
(1)       : command failed: [git checkout 55f9d9b146784ee6d59ab68ab9f3c61652143a78]: exit status 1
(1)         try github.com/go-goracle/goracle@v2.1.16
(2)     ✗   github.com/go-goracle/goracle@v2.1.16 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.15
(2)     ✗   github.com/go-goracle/goracle@v2.1.15 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.14
(2)     ✗   github.com/go-goracle/goracle@v2.1.14 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.13
(2)     ✗   github.com/go-goracle/goracle@v2.1.13 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.12
(2)     ✗   github.com/go-goracle/goracle@v2.1.12 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.11
(2)     ✗   github.com/go-goracle/goracle@v2.1.11 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.10
(2)     ✗   github.com/go-goracle/goracle@v2.1.10 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.9
(2)     ✗   github.com/go-goracle/goracle@v2.1.9 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.8
(2)     ✗   github.com/go-goracle/goracle@v2.1.8 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.7
(2)     ✗   github.com/go-goracle/goracle@v2.1.7 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.6
(2)     ✗   github.com/go-goracle/goracle@v2.1.6 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.5
(2)     ✗   github.com/go-goracle/goracle@v2.1.5 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.4
(2)     ✗   github.com/go-goracle/goracle@v2.1.4 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.3
(2)     ✗   github.com/go-goracle/goracle@v2.1.3 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.2
(2)     ✗   github.com/go-goracle/goracle@v2.1.2 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.1
(2)     ✗   github.com/go-goracle/goracle@v2.1.1 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.1.0
(2)     ✗   github.com/go-goracle/goracle@v2.1.0 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.0.4
(2)     ✗   github.com/go-goracle/goracle@v2.0.4 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.0.3
(2)     ✗   github.com/go-goracle/goracle@v2.0.3 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.0.2
(2)     ✗   github.com/go-goracle/goracle@v2.0.2 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.0.1
(2)     ✗   github.com/go-goracle/goracle@v2.0.1 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2.0.0
(2)     ✗   github.com/go-goracle/goracle@v2.0.0 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@master
(2)     ✗   github.com/go-goracle/goracle@master not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@odpi2.2
(2)     ✗   github.com/go-goracle/goracle@odpi2.2 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v1
(2)     ✗   github.com/go-goracle/goracle@v1 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@v2
(2)     ✗   github.com/go-goracle/goracle@v2 not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)         try github.com/go-goracle/goracle@wip
(2)     ✗   github.com/go-goracle/goracle@wip not allowed by constraint ^2.1.17:
(2)         ^2.1.17 from (root)
(1)       ← no more versions of github.com/go-goracle/goracle to try; begin backtrack
  ✗ solving failed

Solver wall times by segment:
      b-list-pkgs: 148.0019ms
          satisfy:  33.4887ms
         new-atom:    9.009ms
      select-root:   1.4945ms
       b-pair-rev:   1.0024ms
            other:    498.6µs
  b-list-versions:         0s
        b-matches:         0s
  b-source-exists:         0s

  TOTAL: 193.4951ms

Solving failure: No versions of github.com/go-goracle/goracle met constraints:
        v2.1.17: unable to update checked out version: error: The following untracked working tree files would be overwritten by checkout:
        odpi/CONTRIBUTING.md
        odpi/LICENSE.md
        odpi/README.md
        odpi/embed/README.md
        odpi/embed/dpi.c
        odpi/include/dpi.h
        odpi/src/dpiConn.c
        odpi/src/dpiContext.c
        odpi/src/dpiData.c
        odpi/src/dpiDebug.c
        odpi/src/dpiDeqOptions.c
        odpi/src/dpiEnqOptions.c
        odpi/src/dpiEnv.c
        odpi/src/dpiError.c
        odpi/src/dpiErrorMessages.h
        odpi/src/dpiGen.c
        odpi/src/dpiGlobal.c
        odpi/src/dpiHandleList.c
        odpi/src/dpiHandlePool.c
        odpi/src/dpiImpl.h
        odpi/src/dpiLob.c
        odpi/src/dpiMsgProps.c
        odpi/src/dpiObject.c
        odpi/src/dpiObjectAttr.c
        odpi/src/dpiObjectType.c
        odpi/src/dpiOci.c
        odpi/src/dpiOracleType.c
        odpi/src/dpiPool.c
        odpi/src/dpiRowid.c
        odpi/src/dpiStmt.c
        odpi/src/dpiSubscr.c
        odpi/src/dpiUtils.c
        odpi/src/dpiVar.c
Please move or remove them before you switch branches.
Aborting
: command failed: [git checkout 55f9d9b146784ee6d59ab68ab9f3c61652143a78]: exit status 1
        v2.1.16: Could not introduce github.com/go-goracle/goracle@v2.1.16, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.15: Could not introduce github.com/go-goracle/goracle@v2.1.15, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.14: Could not introduce github.com/go-goracle/goracle@v2.1.14, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.13: Could not introduce github.com/go-goracle/goracle@v2.1.13, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.12: Could not introduce github.com/go-goracle/goracle@v2.1.12, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.11: Could not introduce github.com/go-goracle/goracle@v2.1.11, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.10: Could not introduce github.com/go-goracle/goracle@v2.1.10, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.9: Could not introduce github.com/go-goracle/goracle@v2.1.9, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.8: Could not introduce github.com/go-goracle/goracle@v2.1.8, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.7: Could not introduce github.com/go-goracle/goracle@v2.1.7, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.6: Could not introduce github.com/go-goracle/goracle@v2.1.6, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.5: Could not introduce github.com/go-goracle/goracle@v2.1.5, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.4: Could not introduce github.com/go-goracle/goracle@v2.1.4, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.3: Could not introduce github.com/go-goracle/goracle@v2.1.3, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.2: Could not introduce github.com/go-goracle/goracle@v2.1.2, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.1: Could not introduce github.com/go-goracle/goracle@v2.1.1, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.1.0: Could not introduce github.com/go-goracle/goracle@v2.1.0, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.0.4: Could not introduce github.com/go-goracle/goracle@v2.0.4, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.0.3: Could not introduce github.com/go-goracle/goracle@v2.0.3, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.0.2: Could not introduce github.com/go-goracle/goracle@v2.0.2, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.0.1: Could not introduce github.com/go-goracle/goracle@v2.0.1, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2.0.0: Could not introduce github.com/go-goracle/goracle@v2.0.0, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        master: Could not introduce github.com/go-goracle/goracle@master, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        odpi2.2: Could not introduce github.com/go-goracle/goracle@odpi2.2, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v1: Could not introduce github.com/go-goracle/goracle@v1, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        v2: Could not introduce github.com/go-goracle/goracle@v2, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
        wip: Could not introduce github.com/go-goracle/goracle@wip, as it is not allowed by constraint ^2.1.17 from project ttgint.com/test.
@tgulacsi

This comment has been minimized.

Copy link

tgulacsi commented Mar 1, 2018

untracked => rm -rf vendor/gopkg.in/goracle.v2/odpi
and try again

@cemremengu

This comment has been minimized.

Copy link

cemremengu commented Mar 1, 2018

No luck even with a clean install

also same error when getting gopkg.in/goracle.v2

EDIT: Maybe I am doing something wrong.. not sure what's going on with dep

@tgulacsi

This comment has been minimized.

Copy link

tgulacsi commented Mar 1, 2018

! cd /tmp
:tgulacsi@debian: /tmp
$ mkdir x
:tgulacsi@debian: /tmp
$ export GOPATH=/tmp/x
:tgulacsi@debian: /tmp
$ go get -v gopkg.in/goracle.v2
Fetching https://gopkg.in/goracle.v2?go-get=1
Parsing meta tags from https://gopkg.in/goracle.v2?go-get=1 (status code 200)
get "gopkg.in/goracle.v2": found meta tag get.metaImport{Prefix:"gopkg.in/goracle.v2", VCS:"git", RepoRoot:"https://gopkg.in/goracle.v2"} at https://gopkg.in/goracle.v2?go-get=1
gopkg.in/goracle.v2 (download)
github.com/pkg/errors (download)
:tgulacsi@debian: /tmp
$ go install gopkg.in/goracle.v2
:tgulacsi@debian: /tmp
$ cd x/src/gopkg.in/goracle.v2/
:tgulacsi@debian: /tmp/x/src/gopkg.in/goracle.v2
$ git log|head
commit 55f9d9b146784ee6d59ab68ab9f3c61652143a78
Author: Tamás Gulácsi <tgulacsi78@gmail.com>
Date:   Thu Mar 1 07:50:28 2018 +0100

    ClobAsString option

commit 3fba5fd3ec52e476d2ad1dcf37f758ac7a88b381
Author: Tamás Gulácsi <tgulacsi78@gmail.com>
Date:   Sat Feb 24 08:39:34 2018 +0100

So it works with go get.

Also with dep:

tgulacsi@debian: /tmp
$ go get github.com/tgulacsi/go/dbcsv/csvload
tgulacsi@debian: /tmp
$ cd x/src/github.com/tgulacsi/go/dbcsv/csvload
tgulacsi@debian: /tmp/x/src/github.com/tgulacsi/go/dbcsv/csvload
$ dep init -v
Getting direct dependencies...
Checked 1 directories for packages.
Found 4 direct dependencies.
Root project is "github.com/tgulacsi/go/dbcsv/csvload"
 1 transitively valid internal packages
 4 external packages imported from 4 projects
(0)   ✓ select (root)
(1)     ? attempt golang.org/x/sync with 1 pkgs; 1 versions to try
(1)         try golang.org/x/sync@master
(1)     ✓ select golang.org/x/sync@master w/1 pkgs
(2)     ? attempt github.com/pkg/errors with 1 pkgs; 11 versions to try
(2)         try github.com/pkg/errors@v0.8.0
(2)     ✓ select github.com/pkg/errors@v0.8.0 w/1 pkgs
(3)     ? attempt github.com/tgulacsi/go with 1 pkgs; 3 versions to try
(3)         try github.com/tgulacsi/go@v0.1.1
(3)     ✓ select github.com/tgulacsi/go@v0.1.1 w/1 pkgs
(4)     ? attempt github.com/extrame/xls with 1 pkgs; 3 versions to try
(4)         try github.com/extrame/xls@v0.0.1
(4)     ✓ select github.com/extrame/xls@v0.0.1 w/1 pkgs
(5)     ? attempt github.com/extrame/ole2 with 1 pkgs; 1 versions to try
(5)         try github.com/extrame/ole2@master
(5)     ✓ select github.com/extrame/ole2@master w/1 pkgs
(6)     ? attempt github.com/360EntSecGroup-Skylar/excelize with 1 pkgs; 4 versions to try
(6)         try github.com/360EntSecGroup-Skylar/excelize@v1.2
(6)     ✓ select github.com/360EntSecGroup-Skylar/excelize@v1.2 w/1 pkgs
(7)     ? attempt golang.org/x/net with 1 pkgs; 6 versions to try
(7)         try golang.org/x/net@master
(7)     ✓ select golang.org/x/net@master w/1 pkgs
(8)     ? attempt golang.org/x/text with 3 pkgs; 4 versions to try
(8)         try golang.org/x/text@v0.3.0
(8)     ✓ select golang.org/x/text@v0.3.0 w/17 pkgs
(9)     ? attempt gopkg.in/goracle.v2 with 1 pkgs; 24 versions to try
(9)         try gopkg.in/goracle.v2@v2.1.17
(9)     ✓ select gopkg.in/goracle.v2@v2.1.17 w/1 pkgs
  ✓ found solution with 25 packages from 9 projects

Solver wall times by segment:
     b-list-versions: 1m12.096783648s
     b-source-exists:    1.602368146s
         b-list-pkgs:    738.273899ms
              b-gmal:    588.458343ms
  b-deduce-proj-root:    299.361998ms
         select-atom:      4.635724ms
             satisfy:      4.129328ms
            new-atom:        680.63µs
         select-root:        219.49µs
               other:        44.189µs

  TOTAL: 1m15.334955395s

  Using ^0.8.0 as constraint for direct dep github.com/pkg/errors
  Locking in v0.8.0 (645ef00) for direct dep github.com/pkg/errors
  Locking in v1.2 (6d634ca) for transitive dep github.com/360EntSecGroup-Skylar/excelize
  Locking in v0.3.0 (f21a4df) for transitive dep golang.org/x/text
  Using ^2.1.17 as constraint for direct dep gopkg.in/goracle.v2
  Locking in v2.1.17 (55f9d9b) for direct dep gopkg.in/goracle.v2
  Using master as constraint for direct dep golang.org/x/sync
  Locking in master (fd80eb9) for direct dep golang.org/x/sync
  Using ^0.1.1 as constraint for direct dep github.com/tgulacsi/go
  Locking in v0.1.1 (ad54839) for direct dep github.com/tgulacsi/go
  Locking in v0.0.1 (f02a04c) for transitive dep github.com/extrame/xls
  Locking in master (d694296) for transitive dep github.com/extrame/ole2
  Locking in master (cbe0f93) for transitive dep golang.org/x/net
(1/9) Wrote github.com/360EntSecGroup-Skylar/excelize@v1.2
(2/9) Wrote gopkg.in/goracle.v2@v2.1.17
(3/9) Wrote github.com/extrame/xls@v0.0.1
(4/9) Wrote golang.org/x/sync@master
(5/9) Wrote github.com/extrame/ole2@master
(6/9) Wrote github.com/pkg/errors@v0.8.0
(7/9) Wrote github.com/tgulacsi/go@v0.1.1
(8/9) Wrote golang.org/x/net@master
(9/9) Wrote golang.org/x/text@v0.3.0
:tgulacsi@debian: /tmp/x/src/github.com/tgulacsi/go/dbcsv/csvload
$ dep init -v^C
:tgulacsi@debian: /tmp/x/src/github.com/tgulacsi/go/dbcsv/csvload
! cat Gopkg.toml
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
#   name = "github.com/user/project"
#   version = "1.0.0"
#
# [[constraint]]
#   name = "github.com/user/project2"
#   branch = "dev"
#   source = "github.com/myfork/project2"
#
# [[override]]
#   name = "github.com/x/y"
#   version = "2.4.0"
#
# [prune]
#   non-go = false
#   go-tests = true
#   unused-packages = true


[[constraint]]
  name = "github.com/pkg/errors"
  version = "0.8.0"

[[constraint]]
  name = "github.com/tgulacsi/go"
  version = "0.1.1"

[[constraint]]
  branch = "master"
  name = "golang.org/x/sync"

[[constraint]]
  name = "gopkg.in/goracle.v2"
  version = "2.1.17"

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

This comment has been minimized.

Copy link

tgulacsi commented Mar 1, 2018

Oh, sorry - goracle.v2 v2.1.17 uses a vgo-submodule-lack-workaround, and copies the contents of the submodule under "odpi" (and moved the submodule to "odpi-c").

@cemremengu

This comment has been minimized.

Copy link

cemremengu commented Mar 23, 2018

Should be solved by go-goracle/goracle#57

Can you try again @ykyuen ? Make sure switching off pruning of unused packages

@pohly

This comment has been minimized.

Copy link

pohly commented Jun 26, 2018

I noticed that dep doesn't export the content of submodules and submitted a fix: #1909

Looks related to this issue?

@ykyuen

This comment has been minimized.

Copy link
Author

ykyuen commented Jul 17, 2018

@cemremengu Thx for creating the merge request. Previously i was using the following import statement

import (
  "database/sql"
  "fmt"
  "log"

  _ "github.com/go-goracle/goracle"
)

It doesn't work becoz it only fetch the goracle version 2.1.15. Then i realize i should use gopkg.in instead

import (
  "database/sql"
  "fmt"
  "log"

  _ "gopkg.in/goracle.v2"
)

It could fetch the latest 2.5.5 version and the odpi folder is no longer empty.

@pohly, since the goracle project has remove the git submodule. it should work even dep doesn't support submodule. thx for your comment though. =D

@ykyuen ykyuen closed this Jul 17, 2018

@AxelRHD

This comment has been minimized.

Copy link

AxelRHD commented Jul 27, 2018

I just started to using dep and the odpi folder is still emtpy. I created the src-folder from scratch, init with dep and picked the depency with dep ensure.

The files are now:

[[constraint]]
  name = "gopkg.in/goracle.v2"
  version = "2.5.7"
package main

import (
	"database/sql"
	"fmt"
	"log"

	_ "gopkg.in/goracle.v2"
)
@tgulacsi

This comment has been minimized.

Copy link

tgulacsi commented Jul 27, 2018

Make sure that dep does not remove non-go files:

[prune]
  go-tests = true
  unused-packages = false
  non-go = false
@AxelRHD

This comment has been minimized.

Copy link

AxelRHD commented Jul 27, 2018

I got manifest validation failed: root prune options must be omitted instead of being set to false. Just trying to understand how the Gopkg.toml works in detail. Do I have to set this option under then [[constraint]] of the goracle-package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment