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

Add TransitionFactory interface, to be used later for creating #7825

Closed
wants to merge 3 commits into from

Conversation

katre
Copy link
Member

@katre katre commented Mar 25, 2019

transitions.

Part of work on #7814.

import com.google.devtools.build.lib.analysis.config.transitions.TransitionFactory.TransitionFactoryData;

/**
* Helper for the types of transitions that are statically declared but must be instantiated for
Copy link
Contributor

Choose a reason for hiding this comment

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

Since, as I understand, we're going to funnel all transitions through this interface, even if they can be instantiated statically, can we provide more context for this javadoc?

Also, let's reference

* input build options and any immutable member fields. Implementations must also override
* {@link Object#equals} and {@link Object#hashCode} unless exclusively accessed as
* singletons. For example:
(the importance of resolving to singletons when possible, otherwise being careful to support .equals), lest we run into hard-to-track bugs when these get passed around hash maps, etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added more details and added that note.

I'm still not entirely sure if everything will be factories, or if we'll still have static transitions. I can come back and update this Javadoc once a decision becomes clear during the implementation.

@bazel-io bazel-io closed this in c30785a Mar 25, 2019
@katre katre deleted the tf-01-transition-factory branch March 25, 2019 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants