Skip to content

Conversation

@mark-vieira
Copy link
Contributor

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

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 <[email protected]>
@mark-vieira mark-vieira added the :Delivery/Build Build or test infrastructure label Oct 31, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Build)

…bals

# Conflicts:
#	distribution/docker/build.gradle
#	plugins/repository-azure/qa/microsoft-azure-storage/build.gradle
@mark-vieira
Copy link
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:
image

And navigate quickly to where a parameter is initialized:
image

And of course all the other nice refactoring abilities enabled by the IDE when things are static references vs dynamic properties.

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

Very clever. LGTM.

@mark-vieira mark-vieira removed the WIP label Nov 1, 2019
@mark-vieira mark-vieira merged commit af6af34 into elastic:master Nov 1, 2019
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)
@mark-vieira mark-vieira deleted the refactor-gradle-globals branch November 1, 2019 18:33
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Delivery/Build Build or test infrastructure >non-issue Team:Delivery Meta label for Delivery team v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce consistent pattern for dealing with cross-project globals

4 participants