Skip to content
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

Provide Upgrade Tool for Discovering Major Changes #10963

Closed
rcuza opened this issue Oct 15, 2020 · 1 comment
Closed

Provide Upgrade Tool for Discovering Major Changes #10963

rcuza opened this issue Oct 15, 2020 · 1 comment
Assignees

Comments

@rcuza
Copy link
Contributor

rcuza commented Oct 15, 2020

While upgrading to v2.0.0, I discovered that the removal of the provides= field in python_library fails one at a time. In other words, running ./pants filedeps :: will cause an exception message for one of the broken target definitions with a provides= field. Once that is fixed, the command will fail in the exact same way on the next target with a provides= field.

Story

As a person upgrading pants I would like to run a command that looks at my monorepo and reports on all the work that needs to be done to upgrade to the next version.

Details of Example

Engine traceback:
  in select
  in pants.backend.project_info.filedeps.file_deps
  in pants.engine.internals.graph.resolve_targets
  in pants.engine.internals.graph.resolve_unexpanded_targets
  in pants.engine.internals.graph.resolve_target (pycb/src/python/jupyter_stubber)
Traceback (most recent call last):
  File "/Users/myacct/.cache/pants/setup/bootstrap-Darwin-x86_64/2.0.0rc0_py36/lib/python3.6/site-packages/pants/engine/internals/native.py", line 69, in generator_send
    res = func.send(arg)
  File "/Users/myacct/.cache/pants/setup/bootstrap-Darwin-x86_64/2.0.0rc0_py36/lib/python3.6/site-packages/pants/engine/internals/graph.py", line 142, in resolve_target
    target = target_type(target_adaptor.kwargs, address=address, union_membership=union_membership)
  File "/Users/myacct/.cache/pants/setup/bootstrap-Darwin-x86_64/2.0.0rc0_py36/lib/python3.6/site-packages/pants/util/meta.py", line 182, in new_init
    prev_init(self, *args, **kwargs)
  File "/Users/myacct/.cache/pants/setup/bootstrap-Darwin-x86_64/2.0.0rc0_py36/lib/python3.6/site-packages/pants/engine/target.py", line 287, in __init__
    f"Unrecognized field `{alias}={value}` in target {address}. Valid fields for "
pants.engine.target.InvalidFieldException: Unrecognized field `provides=jupyter_stubber` in target pycb/src/python/jupyter_stubber. Valid fields for the target type `python_library`: ['compatibility', 'dependencies', 'description', 'sources', 'tags'].
@Eric-Arellano Eric-Arellano added this to the 2.0.0 important milestone Oct 15, 2020
@Eric-Arellano Eric-Arellano self-assigned this Oct 15, 2020
Eric-Arellano added a commit that referenced this issue Oct 15, 2020
…0970)

Closes #10963.

Even though these restored types no-op, a user pointed out that this will help with upgrading to 2.0. You can use `pants_ignore_warnings` to ignore these no-ops until you're ready to deal with them. We had no good reason to eagerly error, other than an oversight.

[ci skip-rust]
@Eric-Arellano
Copy link
Contributor

Closed by #10970

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants