Remove the long-deprecated Target.is_codegen().

Review Request #4318 — Created Oct. 16, 2016 and submitted

benjyw
pants
pants-reviews
jsirois, kwlzn, tejal, zundel

Replace all calls with calls to Target.is_synthetic().

In pretty much all cases where we need to check if a target is a codegen
target, what we actually care about is whether that target was synthesized
in order to hold generated code. If didn't use target synthesis as an
implementation detail, we probably wouldn't have needed those is_codegen
checks to begin with.

This is an alternative to https://rbcommons.com/s/twitter/r/4316/ only one
of these will be submitted, hopefully this one, which is simpler.

CI passes: https://travis-ci.org/pantsbuild/pants/builds/168398072

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
ZU
  1. Ship It!
  2. 
      
WI
  1. 
      
  2. would need to bump the export version to 1.1.0

    1. to save sometime, the test needs to be changed because it is hardcoded https://github.com/pantsbuild/pants/blob/d2244274097b6d51236d19a5f121b02e729e9881/tests/python/pants_test/backend/project_info/tasks/test_export.py#L233-L233

    2. But is_code_gen hasn't been removed. I think we could keep it the way it is for now, or maybe increment the minor revision

    3. Ah that's right, thanks! Incrementing the minior version should do.

    4. The export format hasn't changed - we've changed where we get that bit from. Does that even require a minor version increment?

    5. ok it should be fine to land it as is. I will create a patch to remove it from export and bump the major version. pretty sure that is_code_gen is not used anymore in intellij already.

    6. We aren't using it.

  3. 
      
JS
  1. Ship It!
  2. 
      
BE
BE
BE
ST
  1. Typo in review description; otherwise looks great.

  2. 
      
BE
BE
BE
Review request changed

Status: Closed (submitted)

Change Summary:

042725beb2151ceddc821defa07b77c4508e91d9

Loading...