• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 8070
0%
main: 93%

Build:
Build:
LAST BUILD BRANCH: new-scala-given-syntax
DEFAULT BRANCH: main
Ran 24 Nov 2015 11:55PM UTC
Jobs 8
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
8070

push

travis-ci

jsirois
Fix bug that recognized "C" as a remote package.

The `import "C"` statement has special semantics and imports of this
form are satisfied by the Go distribution with links to local libraries
using the C calling convention.  Pants did not recognize this and would
attempt to fetch "C" and fail since "C" is not part of the stdlib and is
also not a remote package.

This change fixes import scanning code to know about "C" and also
centralizes the import logic in `ImportOracle`.

Testing Done:
Added a new failing `test_issues_2616` to `GoFetchTest` that this change
fixes as well `compile` and `run` integration tests for Cgo that aren't
directly related to this change but do exercise the full pipeline of
interest for Cgo code.

Also did not check in the motivating example since it requires ImageMagick
libs, but adding
`contrib/go/examples/3rdparty/go/github.com/gographics/imagick/BUILD`:
```python
# Auto-generated by pants!
# To re-generate run: `pants buildgen.go --materialize --remote`

go_remote_libraries(
  rev='<a class=hub.com/pantsbuild/pants/commit/02d20b370cf9bac9d1d8297397c7e4b20a92add4">02d20b370',
  packages=[
    'imagick',
  ]
)
```

Demonstrates a successful resolve and compile for remote Cgo code (the
scary output below is just 3 compile warnings in ImageMagick):
```
./pants compile contrib/go/examples/3rdparty/go/github.com/gographics/imagick
...
09:43:02 00:00   [resolve]
...
09:43:02 00:00     [go]
                   Invalidated 1 target.INFO] Downloading https://github.com/gographics/imagick/archive/02d20b370cf9bac9d1d8297397c7e4b20a92add4.tar.gz...

09:43:04 00:02       [github.com/gographics/imagick/imagick]
...
09:43:04 00:02   [compile]
...
09:43:04 00:02     [go]
                   Invalidated 1 target.
09:43:04 00:02       [install]
                     # github.com/gographics/imagick/imagick
                     .pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.gographics.imagick.imagick/src/github.com/gographics/imagick/imagick/magick_core_env.go: In function ‘_cgo_85b92643e208_Cfunc_IsMagickInstantiated’:
                     .pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.gographics.imagick.imagick/src/github.com/gographics/imagick/imagick/magick_core_env.go:54:2: warning: ‘IsMagickInstantiated’ is deprecated [-Wdeprecated-declarations]
                     In file included from /usr/include/ImageMagick-6/magick/MagickCore.h:95:0,
                                      from /usr/include/ImageMagick-6/wand/MagickWand.h:72,
                                      from .pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.gographics.imagick.imagick/src/github.com/gographics/imagick/imagick/magick_core_env.go:8:
                     /usr/include/ImageMagick-6/magick/deprecate.h:205:3: note: declared here
                        IsMagickInstantiated(void) magick_attribute((deprecated)),
                        ^
                     # github.com/gographics/imagick/imagick
                     .pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.gographics.imagick.imagick/src/github.com/gographics/imagick/imagick/magick_wand_image.go: In function ‘_cgo_85b92643e208_Cfunc_MagickRadialBlurImage’:
                     .pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.gographics.imagick.imagick/src/github.com/gographics/imagick/imagick/magick_wand_image.go:3032:2: warning: ‘MagickRadialBlurImage’ is deprecated [-Wdeprecated-declarations]
                     In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:78:0,
                                      from .pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.gographics.imagick.imagick/src/github.com/gographics/imagick/imagick/magick_wand_image.go:9:
                     /usr/include/ImageMagick-6/wand/deprecate.h:109:3: note: declared here
                        MagickRadialBlurImage(MagickWand *,const double)
                        ^
                     .pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.gographics.imagick.imagick/src/github.com/gographics/imagick/imagick/magick_wand_image.go: In function ‘_cgo_85b92643e208_Cfunc_MagickRadialBlurImageChannel’:
                     .pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.gographics.imagick.imagick/src/github.com/gographics/imagick/imagick/magick_wand_image.go:3049:2: warning: ‘MagickRadialBlurImageChannel’ is deprecated [-Wdeprecated-declarations]
                      // image that is added back into the original.
                       ^
                     In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:78:0,
                                      from .pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.gographics.imagick.imagick/src/github.com/gographics/imagick/imagick/magick_wand_image.go:9:
                     /usr/include/ImageMagick-6/wand/deprecate.h:111:3: note: declared here
                        MagickRadialBlurImageChannel(MagickWand *,const ChannelType,const double)
                        ^

...
09:43:14 00:12   [complete]
               SUCCESS
```

CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/93049583

Bugs closed: 2616, 2619

Reviewed at https://rbcommons.com/s/twitter/r/3170/
Jobs
ID Job ID Ran Files Coverage
1 8070.1 (CI_FLAGS="-cjlpn 'Various pants self checks'") 24 Nov 2015 11:55PM UTC 0
Travis Job 8070.1
4 8070.4 (CI_FLAGS="-fkmsrcjlp 'Python contrib tests'") 25 Nov 2015 12:07AM UTC 0
Travis Job 8070.4
5 8070.5 (CI_FLAGS="-fkmsrjlpn -i 0/6 'Python integration tests for pants - shard 1'") 25 Nov 2015 12:01AM UTC 0
Travis Job 8070.5
6 8070.6 (CI_FLAGS="-fkmsrjlpn -i 1/6 'Python integration tests for pants - shard 2'") 25 Nov 2015 12:05AM UTC 0
Travis Job 8070.6
7 8070.7 (CI_FLAGS="-fkmsrjlpn -i 2/6 'Python integration tests for pants - shard 3'") 25 Nov 2015 12:06AM UTC 0
Travis Job 8070.7
8 8070.8 (CI_FLAGS="-fkmsrjlpn -i 3/6 'Python integration tests for pants - shard 4'") 25 Nov 2015 12:10AM UTC 0
Travis Job 8070.8
9 8070.9 (CI_FLAGS="-fkmsrjlpn -i 4/6 'Python integration tests for pants - shard 5'") 25 Nov 2015 12:09AM UTC 0
Travis Job 8070.9
10 8070.10 (CI_FLAGS="-fkmsrjlpn -i 5/6 'Python integration tests for pants - shard 6'") 25 Nov 2015 12:11AM UTC 0
Travis Job 8070.10
Source Files on build 8070
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #8070
  • b5ed5c4a on github
  • Prev Build on master (#8066)
  • Next Build on master (#8078)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc