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

Deprecate legacy default sources API #5987

Conversation

illicitonion
Copy link
Contributor

Instead, fill in defaults during the engine parsing phase.

This means that default sources are eager parsed in parallel alongside the rest of BUILD file parsing, rather than lazily done synchronously later on.

lambda: True,
'1.10.0.dev0',
('Specifying default sources on Targets is deprecated, and now takes a slow path. '
'Instead, class {} should have a TargetAdaptor installed specifying default sources to '
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is a way for a plugin author to do this, since TargetAdaptors are (intentionally) not exposed as an extension point right now... see #3560 (mentioned in src/python/pants/init/engine_initializer.py) and #4535 about that.

I think that in order to do this, we'd need to actually expose TargetAdaptor... and it's not clear how to do that. A few options:

  1. doing it as a static/cls method of Target
  2. requiring that Target types that need to be constructed with a TargetAdaptor subclass other than the default need to install def rules with a particular shape
  3. ?

@illicitonion
Copy link
Contributor Author

Sent out #5989 which is probably better

@illicitonion illicitonion deleted the dwagnerhall/lazyfileset/defaultsources branch June 21, 2018 09:47
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

Successfully merging this pull request may close these issues.

2 participants