在使用 Bluemix 上的社区 Golang 构建包时出现编译错误。

huangapple go评论86阅读模式
英文:

compiling error when using community golang buildpack on bluemix

问题

我的蓝色混合应用程序工作了几周,但是当我将应用程序推送到蓝色混合云时,它开始报告解析错误,错误信息为Buildpack compilation step failed

-----> 下载应用程序包 (556K)
正在克隆到 '/tmp/buildpacks/buildpack-go'...
子模块 'compile-extensions' (https://github.com/cloudfoundry-incubator/compile-extensions.git) 已注册到路径 'compile-extensions'
正在克隆到 'compile-extensions'...
子模块路径 'compile-extensions': 检出 'f752ecf4b27d2f31bb082dfe7a47c76fefc769d7'
-------> Buildpack 版本 1.4.0
解析错误: 在第32行第3列处期望找到值之间的分隔符
分期失败: Buildpack 编译步骤失败

这是我的 manifest.yml 文件:

---
applications:
- name: joystick
  memory: 128M
  path: .
  buildpack: https://github.com/cloudfoundry/buildpack-go.git

更新:我仔细阅读了错误信息,并发现这是应用程序空间问题,由于代码合并导致的 Godeps.json 解析错误,其中一个逗号被遗漏。我无法在本地重现此问题,因为我检查了 _workspace 目录,它从不解析 Godeps.json

我创建了issue 86来改进这个构建包,以提供更多关于此类错误的信息。

英文:

One of my bluemix application worked for weeks but it start to report parse error with Buildpack compilation step failed when pushing app to bluemix:

-----> Downloaded app package (556K)
Cloning into '/tmp/buildpacks/buildpack-go'...
Submodule 'compile-extensions' (https://github.com/cloudfoundry-incubator/compile-extensions.git) registered for path 'compile-extensions'
Cloning into 'compile-extensions'...
Submodule path 'compile-extensions': checked out 'f752ecf4b27d2f31bb082dfe7a47c76fefc769d7'
-------> Buildpack version 1.4.0
parse error: Expected separator between values at line 32, column 3
Staging failed: Buildpack compilation step failed

Here's my manifest.yml file:

---
applications:
- name: joystick
  memory: 128M
  path: .
  buildpack: https://github.com/cloudfoundry/buildpack-go.git

Update: I carefully read the error message and figured out it is application space problem caused by Godeps.json parsing error caused by code merging where one comma is missed. I can not reproduce this locally because I checked in _workspace directory where it never parse Godeps.json.

I created issue 86 to improve this buildpack to provide more information for such kind of error message.

答案1

得分: 1

错误消息parse error: Expected separator between values at line 32, column 3来自于构建包代码中的jq命令,它尝试从Godeps/Godeps.json中读取导入路径,假设它是一个有效的JSON文件。请参考/bin/compile的第64行。

如果Godeps.json不是JSON格式,它将停止构建包。

我创建了issue 86来改进这个构建包,以提供更多关于这种错误消息的信息。

感谢所有花时间解决这个问题的人。

更新:在Heroku Golang构建包中修复了issue 86,通过添加新的步骤来检查Godeps.json的格式。

英文:

The error message parse error: Expected separator between values at line 32, column 3 comes from jq command within buildpack code, where it tries to read import path from Godeps/Godeps.json by assuming it's a valid JSON file. see line #64 of /bin/compile.

It will stop buildpack if the Godeps.json is not json.

I created issue 86 to improve this buildpack to provide more information for such kind of error message.

Thanks for everyone who spent time on this problem.

Update: issue 86 was fixed in heroku golang buildpack by adding new step to checking Godeps.json format.

huangapple
  • 本文由 发表于 2015年7月3日 02:03:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/31191580.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定