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

pantsbuild / pants / 4825 / 3
0%
main: 93%

Build:
Build:
LAST BUILD BRANCH: fix_uv_lockfile_sync
DEFAULT BRANCH: main
Ran 11 May 2015 02:49PM UTC
Files 325
Run time 18s
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

11 May 2015 02:34PM UTC coverage: 69.201% (+0.05%) from 69.152%
CI_FLAGS="-fkmsrcnet 'Unit tests for pants and pants-plugins'"

push

travis-ci

jsirois
Handle warnings in BUILD file context.

Previously, deprecation warnings encountered parsing BUILD files did not
include BUILD file context making it harder to track down deprecated
constructs than it had to be.

Testing Done:
There are actually 2 fixes here.

One added a missing newline.  I'm not sure how this worked before, but for a standard BUILD file SyntaxError:
Before:
```console
$ PANTS_DEV=1 ./pants list src/python/pants/java:
...
Exception message: Error parsing FilesystemBuildFile(/home/jsirois/dev/3rdparty/jsirois-pants4/src/python/pants/java/BUILD):
    9:     '3rdparty/python/twitter/commons:twitter.common.collections',   10:     'src/python/pants/base:build_environment',   11:     'src/python/pants/java/distribution:distribution',*  12:     'src/python/pants/util:contextutil',}                                               ^ SyntaxError: invalid syntax (BUILD, line 12)

   13:     'src/python/pants/util:dirutil',   14:     'src/python/pants/util:meta',   15:   ]   16: )
 Loading addresses from 'src/python/pants/java' failed.
```

After:
```console
$ PANTS_DEV=1 ./pants list src/python/pants/java:
...
Exception message: While parsing FilesystemBuildFile(/home/jsirois/dev/3rdparty/jsirois-pants4/src/python/pants/java/BUILD):
    9:     '3rdparty/python/twitter/commons:twitter.common.collections',
   10:     'src/python/pants/base:build_environment',
   11:     'src/python/pants/java/distribution:distribution',
*  12:     'src/python/pants/util:contextutil',}
                                               ^ SyntaxError: invalid syntax (BUILD, line 12)

   13:     'src/python/pants/util:dirutil',
   14:     'src/python/pants/util:meta',
   15:   ]
   16: )

 Loading addresses from 'src/python/pants/java' failed.
```

And the new handling looks like so when encountering deprecated constructs in BUILD parsing:
Before:
```console
$ PANTS_DEV=1 ./pants list src::
*** Running pants in dev mode from /home/jsirois/dev/3rdparty/jsirois-pants4/src/python/pants/bin/pants_exe.py ***
WARN] <string>:6: DeprecationWarning:
pants.backend.core.wrapped_globs.__sub__ is deprecated and will be removed in version 0.0.35:
Instead of glob arithmetic, use glob(..., exclude=[...])

INFO] Detected git repository at /home/jsirois/dev/3rdparty/jsirois-pants4 on branch jsirois/build_file_parser/handle_warnings
src/python/pants/java/distribution:distribution
src/python/pants/docs:export
...
```

After:
```console
$ PANTS_DEV=1 ./pants list src::
*** Running pants in dev mode from /home/jsirois/dev/3rdparty/jsirois-pants4/src/python/pants/bin/pants_exe.py ***
WARN] While parsing FilesystemBuildFile(/home/jsirois/dev/3rdparty/jsirois-pants4/src/python/pants/option/BUILD):
    3:
    4: python_library(
    5:   name = 'option',
*   6:   sources = globs('*.py') - ['migrate_config.py'],
        DeprecationWarning:
pants.backend.core.wrapped_globs.__sub__ is deprecated and will be removed in version 0.0.35:
Instead of glob arithmetic, use glob(..., exclude=[...])

    7:   dependencies = [
    8:     '3rdparty/python/twitter/commons:twitter.common.collections',
    9:     'src/python/pants/base:build_environment',
   10:     'src/python/pants/base:config',

INFO] Detected git repository at /home/jsirois/dev/3rdparty/jsirois-pants4 on branch jsirois/build_file_parser/handle_warnings
src/python/pants/java/distribution:distribution
src/python/pants/docs:export
...
```

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

Bugs closed: 1174, 1521

Reviewed at https://rbcommons.com/s/twitter/r/2198/

13380 of 19335 relevant lines covered (69.2%)

0.69 hits per line

Source Files on job 4825.3 (CI_FLAGS="-fkmsrcnet 'Unit tests for pants and pants-plugins'")
  • Tree
  • List 0
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 4825
  • Travis Job 4825.3
  • ab2d326a on github
  • Prev Job for CI_FLAGS="-fkmsrcnet 'Unit tests for pants and pants-plugins'" on master (#4820.3)
  • Next Job for CI_FLAGS="-fkmsrcnet 'Unit tests for pants and pants-plugins'" on master (#4832.3)
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