gtristan commented on code in PR #87:
URL:
https://github.com/apache/buildstream-plugins/pull/87#discussion_r2072330019
##########
src/buildstream_plugins/sources/bzr.py:
##########
@@ -53,17 +53,37 @@
# revision number to the one on the tip of the branch specified in 'track'.
ref: 6622
+ # Specify the version to be reported as the *guess_version* when reporting
+ # SourceInfo
+ #
+ # Since 2.5
+ #
+ version: 1.2
+
See `built-in functionality doumentation
<https://docs.buildstream.build/master/buildstream.source.html#core-source-builtins>`_
for
details on common configuration options for sources.
+
+
+Reporting `SourceInfo
<https://docs.buildstream.build/master/buildstream.source.html#buildstream.source.SourceInfo>`_
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The bzr source reports the URL of the bzr repository as the *url*.
+
+Further, the bzr source reports the ``SourceInfoMedium.BZR`` *medium* and
+the ``SourceVersionType.COMMIT`` *version_type*, for which it reports the bzr
revision
+number as the *version*.
+
+Since the bzr source does not have a way to know what the release version
+corresponds to the revision number, the bzr source exposes the ``version``
configuration
+attribute to allow explicit specification of the *guess_version*.
"""
import os
import shutil
import fcntl
from contextlib import contextmanager
-from buildstream import Source, SourceError
+from buildstream import Source, SourceError, SourceInfoMedium,
SourceVersionType
Review Comment:
Oops, this is a great insight thanks ;-)
Firstly, I don't want to support older versions of buildstream in
buildstream-plugins. Especially given the API stable aspect of
buildstream-plugins, a policy for supporting older buildstream versions is not
called for.
Secondly, what needs to happen here is actually all the plugins using newer
APIs need to have `Plugin.BST_MIN_VERSION` updated so that they report a useful
user-facing error at startup.
This is a little tricky however since it will cause the plugins CI to break
in advance of a 2.5 version.
I think the answer for this is that we tag `2.5.0.dev0` in buildstream
first... I will try this out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]