-
Notifications
You must be signed in to change notification settings - Fork 147
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 the framework for package-specific settings. #196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. The only change I want is to not mutate the origonal map.
testProjectDir.buildFile << """\ | ||
| plugins { | ||
| id 'com.linkedin.python-pex' | ||
| } | ||
| version = '1.0.0' | ||
| version = '1.0.0-MPDEP' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be SNAPSHOT vs MPDEP.
Map<String, String> environment | ||
|
||
@Input | ||
@Optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it optional? It has a default, would it be required?
public class DefaultEnvironmentMerger implements EnvironmentMerger { | ||
@Override | ||
public Map<String, String> mergeEnvironment(Map<String, String> target, Map<String, String> source) { | ||
if (source != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you probably want to make a new map, and insert all of the non-null values into it. This will change the origional I feel will cause problems down the road.
* | ||
* @param <T> Type of the object that represents package information. | ||
*/ | ||
public interface PackageSettings<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to bound T to be something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intent is to have a generic type for future development. No need to change T in this interface when we change the package information type.
154094e
to
9ec4b68
Compare
Add the interface and the default implementation for package specific settings. Use the framework calls in pip install and build wheel tasks.
9ec4b68
to
3da7f6e
Compare
Add the interface and the default implementation for package specific
settings. Use the framework calls in pip install and build wheel tasks.