Godep cant find gin when pushing go project to PCF-dev - go

Yesterday my app was pushing fine. When I came back today to push I am having issues where godeps can't find certain dependencies. Im able to godep go install just fine on my local machine, which leads me to believe this is a PCF issue of some type.
go push output:
Starting app business-service in org pcfdev-org / space pcfdev-space as user...
Downloading dotnet_core_buildpack_beta...
Downloading go_buildpack...
Downloading nodejs_buildpack...
Downloading ruby_buildpack...
Downloading staticfile_buildpack...
Downloaded ruby_buildpack
Downloading python_buildpack...
Downloaded go_buildpack
Downloading php_buildpack...
Downloaded nodejs_buildpack
Downloading binary_buildpack...
Downloaded dotnet_core_buildpack_beta
Downloading java_buildpack...
Downloaded binary_buildpack
Downloaded php_buildpack
Downloaded python_buildpack
Downloaded staticfile_buildpack
Downloaded java_buildpack
Creating container
Successfully created container
Downloading app package...
Downloaded app package (9.1K)
Staging...
-------> Buildpack version 1.7.10
file:///tmp/buildpacks/d17226e3d1bc5f728403b1521b69c8ae/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_godep_godep-v74-linux-x64.tgz
file:///tmp/buildpacks/d17226e3d1bc5f728403b1521b69c8ae/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_glide_glide-v0.11.0-linux-x64.tgz
-----> Checking Godeps/Godeps.json file.
-----> Installing go1.6.3... done
Downloaded [file:///tmp/buildpacks/d17226e3d1bc5f728403b1521b69c8ae/dependencies/https___storage.googleapis.com_golang_go1.6.3.linux-amd64.tar.gz]
!! Installing package '.' (default)
-----> Running: godep go install -v -tags cloudfoundry --buildmode=pie .
server/server.go:4:2: cannot find package "gopkg.in/gin-gonic/gin.v1" in any of:
/tmp/cache/go1.6.3/go/src/gopkg.in/gin-gonic/gin.v1 (from $GOROOT)
/tmp/app/.heroku/go/src/business-service/Godeps/_workspace/src/gopkg.in/gin-gonic/gin.v1 (from $GOPATH)
/tmp/app/.heroku/go/src/gopkg.in/gin-gonic/gin.v1
godep: go exit status 1
Failed to compile droplet
Exit status 223
Staging failed: Exited with status 223
Destroying container
Successfully destroyed container
Godeps.json:
{
"ImportPath": "business-service",
"GoVersion": "go1.6",
"GodepVersion": "v74",
"Deps": [
{
"ImportPath": "github.com/gin-gonic/gin/binding",
"Comment": "v1.0-2-g3900df0",
"Rev": "3900df04d2a88e22beaf6a2970c63648b9e1b0e1"
},
{
"ImportPath": "github.com/gin-gonic/gin/render",
"Comment": "v1.0-2-g3900df0",
"Rev": "3900df04d2a88e22beaf6a2970c63648b9e1b0e1"
},
{
"ImportPath": "github.com/golang/protobuf/proto",
"Rev": "98fa357170587e470c5f27d3c3ea0947b71eb455"
},
{
"ImportPath": "github.com/manucorporat/sse",
"Rev": "ee05b128a739a0fb76c7ebd3ae4810c1de808d6d"
},
{
"ImportPath": "golang.org/x/net/context",
"Rev": "65dfc08770ce66f74becfdff5f8ab01caef4e946"
},
{
"ImportPath": "gopkg.in/gin-gonic/gin.v1",
"Comment": "v1.0",
"Rev": "2dae550eb5392006a4582ce9c90016a9b5a74e8b"
},
{
"ImportPath": "gopkg.in/go-playground/validator.v8",
"Comment": "v8.18.1",
"Rev": "5f57d2222ad794d0dffb07e664ea05e2ee07d60c"
},
{
"ImportPath": "gopkg.in/yaml.v2",
"Rev": "a5b47d31c556af34a302ce5d659e6fea44d90de0"
}
]
}

Related

WebStatus wont compile: The "jquery#3.4.1" library could not be resolved by the "cdnjs" provider

I have the eShopOnContainers solution here: https://github.com/dotnet-architecture/eShopOnContainers. I have been actively working on a variation of it for the last few years. I attempted to compile it this morning and the WebStatus project causes this error:
libman.json(0,0): Error LIB002: The "jquery#3.4.1" library could not be resolved by the "cdnjs" provider
I have found this: https://github.com/aspnet/LibraryManager/issues/685 and this: https://issuemode.com/issues/cdnjs/cdnjs/94570425 (updated yesterday)
So far I have tried what is suggested in the articles:
dotnet tool install -g Microsoft.Web.LibraryManager.Cli (installs version 2.1.75)
libman cache clean
libman restore
Is there anything else I can try? My Libman.json looks like this:
{
"version": "1.0",
"defaultProvider": "cdnjs",
"libraries": [
{
"library": "jquery#3.4.1",
"destination": "wwwroot/lib/jquery/"
},
{
"provider": "unpkg",
"library": "bootstrap#4.1.3",
"files": [
"dist/css/bootstrap.css",
"dist/css/bootstrap.css.map",
"dist/css/bootstrap.min.css",
"dist/css/bootstrap.min.css.map",
"dist/js/bootstrap.js",
"dist/js/bootstrap.min.js"
],
"destination": "wwwroot/lib/bootstrap/"
}
]
}
Try this:
-Right click libman.json
Disable Client-Side libraries on build
Build the project

Brew available files for different macOS version

Take install Python for example.
==> Installing opencv dependency: python
==> Downloading https://homebrew.bintray.com/bottles/python-3.6.5.high_sierra.bottle.tar.gz
The brew SW download the one that's matched with my current macOS version as default. (In this case, it's for high_sierra (10.13.x) macOS).
But I'd like to get other build version for previous macOS version (e.g. 10.10.x).
I notice that the SW that's all downloaded from https://homebrew.bintray.com/bottles/.
But unfortunately, I can't view the available files under the https://homebrew.bintray.com/bottles/ path.
Is there a command to view available files (e.g. Python) for different macOS version ?
You can use either brew info --json=v1 <formula> or Homebrew’s public JSON API:
$ brew info --json=v1 python | jq .
[
{
"name": "python",
"desc": "Interpreted, interactive, object-oriented programming language",
"homepage": "https://www.python.org/",
// ...
"bottle": {
"stable": {
// ...
"files": {
"high_sierra": {
"url": "https://linuxbrew.bintray.com/bottles/python-3.6.5.high_sierra.bottle.1.tar.gz",
"sha256": "7e0fc1b078b51d9478ab08660d5df01611976a7af0f6c24054bda58264bb506c"
},
"sierra": {
"url": "https://linuxbrew.bintray.com/bottles/python-3.6.5.sierra.bottle.1.tar.gz",
"sha256": "2fe5ca9be0f1596798927c4aa1d4d187ca7f83adc4681483cec2cc52d7c95386"
},
"el_capitan": {
"url": "https://linuxbrew.bintray.com/bottles/python-3.6.5.el_capitan.bottle.1.tar.gz",
"sha256": "bccf50de973644608af29652f2660124d033f3213d422fe44a7f012a47643a95"
}
}
}
},
// ...
]
Using jq:
$ brew info --json=v1 python | jq -r '.[]|.bottle.stable.files[]|.url'
https://linuxbrew.bintray.com/bottles/python-3.6.5.high_sierra.bottle.1.tar.gz
https://linuxbrew.bintray.com/bottles/python-3.6.5.sierra.bottle.1.tar.gz
https://linuxbrew.bintray.com/bottles/python-3.6.5.el_capitan.bottle.1.tar.gz
Note it works with multiple formulae:
$ brew info --json=v1 python git | jq -r '.[]|.bottle.stable.files[]|.url'
https://linuxbrew.bintray.com/bottles/python-3.6.5.high_sierra.bottle.1.tar.gz
https://linuxbrew.bintray.com/bottles/python-3.6.5.sierra.bottle.1.tar.gz
https://linuxbrew.bintray.com/bottles/python-3.6.5.el_capitan.bottle.1.tar.gz
https://linuxbrew.bintray.com/bottles/git-2.17.1.high_sierra.bottle.tar.gz
https://linuxbrew.bintray.com/bottles/git-2.17.1.sierra.bottle.tar.gz
https://linuxbrew.bintray.com/bottles/git-2.17.1.el_capitan.bottle.tar.gz

new composer-wallet - jszip error

I am making a new composer-wallet with composer 0.19.0
All test passed fine - test based on composer-wallet-filesystem
I can successfully import business network cards to the new wallet and use them for transactions.
I am only one issue
$ composer card list
Error: Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html
Command failed
I tryed to update jszip to the lastest version in composer-cli, but same problem
Here is the environment variable to configure the connection
export NODE_CONFIG='{
"composer": {
"wallet": {
"type": "composer-wallet-mongodb",
"desc": "Uses a local mongodb instance",
"options": {
"uri": "mongodb://localhost:27017/yourCollection",
"collectionName": "myWallet",
"options": {
}
}
}
}
}'
Any help is welcomed

Unable to deploy go app with Godeps dependencies on Heroku

I have the following error when i'm trying to push my project on heroku
git push heroku master
Counting objects: 88, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (86/86), done.
Writing objects: 100% (88/88), 18.85 MiB | 686.00 KiB/s, done.
Total 88 (delta 13), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Go app detected
remote: -----> Checking Godeps/Godeps.json file.
remote: -----> Using go1.7.3
remote: -----> Running: go install -v -tags heroku ./...
remote: main.go:8:2: cannot find package "github.com/Sirupsen/logrus" in any of:
remote: /app/tmp/cache/go1.7.3/go/src/github.com/Sirupsen/logrus (from $GOROOT)
remote: /tmp/tmp.Ffkjp5c5US/.go/src/github.com/Sirupsen/logrus (from $GOPATH)
remote: main.go:6:2: cannot find package "github.com/gin-gonic/gin" in any of:
remote: /app/tmp/cache/go1.7.3/go/src/github.com/gin-gonic/gin (from $GOROOT)
remote: /tmp/tmp.Ffkjp5c5US/.go/src/github.com/gin-gonic/gin (from $GOPATH)
remote: ! Push rejected, failed to compile Go app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to eerie-wizard-18479.
remote:
To https://git.heroku.com/eerie-wizard-18479.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/eerie-wizard-18479.git'
I carefully made a godep save ./... before commiting and pushing on heroku, this is my Godeps.json file: (logrus and gin are present in this file)
{
"ImportPath": "github.com/sbouaked/neo-fundations",
"GoVersion": "go1.7",
"GodepVersion": "v74",
"Packages": [
"./..."
],
"Deps": [
{
"ImportPath": "github.com/Sirupsen/logrus",
"Comment": "v0.10.0-38-g3ec0642",
"Rev": "3ec0642a7fb6488f65b06f9040adc67e3990296a"
},
{
"ImportPath": "github.com/gin-gonic/gin",
"Comment": "v1.0-2-g3900df0",
"Rev": "3900df04d2a88e22beaf6a2970c63648b9e1b0e1"
},
{
"ImportPath": "github.com/gin-gonic/gin/binding",
"Comment": "v1.0-2-g3900df0",
"Rev": "3900df04d2a88e22beaf6a2970c63648b9e1b0e1"
},
{
"ImportPath": "github.com/gin-gonic/gin/render",
"Comment": "v1.0-2-g3900df0",
"Rev": "3900df04d2a88e22beaf6a2970c63648b9e1b0e1"
},
{
"ImportPath": "github.com/golang/protobuf/proto",
"Rev": "98fa357170587e470c5f27d3c3ea0947b71eb455"
},
{
"ImportPath": "github.com/manucorporat/sse",
"Rev": "ee05b128a739a0fb76c7ebd3ae4810c1de808d6d"
},
{
"ImportPath": "golang.org/x/net/context",
"Rev": "4bb47a1098b37d69980d96237e2ae4ff56bb5a95"
},
{
"ImportPath": "golang.org/x/sys/unix",
"Rev": "c200b10b5d5e122be351b67af224adc6128af5bf"
},
{
"ImportPath": "gopkg.in/go-playground/validator.v8",
"Comment": "v8.18.1",
"Rev": "5f57d2222ad794d0dffb07e664ea05e2ee07d60c"
},
{
"ImportPath": "gopkg.in/yaml.v2",
"Rev": "a5b47d31c556af34a302ce5d659e6fea44d90de0"
}
]
}
I saw on this post that I have to commit vendor/, but I didn't want to. There is really any solutions for this now ?
If you look at the heroku buildpack for Go (https://github.com/heroku/heroku-buildpack-go/blob/master/bin/compile), it does not currently support GoDeps, as traditional GoDeps style dependency management has been deprecated as Go v1.6. You can convert your GoDeps dependencies to a vendored dependency and that should fix that.
I personally recommend using glide: https://github.com/Masterminds/glide
But you can also use:
https://github.com/kardianos/govendor
or
https://github.com/constabulary/gb
As those are supported in the compile script for the buildpack.
Each of those support an automated conversion of GoDeps to their formats.
If you have ./vendor/vendor.json Heroku will automatically use govendor, unless you configure Heroku to use something otherwise.
This page may help as well https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-go
It does support Godep, technically, but it would seem you have to either use an older version of Go or move GoDeps to vendor.

Pebble sdk 2.x unable to load resource

I know pebble 2.x is a bit outdated, but that's the watch that I recently got and am interested in writing a small app on this.
I am unable to load the resource files (images and font) in my pebble app. Below is the error message when I try to run pebble build:
Setting top to : /home/mixi/Documents/pebble-dev/helloworld
Setting out to : /home/mixi/Documents/pebble-dev/helloworld/build
Checking for program gcc,cc : arm-none-eabi-gcc
Checking for program ar : arm-none-eabi-ar
Found Pebble SDK in : /home/mixi/.pebble-sdk/SDKs/current/sdk-core/pebble/aplite
'configure' finished successfully (0.220s)
Waf: Entering directory `/home/mixi/Documents/pebble-dev/helloworld/build'
Error Generating Resources: File: bt-icon.png has specified invalid type: bitmap
Must be one of (raw, png, png-trans, font)
Generating resources failed
My appinfo.json:
{
"uuid": "93c49fe2-0b1e-44b8-8fff-22d9c87adab9",
"shortName": "helloworld",
"longName": "helloworld",
"companyName": "MakeAwesomeHappen",
"versionLabel": "1.0",
"sdkVersion": "2.9",
"targetPlatforms": ["aplite", "basalt", "chalk"],
"watchapp": {
"watchface": true
},
"appKeys": {
"dummy": 0
},
"resources": {
"media": [
{
"type": "bitmap",
"name": "IMAGE_BT_ICON",
"file": "bt-icon.png"
}
]
},
"versionCode": 1
}
My Pebble version:
Pebble Tool v4.0 (active SDK: v2.9)
I also tried creating a test app on pebblecloud with their sample. The sample runs fine without resource, but also fails when I add a new resource to the project. Is there a fix to this?
Apparently, pebble 2.x does not like "bitmap" type. All I had to do was change resource type to "png" in the JSON file:
"media": [
{
"type": "png",
"name": "IMAGE_BT_ICON",
"file": "bt-icon.png"
}
]
OMG =A=..
As for CloudPebble, the drop down for Resource Type doesn't seem to show up and it seems to select Bitmap by default.. Maybe it'll be fixed in the near future idk.

Resources