<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/buildstream.git/src/buildstream/_pluginfactory/sourcefactory.py, branch master</title>
<subtitle>gitlab.com: buildstream/buildstream.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/'/>
<entry>
<title>Refactor: Lazily instantiate ProvenanceInformation objects</title>
<updated>2020-10-01T04:27:30+00:00</updated>
<author>
<name>Tristan van Berkom</name>
<email>tristan.vanberkom@codethink.co.uk</email>
</author>
<published>2020-08-13T10:01:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=751c80d4938b7c3a798d056134f58844242939b3'/>
<id>751c80d4938b7c3a798d056134f58844242939b3</id>
<content type='text'>
As a rule, throughout the codebase we should not be using internal
ProvenanceInformation objects in our APIs, but rather Node objects.

This is because ProvenanceInformation is generated on the fly from
a Node object, and it is needlessly expensive to instantiate one before
it is absolutely needed.

This patch unilaterally fixes the codebase to pass `provenance_node`
Node objects around as arguments rather than `provenance` ProvenanceInformation
objects.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As a rule, throughout the codebase we should not be using internal
ProvenanceInformation objects in our APIs, but rather Node objects.

This is because ProvenanceInformation is generated on the fly from
a Node object, and it is needlessly expensive to instantiate one before
it is absolutely needed.

This patch unilaterally fixes the codebase to pass `provenance_node`
Node objects around as arguments rather than `provenance` ProvenanceInformation
objects.
</pre>
</div>
</content>
</entry>
<entry>
<title>_pluginfactory: Delegating the work of locating plugins to the PluginOrigin</title>
<updated>2020-05-28T06:02:23+00:00</updated>
<author>
<name>Tristan van Berkom</name>
<email>tristan.vanberkom@codethink.co.uk</email>
</author>
<published>2020-05-20T10:17:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=3f418029af80591d7a4592ee7e5a9312dfdf2d54'/>
<id>3f418029af80591d7a4592ee7e5a9312dfdf2d54</id>
<content type='text'>
This way we split up the logic of how to load plugins from different
origins into their respective classes.

This commit also:

  o Introduces PluginType (which is currently either SOURCE or ELEMENT)

  o Reduces the complexity of the PluginFactory constructor

  o Kills the loaded_dependencies list and the all_loaded_plugins API,
    and replaces both of these with a new list_plugins() API.

    Consequently the jobpickler.py from the scheduler, and the
    widget.py from the frontend, are updated to use list_plugins().

  o Split up the PluginOrigin implementations into separate files

    Instead of having all PluginOrigin classes in pluginorigin.py, split
    it up into one base class and separate files for each implementation,
    which is more inline with BuildStream coding style.

    This has the unfortunate side effect of adding load_plugin_origin()
    into the __init__.py file, because keeping new_from_node() as
    a PluginOrigin class method cannot be done without introducing a
    cyclic dependency with PluginOrigin and it's implementations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This way we split up the logic of how to load plugins from different
origins into their respective classes.

This commit also:

  o Introduces PluginType (which is currently either SOURCE or ELEMENT)

  o Reduces the complexity of the PluginFactory constructor

  o Kills the loaded_dependencies list and the all_loaded_plugins API,
    and replaces both of these with a new list_plugins() API.

    Consequently the jobpickler.py from the scheduler, and the
    widget.py from the frontend, are updated to use list_plugins().

  o Split up the PluginOrigin implementations into separate files

    Instead of having all PluginOrigin classes in pluginorigin.py, split
    it up into one base class and separate files for each implementation,
    which is more inline with BuildStream coding style.

    This has the unfortunate side effect of adding load_plugin_origin()
    into the __init__.py file, because keeping new_from_node() as
    a PluginOrigin class method cannot be done without introducing a
    cyclic dependency with PluginOrigin and it's implementations.
</pre>
</div>
</content>
</entry>
<entry>
<title>source.py: Allow access to element's variable</title>
<updated>2020-05-12T15:52:00+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>contact@benschubert.me</email>
</author>
<published>2020-05-12T12:13:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=830e2142ff9f2688c04119df5be8efebc2649dca'/>
<id>830e2142ff9f2688c04119df5be8efebc2649dca</id>
<content type='text'>
This automatically expands the variables from the element into
the sources config
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This automatically expands the variables from the element into
the sources config
</pre>
</div>
</content>
</entry>
<entry>
<title>plugin.py: Rework how deprecation warnings are configured.</title>
<updated>2020-05-04T08:55:32+00:00</updated>
<author>
<name>Tristan Van Berkom</name>
<email>tristan.vanberkom@codethink.co.uk</email>
</author>
<published>2020-04-30T07:21:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=d1d002dec836579e0f708ad438a8265070963c51'/>
<id>d1d002dec836579e0f708ad438a8265070963c51</id>
<content type='text'>
This is mostly a semantic change which defines how deprecation warnings
are suppressed in a more consistent fashion, by declaring such suppressions
in the plugin origin declarations rather than on the generic element/source
configuration overrides section.

Other side effects of this commit are that the warnings have been enhanced
to include the provenance of whence the deprecated plugins have been used in
the project, and that the custom deprecation message is optional and will
appear in the message detail string rather than in the primary warning text,
which now simply indicates that the plugin being used is deprecated.

Documentation and test cases are updated.

This fixes #1291
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is mostly a semantic change which defines how deprecation warnings
are suppressed in a more consistent fashion, by declaring such suppressions
in the plugin origin declarations rather than on the generic element/source
configuration overrides section.

Other side effects of this commit are that the warnings have been enhanced
to include the provenance of whence the deprecated plugins have been used in
the project, and that the custom deprecation message is optional and will
appear in the message detail string rather than in the primary warning text,
which now simply indicates that the plugin being used is deprecated.

Documentation and test cases are updated.

This fixes #1291
</pre>
</div>
</content>
</entry>
<entry>
<title>_pluginfactory/pluginfactory.py: Add provenance to missing plugin errors</title>
<updated>2020-05-03T02:52:26+00:00</updated>
<author>
<name>Tristan Van Berkom</name>
<email>tristan.vanberkom@codethink.co.uk</email>
</author>
<published>2020-04-29T07:20:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=9084ae13d1872a21ae1a3298f44e192e7cf7ca8a'/>
<id>9084ae13d1872a21ae1a3298f44e192e7cf7ca8a</id>
<content type='text'>
So far we were only reporting "No Source plugin registered for kind 'foo'",
without specifying what bst file with line and column information, this
commit fixes it.

Additionally, this patch stores the provenance on the MetaSource to
allow this to happen for sources.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So far we were only reporting "No Source plugin registered for kind 'foo'",
without specifying what bst file with line and column information, this
commit fixes it.

Additionally, this patch stores the provenance on the MetaSource to
allow this to happen for sources.
</pre>
</div>
</content>
</entry>
<entry>
<title>Plugin loading refactor, removing all versioning</title>
<updated>2020-04-29T07:24:58+00:00</updated>
<author>
<name>Tristan Van Berkom</name>
<email>tristan.vanberkom@codethink.co.uk</email>
</author>
<published>2020-04-24T09:12:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=d63bd7e9def528d3ed59a2798452ac1da58ebea4'/>
<id>d63bd7e9def528d3ed59a2798452ac1da58ebea4</id>
<content type='text'>
Plugin format versioning was decided to be removed for local
plugins and any plugins for which we do not load an explicitly
provided plugin. For pip, this will be handled with a standard
distutils/setuptools approach, allowing users to specify pip
style version boundaries in the plugin origins.

This patch refactors plugin loading so that all related code
goes into the private _pluginfactory module, a new small
PluginOrigin type was added to better manipulate loaded
origins.

Test cases have been removed and will be readded in a following
commit, adjusted to new expectations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Plugin format versioning was decided to be removed for local
plugins and any plugins for which we do not load an explicitly
provided plugin. For pip, this will be handled with a standard
distutils/setuptools approach, allowing users to specify pip
style version boundaries in the plugin origins.

This patch refactors plugin loading so that all related code
goes into the private _pluginfactory module, a new small
PluginOrigin type was added to better manipulate loaded
origins.

Test cases have been removed and will be readded in a following
commit, adjusted to new expectations.
</pre>
</div>
</content>
</entry>
</feed>
