Skip to content
Permalink
Browse files

Prepare 1.16.0.dev1 (#7535)

  • Loading branch information...
stuhood committed Apr 12, 2019
1 parent e1b7fed commit 3f515b49b1088853aebcf488df7215cacb4aa5b1
@@ -1,9 +1,26 @@
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

# Local sources which depend on remote sources extracted from a jar.
java_protobuf_library(
sources=['test_imports.proto',],
imports=[
sources=globs('*.proto'),
dependencies=[
':remote',
],
)

remote_sources(
name='remote',
dest=java_protobuf_library,
sources_target=':unpacked',
)

unpacked_jars(
name='unpacked',
libraries=[
'3rdparty:protobuf-test-import',
],
include_patterns=[
'**/*.proto',
],
)
@@ -1 +1 @@
1.16.0.dev0
1.16.0.dev1
@@ -1,52 +1,11 @@
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

from __future__ import absolute_import, division, print_function, unicode_literals

import logging

from pants.backend.jvm.targets.import_jars_mixin import ImportJarsMixin
from pants.backend.jvm.targets.jvm_target import JvmTarget
from pants.base.deprecated import deprecated_conditional
from pants.base.payload import Payload
from pants.base.payload_field import PrimitiveField


logger = logging.getLogger(__name__)


class JavaProtobufLibrary(ImportJarsMixin, JvmTarget):
class JavaProtobufLibrary(JvmTarget):
"""A Java library generated from Protocol Buffer IDL files."""

imported_target_kwargs_field = 'imports'
imported_target_payload_field = 'import_specs'

def __init__(self, address, payload=None, buildflags=None, imports=None, **kwargs):
"""
:param buildflags: Unused, and will be removed in a future release.
:param list imports: List of addresses of `jar_library <#jar_library>`_
targets which contain .proto definitions.
"""
payload = payload or Payload()
# TODO(#7111): Remove the `imports` field and make this not subclass `ImportJarsMixin`!
deprecated_conditional(
lambda: imports is not None,
'1.16.0.dev1',
"{cls} target definition at {addr} setting attribute 'imports'"
.format(cls=type(self).__name__, addr=address.spec),
hint_message="Use a combination of remote_sources() and unpacked_jars() instead.")
# TODO(Eric Ayers): The target needs to incorporate the settings of --gen-protoc-version
# and --gen-protoc-plugins into the fingerprint. Consider adding a custom FingeprintStrategy
# into ProtobufGen to get it.
payload.add_fields({
'import_specs': PrimitiveField(imports or ())
})
super(JavaProtobufLibrary, self).__init__(address=address, payload=payload, **kwargs)

deprecated_conditional(
lambda: buildflags is not None,
'1.16.0.dev1',
"{cls} target definition at {addr} setting attribute 'buildflags'"
.format(cls=type(self).__name__, addr=self.address.spec),
hint_message="Use the options denoted in `./pants help gen.protoc` instead.")
@@ -12,13 +12,11 @@

from pants.backend.codegen.protobuf.java.java_protobuf_library import JavaProtobufLibrary
from pants.backend.codegen.protobuf.subsystems.protoc import Protoc
from pants.backend.jvm.targets.jar_library import JarLibrary
from pants.backend.jvm.targets.java_library import JavaLibrary
from pants.backend.jvm.tasks.jar_import_products import JarImportProducts
from pants.base.build_environment import get_buildroot
from pants.base.exceptions import TaskError
from pants.base.workunit import WorkUnitLabel
from pants.build_graph.address import Address
from pants.fs.archive import ZIP
from pants.task.simple_codegen_task import SimpleCodegenTask
from pants.util.collections_abc_backport import OrderedDict
@@ -84,15 +82,6 @@ def synthetic_target_type(self, target):

def synthetic_target_extra_dependencies(self, target, target_workdir):
deps = OrderedSet()
if target.all_imported_jar_deps:
# We need to add in the proto imports jars.
jars_address = Address(os.path.relpath(target_workdir, get_buildroot()),
target.id + '-rjars')
jars_target = self.context.add_new_target(jars_address,
JarLibrary,
jars=target.all_imported_jar_deps,
derived_from=target)
deps.update([jars_target])
deps.update(self.javadeps)
return deps

@@ -8,7 +8,6 @@

from future.utils import text_type

from pants.base.deprecated import warn_or_error
from pants.base.hash_utils import stable_json_sha1
from pants.base.payload import Payload
from pants.base.payload_field import PayloadField
@@ -100,16 +99,8 @@ def __init__(self, payload=None, packages=None, **kwargs):
"""
payload = payload or Payload()

try:
assert_list(packages, key_arg='packages', expected_type=ConanRequirement,
raise_type=self._DeprecatedStringPackage)
except self._DeprecatedStringPackage as e:
warn_or_error('1.16.0.dev1',
'Raw strings as conan package descriptors',
hint='Use conan_requirement(...) instead! Error was: {}'.format(str(e)),
stacklevel=2, context=0)
packages = [ConanRequirement(s) if not isinstance(s, ConanRequirement) else s
for s in packages]
assert_list(packages, key_arg='packages', expected_type=ConanRequirement,
raise_type=self._DeprecatedStringPackage)

payload.add_fields({
'packages': ConanRequirementSetField(packages),
@@ -23,9 +23,6 @@

class ConanFetch(SimpleCodegenTask):

deprecated_scope = 'native-third-party-fetch'
deprecated_scope_removal_version = '1.16.0.dev0'

gentarget_type = ExternalNativeLibrary

sources_globs = ('include/**/*', 'lib/*',)
@@ -11,7 +11,6 @@
from future.utils import PY3
from twitter.common.collections import OrderedSet

from pants.base.deprecated import deprecated
from pants.util.collections_abc_backport import Iterable, Mapping, OrderedDict, Set
from pants.util.objects import DatatypeMixin
from pants.util.strutil import ensure_binary
@@ -105,24 +104,6 @@ def encode(self, o):
return super(CoercingEncoder, self).encode(self.default(o))


@deprecated(
'1.16.0.dev1',
'Please use pants.base.hash_utils.stable_json_sha1 instead.')
def stable_json_hash(obj, digest=None, encoder=None):
"""Hashes `obj` stably; ie repeated calls with the same inputs will produce the same hash.
:param obj: An object that can be rendered to json using the given `encoder`.
:param digest: An optional `hashlib` compatible message digest. Defaults to `hashlib.sha1`.
:param encoder: An optional custom json encoder.
:type encoder: :class:`json.JSONEncoder`
:returns: A stable hash of the given `obj`.
:rtype: str
:API: public
"""
return json_hash(obj, digest=digest, encoder=encoder)


def json_hash(obj, digest=None, encoder=None):
"""Hashes `obj` by dumping to JSON.
@@ -11,15 +11,11 @@
from future.utils import PY3
from twitter.common.collections import OrderedSet

from pants.base.hash_utils import stable_json_hash, stable_json_sha1
from pants.base.hash_utils import stable_json_sha1
from pants.util.meta import AbstractClass
from pants.util.strutil import ensure_binary


# NB: A deprecated alias/re-export.
stable_json_hash = stable_json_hash


def combine_hashes(hashes):
"""A simple helper function to combine other hashes. Sorts the hashes before rolling them in."""
hasher = sha1()
@@ -4,6 +4,173 @@ Master Pre-Releases
This document describes development releases which occur weekly from master, and which have
not undergone the vetting associated with ``stable`` releases.

1.16.0.dev1 (4/12/2019)
-----------------------

API Changes
~~~~~~~~~~~

* Set the fromfile option arg's default to True (#7513)
`PR #7513 <https://github.com/pantsbuild/pants/pull/7513>`_

* Bump cffi (1.11.1 => 1.11.5) (#7484)
`PR #7484 <https://github.com/pantsbuild/pants/pull/7484>`_

* Add run tracker option for versioning stats (#7481)
`PR #7481 <https://github.com/pantsbuild/pants/pull/7481>`_

* Replace SingletonRule with zero-parameter @rules (#7479)
`PR #7479 <https://github.com/pantsbuild/pants/pull/7479>`_

* Remove @rule Select syntax (#7477)
`PR #7477 <https://github.com/pantsbuild/pants/pull/7477>`_

* Switch to twitter.common 0.3.11 to fix DeprecationWarning when using Pants as a PEX (#7461)
`PR #7461 <https://github.com/pantsbuild/pants/pull/7461>`_

New features
~~~~~~~~~~~~

* A @console_rule for validating source files against regexes. (#7515)
`PR #7515 <https://github.com/pantsbuild/pants/pull/7515>`_

* Support JSON and YAML option fromfiles. (#7500)
`PR #7500 <https://github.com/pantsbuild/pants/pull/7500>`_

* add a deprecation_start_version argument to warn_or_error() (#7494)
`PR #7494 <https://github.com/pantsbuild/pants/pull/7494>`_

* Add more pants run information to the json reporter (#7474)
`PR #7474 <https://github.com/pantsbuild/pants/pull/7474>`_

* unrevert go test upgrades to test transitively after fixing issues (#7326)
`PR #7326 <https://github.com/pantsbuild/pants/pull/7326>`_

* Improve error message for isort failure in IsortRun (#7462)
`PR #7462 <https://github.com/pantsbuild/pants/pull/7462>`_

Bugfixes
~~~~~~~~

* Increase strictness of type checking for ExecuteProcessRequest args (#7529)
`PR #7529 <https://github.com/pantsbuild/pants/pull/7529>`_

* Improve Get errors for unhashable or mismatched types (#7502)
`PR #7502 <https://github.com/pantsbuild/pants/pull/7502>`_

* Don't consider strings as collections for TypedCollection (#7521)
`PR #7521 <https://github.com/pantsbuild/pants/pull/7521>`_

* Invalidate dependency targets for jvmdoc if --combined. (#7455)
`PR #7455 <https://github.com/pantsbuild/pants/pull/7455>`_

* allow python tools to specify a noop predicate and use it for conan (#7498)
`PR #7498 <https://github.com/pantsbuild/pants/pull/7498>`_

* Remove console_rule_integration.py from Python 3 CI blacklist (#7466)
`PR #7466 <https://github.com/pantsbuild/pants/pull/7466>`_

* Fix flaky `./pants idea-plugin` when using Python 3 by properly using ConsoleTask interface (#7460)
`PR #7460 <https://github.com/pantsbuild/pants/pull/7460>`_

* Fix `./pants server` not working with Python 3 (#7458)
`PR #7458 <https://github.com/pantsbuild/pants/pull/7458>`_

* Fix crash if pants.ini is missing in the buildroot (#7452)
`PR #7452 <https://github.com/pantsbuild/pants/pull/7452>`_

Refactoring, Improvements, and Tooling
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* fix TestPantsDaemonIntegration.test_signal_pailgun_stream_timeout flakiness (#7533)
`PR #7533 <https://github.com/pantsbuild/pants/pull/7533>`_

* Restore cron CI run from #7534 to adjust the time it starts (#7538)
`PR #7538 <https://github.com/pantsbuild/pants/pull/7538>`_

* Temporarily turn off cron CI run to adjust the time it starts (#7534)
`PR #7534 <https://github.com/pantsbuild/pants/pull/7534>`_

* Label messages of docs-only commits with SKIP_FULL_CI (#7526)
`PR #7526 <https://github.com/pantsbuild/pants/pull/7526>`_

* Fuse hydrated and unhydrated Struct parsing (#7523)
`PR #7523 <https://github.com/pantsbuild/pants/pull/7523>`_

* Move logging to Rust (#6817)
`PR #6817 <https://github.com/pantsbuild/pants/pull/6817>`_

* Run tests in src dirs in ci. (#7524)
`PR #7524 <https://github.com/pantsbuild/pants/pull/7524>`_

* avoid running a clean-all in integration tests, which are in a new buildroot (#7522)
`PR #7522 <https://github.com/pantsbuild/pants/pull/7522>`_

* make pantsd signal integration tests more reliable by setting the timeout (#7504)
`PR #7504 <https://github.com/pantsbuild/pants/pull/7504>`_

* add some comments to the example CI script in orgs.md (#7478)
`PR #7478 <https://github.com/pantsbuild/pants/pull/7478>`_

* Pass interpreter constraints to the Pex we release (#7511)
`PR #7511 <https://github.com/pantsbuild/pants/pull/7511>`_

* remove pyenv bootstrapping from travis_ci/Dockerfile (#7505)
`PR #7505 <https://github.com/pantsbuild/pants/pull/7505>`_

* Improve logging of build-support/isort.sh helper script (#7503)
`PR #7503 <https://github.com/pantsbuild/pants/pull/7503>`_

* Tweak Pytest logging in CI for less overwhelming logging of successful tests (#7501)
`PR #7501 <https://github.com/pantsbuild/pants/pull/7501>`_

* Install Python 2.7 and 3.6 on Centos6 base image through Pyenv (#7064)
`PR #7064 <https://github.com/pantsbuild/pants/pull/7064>`_

* Add a basic test for pantsd memory leaks. (#7488)
`PR #7488 <https://github.com/pantsbuild/pants/pull/7488>`_

* convert --skip to --strict in py thrift namespace clash check task (#7493)
`PR #7493 <https://github.com/pantsbuild/pants/pull/7493>`_

* Ensure Python 3.6 or 3.7 is installed on all CI shards (#7483)
`PR #7483 <https://github.com/pantsbuild/pants/pull/7483>`_

* Prepare Linux UCS2 shard for upgrade to Centos6 base image in #7064 (#7418)
`PR #7418 <https://github.com/pantsbuild/pants/pull/7418>`_

* Cache AWS CLI install in CI (#7472)
`PR #7472 <https://github.com/pantsbuild/pants/pull/7472>`_

* Remove StatsDb / Timing stats views (#7475)
`PR #7475 <https://github.com/pantsbuild/pants/pull/7475>`_

* Cache pyenv in CI (#7470)
`PR #7470 <https://github.com/pantsbuild/pants/pull/7470>`_

* Consolidate JSON stats recording in RunTracker (#7446)
`PR #7446 <https://github.com/pantsbuild/pants/pull/7446>`_

* Fix issues with deploy shards not properly setting Python version (#7471)
`PR #7471 <https://github.com/pantsbuild/pants/pull/7471>`_

* No longer pin `pants_runtime_python_version` with `./pants generate-pants-ini` (#7469)
`PR #7469 <https://github.com/pantsbuild/pants/pull/7469>`_
`PR #49 <https://github.com/pantsbuild/setup/pull/49>`_

* Remove Python 3 CI blacklist mechanism (#7468)
`PR #7468 <https://github.com/pantsbuild/pants/pull/7468>`_

* Remove backend/python/tasks tests from Python 3 CI blacklist and refactor their BUILD entries to be more granular (#7463)
`PR #7463 <https://github.com/pantsbuild/pants/pull/7463>`_

* Fix typo from #7424 to properly fix TensorFlow test during Python 3.7 cron job (#7464)
`PR #7464 <https://github.com/pantsbuild/pants/pull/7464>`_

* hack default compiler option sets to fix tensorflow 1.13.1 on python 3.7 (#7424)
`PR #7424 <https://github.com/pantsbuild/pants/pull/7424>`_


1.16.0.dev0 (3/29/2019)
-----------------------

0 comments on commit 3f515b4

Please sign in to comment.
You can’t perform that action at this time.