New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design unification of macros/CAOFs/struct-inheritance #3561

Open
stuhood opened this Issue Jun 6, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@stuhood
Copy link
Member

stuhood commented Jun 6, 2016

EDIT: This description needs a refresh: see #7022 for a more recent perspective.


On top of existing symbol-level rewrites that are possible with TargetMacros and context aware object factories (CAOFs), the new engine adds struct inheritance and merging. For many cases, inheritance/merging should remove the need for macros/CAOFs.

But one of the advantages that macro/CAOFs retain is that they make it possible to globally and transparently affect the behaviour in a repo. For example, Twitter uses the ability to globally override the junit_tests and python_tests symbols with a macro that adds additional parameters, which are stored in target tags after validation.

(It's possible that the move to "untyped Targets with typed Products" will solve this issue, because Twitter would move to encapsulating the additional parameters to junit_tests and python_tests into a Product. If so, that should be fleshed out by this ticket.)

cc @jsirois

@stuhood stuhood added the engine label Jun 6, 2016

stuhood added a commit that referenced this issue Jun 28, 2016

[engine] Fix TargetMacro replacements of adapted aliases
In cases where a TargetMacro has been installed as wrapping an existing symbol, it will not exist in the `target_aliases` field, and will thus not be replaced with our adaptor.

"Why yes, this continues to highlight the importance of:"
#3560
#3561

Testing Done:
https://travis-ci.org/pantsbuild/pants/builds/140649055
And tested on internal TargetMacro usecases.

Bugs closed: 3506, 3607

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

digwanderlust added a commit to digwanderlust/pants that referenced this issue Jul 1, 2016

Prepare the 1.1.0-rc0 release
  1.1.0-rc0 (7/1/2016)
  --------------------

  This is the first `1.1.0-rc` release on the way to the `1.1.0`.

  New Features
  ~~~~~~~~~~~~

  * Subprocess clean-all
    `RB pantsbuild#4011 <https://rbcommons.com/s/twitter/r/4011>`_

  * expose products for jvm bundle create and python binary create tasks
    `RB pantsbuild#3959 <https://rbcommons.com/s/twitter/r/3959>`_
    `RB pantsbuild#4015 <https://rbcommons.com/s/twitter/r/4015>`_

  * Implement zinc `unused deps` check
    `RB pantsbuild#3635 <https://rbcommons.com/s/twitter/r/3635>`_

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

  * Add `is_target_root` in export
    `RB pantsbuild#4030 <https://rbcommons.com/s/twitter/r/4030>`_

  Bugfixes
  ~~~~~~~~

  * ConsoleRunner bugfix for @TestSerial and other test cleanups
    `RB pantsbuild#4026 <https://rbcommons.com/s/twitter/r/4026>`_

  New Engine Work
  ~~~~~~~~~~~~~~~

  * [engine] Proper implementation of `**` globs in the v2 engine
    `RB pantsbuild#4034 <https://rbcommons.com/s/twitter/r/4034>`_

  * [engine] Fix TargetMacro replacements of adapted aliases
    `Issue pantsbuild#3560 <https://github.com/pantsbuild/pants/issues/3560>`_
    `Issue pantsbuild#3561 <https://github.com/pantsbuild/pants/issues/3561>`_
    `RB pantsbuild#4000 <https://rbcommons.com/s/twitter/r/4000>`_

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

  * Fix dead apidocs link for guava.
    `RB pantsbuild#4037 <https://rbcommons.com/s/twitter/r/4037>`_

  * Bump setproctitle to 1.1.10.
    `Issue pantsbuild#44 <https://github.com/dvarrazzo/py-setproctitle/issues/44>`_
    `RB pantsbuild#4035 <https://rbcommons.com/s/twitter/r/4035>`_

  * Set a default read timeout for fetching node pre-installed modules. 1 second default often fails
    `RB pantsbuild#4025 <https://rbcommons.com/s/twitter/r/4025>`_

  * Improve stderr handling for ProcessManager.get_subprocess_output().
    `RB pantsbuild#4019 <https://rbcommons.com/s/twitter/r/4019>`_

  * Add AnnotatedParallelClassesAndMethodsTest* and AnnotatedParallelMethodsTest*
    `RB pantsbuild#4027 <https://rbcommons.com/s/twitter/r/4027>`_

digwanderlust added a commit to digwanderlust/pants that referenced this issue Jul 1, 2016

Prepare the 1.1.0-rc0 release
1.1.0-rc0 (7/1/2016)
  --------------------

  This is the first `1.1.0-rc` release on the way to the `1.1.0`.

  New Features
  ~~~~~~~~~~~~

  * Subprocess clean-all
    `RB pantsbuild#4011 <https://rbcommons.com/s/twitter/r/4011>`_

  * expose products for jvm bundle create and python binary create tasks
    `RB pantsbuild#3959 <https://rbcommons.com/s/twitter/r/3959>`_
    `RB pantsbuild#4015 <https://rbcommons.com/s/twitter/r/4015>`_

  * Implement zinc `unused deps` check
    `RB pantsbuild#3635 <https://rbcommons.com/s/twitter/r/3635>`_

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

  * Add `is_target_root` in export
    `RB pantsbuild#4030 <https://rbcommons.com/s/twitter/r/4030>`_

  Bugfixes
  ~~~~~~~~

  * ConsoleRunner bugfix for @TestSerial and other test cleanups
    `RB pantsbuild#4026 <https://rbcommons.com/s/twitter/r/4026>`_

  New Engine Work
  ~~~~~~~~~~~~~~~

  * [engine] Proper implementation of `**` globs in the v2 engine
    `RB pantsbuild#4034 <https://rbcommons.com/s/twitter/r/4034>`_

  * [engine] Fix TargetMacro replacements of adapted aliases
    `Issue pantsbuild#3560 <https://github.com/pantsbuild/pants/issues/3560>`_
    `Issue pantsbuild#3561 <https://github.com/pantsbuild/pants/issues/3561>`_
    `RB pantsbuild#4000 <https://rbcommons.com/s/twitter/r/4000>`_

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

  * Fix dead apidocs link for guava.
    `RB pantsbuild#4037 <https://rbcommons.com/s/twitter/r/4037>`_

  * Bump setproctitle to 1.1.10.
    `Issue pantsbuild#44 <https://github.com/dvarrazzo/py-setproctitle/issues/44>`_
    `RB pantsbuild#4035 <https://rbcommons.com/s/twitter/r/4035>`_

  * Set a default read timeout for fetching node pre-installed modules. 1 second default often fails
    `RB pantsbuild#4025 <https://rbcommons.com/s/twitter/r/4025>`_

  * Improve stderr handling for ProcessManager.get_subprocess_output().
    `RB pantsbuild#4019 <https://rbcommons.com/s/twitter/r/4019>`_

  * Add AnnotatedParallelClassesAndMethodsTest* and AnnotatedParallelMethodsTest*
    `RB pantsbuild#4027 <https://rbcommons.com/s/twitter/r/4027>`_

Testing Done:
CI pending: https://travis-ci.org/pantsbuild/pants/builds/141717353

Bugs closed: 3620

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

@kwlzn kwlzn added this to the 1.4.0 milestone Apr 25, 2017

@stuhood

This comment has been minimized.

Copy link
Member

stuhood commented Jun 7, 2017

This relates to #4535.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment