Closed olliephillips closed 7 years ago
This seems wrong to me on BlueMix's part.
The ImportPath recorded is the package name of the project you are saving dependencies for. If you send the code to them and they use the app name as the package name then code that uses sub packages will break as the names are different. For instance, your application is located in the package named github.com/olliephillips/test
, which is stored in $GOPATH/src/github.com/olliephillips/test
. Let's say github.com/olliephillips/test
imports github.com/olliephillips/test/lib/stuff
but Bluemix actually puts the code in $GOPATH/src/gohelloworld
when it's compiling the software. The import will break unless BlueMix also looks through your code and fixes up imports. And even then, panics, traces and error messages will also be changed.
Maybe Bluemix is doing something different, IDK, but this seems strange to me.
PS: This isn't really a bug with godep, so I'm going to close this, sorry. If Bluemix support would like to weigh in please have them re-open this issue. Thx.
Yes, thanks. I'm trying to raise with Bluemix. Looking back through old repos that I have had working on Bluemix Cloud Foundry I can see that full package path has always been stored in the ImportPath var, so it has to be something changed with Bluemix. Thanks for taking a look at this though. I'll update if/when get answer.
I'm a bit further on with this. Nothing from Bluemix, but it appears that this could be down to the inclusion of `test
in my package directory.
for example godeps.json
:
{
"ImportPath": "github.com/olliephillips/test",
"GoVersion": "go1.7.5",
...
and Procfile
:
web: test
Will NOT push
Build godeps.json
from cftest
directory, such that test is replaced with cftest and replace test in Procfile
with cftest and it pushes just fine.
So this is nothing to do with Godeps, and all the problems appear to be down to a poor choice of directory name when setting this up to test.
I'm seeing an issue with Godep on Bluemix CF.
godep save
gives megodeps.json
as below:-As is, I cannot push the app to Bluemix with this file. The errors are Bluemix related, and not very informative.
After a long process of elimination, I've found I need to modify
godeps.json
to match the application name in the appprocfile
in order to be able to push the app. Note the first line.I'm using the CF Go build pack here
https://github.com/cloudfoundry/go-buildpack.git
godep version
output isgodep v78 (darwin/amd64/go1.7.4)
Am I doing something wrong, is this an issue with Godep or Bluemix or just how it is. I'm happy to modify
godeps.json
every time I rungodep save
but if there's a fix or workaround that would be great?