无效的gopkg.in包和转入

时间:2015-11-16 23:40:20

标签: pants

尝试使用Pants进行构建时,我看到以下错误:

  File "build/bdist.macosx-10.10-intel/egg/pants/contrib/go/tasks/go_fetch.py", line 154, in _transitive_download_remote_libs
    all_known_addresses)
  File "build/bdist.macosx-10.10-intel/egg/pants/contrib/go/tasks/go_fetch.py", line 105, in _transitive_download_remote_libs
    fetcher.fetch(go_remote_lib.import_path, dest=tmp_fetch_root, rev=go_remote_lib.rev)
  File "build/bdist.macosx-10.10-intel/egg/pants/contrib/go/subsystems/fetchers.py", line 437, in fetch
    github_root, github_rev = self._map_import_path(import_path, rev)
  File "/Users/chad/.cache/pants/setup/bootstrap/pants.mbFDa8/install/lib/python2.7/site-packages/pants/util/memo.py", line 95, in memoize
    result = func(*args, **kwargs)
  File "build/bdist.macosx-10.10-intel/egg/pants/contrib/go/subsystems/fetchers.py", line 454, in _map_import_path
    raise self.FetchError('Invalid gopkg.in package and rev in: {}'.format(import_path))

Exception message: Invalid gopkg.in package and rev in: gopkg.in/amz.v1/aws

以下是我的BUILD文件的内容:

# Auto-generated by pants!
# To re-generate run: `pants buildgen.go --materialize --remote`

go_remote_library(rev='v1')

查看代码,我发现错误来自于未能匹配fetchers.py,on line 453中的正则表达式。

我在Mac OS X 10.10(Yosemite)上运行Pants版本0.0.59

1 个答案:

答案 0 :(得分:1)

注意到@Huckphin偶然发现了pantsbuild.pants<=0.0.59中的错误。他提交了一个issue,现在已经解决了处理gopkg.in远程导入路径的问题,这些路径指向远程仓库中的子包。该修复程序将于2015年11月20日在0.0.60的正式星期五发布中发布。