[libvirt PATCH] docs: Add go-import directive for module-aware packages

Andrea Bolognani posted 1 patch 2 years, 10 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210702122116.380267-1-abologna@redhat.com
docs/page.xsl | 6 ++++++
1 file changed, 6 insertions(+)
[libvirt PATCH] docs: Add go-import directive for module-aware packages
Posted by Andrea Bolognani 2 years, 10 months ago
This is how Go figures out the location of the git repository
containing the actual code for the package.

Addresses the following error message:

  go: libvirt.org/go/libvirt@v1.7005.0:
      unrecognized import path "libvirt.org/go/libvirt":
      parse https://libvirt.org/go/libvirt?go-get=1:
      no go-import meta tags ()

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 docs/page.xsl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/docs/page.xsl b/docs/page.xsl
index 5cb4322fdc..1786feb51f 100644
--- a/docs/page.xsl
+++ b/docs/page.xsl
@@ -105,6 +105,12 @@
         <xsl:if test="$pagesrc = 'docs/libvirt-go-xml.rst'">
           <meta name="go-import" content="libvirt.org/libvirt-go-xml git https://libvirt.org/git/libvirt-go-xml.git"/>
         </xsl:if>
+        <xsl:if test="$pagesrc = 'docs/go/libvirt.rst'">
+          <meta name="go-import" content="libvirt.org/go/libvirt git https://libvirt.org/git/libvirt-go-module.git"/>
+        </xsl:if>
+        <xsl:if test="$pagesrc = 'docs/go/libvirtxml.rst'">
+          <meta name="go-import" content="libvirt.org/go/libvirtxml git https://libvirt.org/git/libvirt-go-xml-module.git"/>
+        </xsl:if>
         <xsl:apply-templates select="/html:html/html:head/html:script" mode="content"/>
 
         <script type="text/javascript" src="{$href_base}js/main.js">
-- 
2.31.1

Re: [libvirt PATCH] docs: Add go-import directive for module-aware packages
Posted by Daniel P. Berrangé 2 years, 10 months ago
On Fri, Jul 02, 2021 at 02:21:16PM +0200, Andrea Bolognani wrote:
> This is how Go figures out the location of the git repository
> containing the actual code for the package.
> 
> Addresses the following error message:
> 
>   go: libvirt.org/go/libvirt@v1.7005.0:
>       unrecognized import path "libvirt.org/go/libvirt":
>       parse https://libvirt.org/go/libvirt?go-get=1:
>       no go-import meta tags ()
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  docs/page.xsl | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/docs/page.xsl b/docs/page.xsl
> index 5cb4322fdc..1786feb51f 100644
> --- a/docs/page.xsl
> +++ b/docs/page.xsl
> @@ -105,6 +105,12 @@
>          <xsl:if test="$pagesrc = 'docs/libvirt-go-xml.rst'">
>            <meta name="go-import" content="libvirt.org/libvirt-go-xml git https://libvirt.org/git/libvirt-go-xml.git"/>
>          </xsl:if>
> +        <xsl:if test="$pagesrc = 'docs/go/libvirt.rst'">
> +          <meta name="go-import" content="libvirt.org/go/libvirt git https://libvirt.org/git/libvirt-go-module.git"/>
> +        </xsl:if>
> +        <xsl:if test="$pagesrc = 'docs/go/libvirtxml.rst'">
> +          <meta name="go-import" content="libvirt.org/go/libvirtxml git https://libvirt.org/git/libvirt-go-xml-module.git"/>

We don't want to be using these git repos here. Please see this series

  https://listman.redhat.com/archives/libvir-list/2021-July/msg00034.html

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [libvirt PATCH] docs: Add go-import directive for module-aware packages
Posted by Andrea Bolognani 2 years, 10 months ago
On Fri, Jul 02, 2021 at 01:27:09PM +0100, Daniel P. Berrangé wrote:
> On Fri, Jul 02, 2021 at 02:21:16PM +0200, Andrea Bolognani wrote:
> > +        <xsl:if test="$pagesrc = 'docs/go/libvirt.rst'">
> > +          <meta name="go-import" content="libvirt.org/go/libvirt git https://libvirt.org/git/libvirt-go-module.git"/>
> > +        </xsl:if>
> > +        <xsl:if test="$pagesrc = 'docs/go/libvirtxml.rst'">
> > +          <meta name="go-import" content="libvirt.org/go/libvirtxml git https://libvirt.org/git/libvirt-go-xml-module.git"/>
>
> We don't want to be using these git repos here. Please see this series
>
>   https://listman.redhat.com/archives/libvir-list/2021-July/msg00034.html

I thought that too but I didn't want to rock the boat too much :)

I'll check out your series.

-- 
Andrea Bolognani / Red Hat / Virtualization