Introduce type-safe and consistent pattern for handling build globals#48778
Merged
mark-vieira merged 5 commits intoelastic:masterfrom Nov 1, 2019
Merged
Introduce type-safe and consistent pattern for handling build globals#48778mark-vieira merged 5 commits intoelastic:masterfrom
mark-vieira merged 5 commits intoelastic:masterfrom
Conversation
This commit introduces a consistent, and type-safe manner for handling global build parameters through out our build logic. Primarily this replaces the existing usages of extra properties with static accessors. It also introduces and explicit API for initialization and mutation of any such parameters, as well as better error handling for uninitialized or eager access of parameter values. Closes elastic#42042 Signed-off-by: Mark Vieira <portugee@gmail.com>
Collaborator
|
Pinging @elastic/es-core-infra (:Core/Infra/Build) |
Signed-off-by: Mark Vieira <portugee@gmail.com>
…bals # Conflicts: # distribution/docker/build.gradle # plugins/repository-azure/qa/microsoft-azure-storage/build.gradle
Signed-off-by: Mark Vieira <portugee@gmail.com>
Signed-off-by: Mark Vieira <portugee@gmail.com>
Contributor
Author
|
If you want more background on the motivations here please take a look at the description of #42042. This refactoring primarily enables the IDE to provide considerably better insight into how these globals are used. I can now easily see all usages: And navigate quickly to where a parameter is initialized: And of course all the other nice refactoring abilities enabled by the IDE when things are static references vs dynamic properties. |
mark-vieira
added a commit
to mark-vieira/elasticsearch
that referenced
this pull request
Nov 1, 2019
…elastic#48778) This commit introduces a consistent, and type-safe manner for handling global build parameters through out our build logic. Primarily this replaces the existing usages of extra properties with static accessors. It also introduces and explicit API for initialization and mutation of any such parameters, as well as better error handling for uninitialized or eager access of parameter values. Closes elastic#42042 (cherry picked from commit af6af34)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This commit introduces a consistent, and type-safe manner for handling
global build parameters through out our build logic. Primarily this
replaces the existing usages of extra properties with static accessors.
It also introduces and explicit API for initialization and mutation of
any such parameters, as well as better error handling for uninitialized
or eager access of parameter values.
Closes #42042