Skip to contentSkip to conversation

Add missing parts to Go language changes

PATCH Applied [email protected] 2 participants 6 messages Apr 5, 2024

lore
Share & tools
lore
#0 lore raw

cover Add missing parts to Go language changes

From: Joao Marcos Costa <[email protected]>

Hello,

I am (re)sending the patches that needed some rework, but not as a v2 since some patches from the previous series were already merged. Plus, a new patch to document the go-vendor class in ref-manual/classes.rst was included.

Best regards,

Joao Marcos Costa (3):
classes: document new go-vendor class
release-notes: add changes to Go language
migration: add Go language changes

 documentation/migration-guides/migration-5.0.rst    |  4 ++++
 .../migration-guides/release-notes-5.0.rst          |  4 ++++
 documentation/ref-manual/classes.rst                | 13 +++++++++++++
 3 files changed, 21 insertions(+)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/3 classes: document new go-vendor class

From: Joao Marcos Costa <[email protected]>

A reference to this class in the release notes will be added in a follow-up commit.

---
 documentation/ref-manual/classes.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)
documentation/ref-manual/classes.rst +13 -0
index 8612128f7..272df0dfb 100644
@@ -939,6 +939,19 @@ The :ref:`ref-classes-go-mod` class allows to use Go modules, and inherits the
 
 See the associated :term:`GO_WORKDIR` variable.
 
+.. _ref-classes-go-vendor:
+
+``go-vendor``
+=============
+
+The :ref:`ref-classes-go-vendor` class implements support to offline builds,
+also known as Go vendoring. In such scenario, the module dependencias are
+downloaded during fetch task rather than when modules are imported, thus being
+coherent with Yocto's concept of fetching every source beforehand.
+
+The dependencies are unpacked into the modules' ``vendor`` directory, where a
+manifest file is generated.
+
 .. _ref-classes-gobject-introspection:
 
 ``gobject-introspection``
Signature · 1 line
2.43.0
Reviewed-by on v1 1/3 Applied
#2 lore raw

Re: [PATCH v1 1/3] classes: document new go-vendor class

Hi João,

Thanks for the updates!
See my edits below...

Quoted 15 lines · On 4/5/24 at 12:03, [email protected] wrote:

From: Joao Marcos Costa <[email protected]>

A reference to this class in the release notes will be added in a follow-up commit.

---
  documentation/ref-manual/classes.rst | 13 +++++++++++++
  1 file changed, 13 insertions(+)
documentation/ref-manual/classes.rst +0 -0
index 8612128f7..272df0dfb 100644

documentation/ref-manual/classes.rst The :ref:`ref-classes-go-mod` class allows to use Go modules, and inherits the · line 947

Quoted 9 lines
documentation/ref-manual/classes.rst +6 -0
@@ -939,6 +939,19 @@ The :ref:`ref-classes-go-mod` class allows to use Go modules, and inherits the
 
  See the associated :term:`GO_WORKDIR` variable.
 
+.. _ref-classes-go-vendor:
+
+``go-vendor``
+=============
+
+The :ref:`ref-classes-go-vendor` class implements support to offline builds,

s/support to/support for/

documentation/ref-manual/classes.rst The :ref:`ref-classes-go-mod` class allows to use Go modules, and inherits the · line 948

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+also known as Go vendoring. In such scenario, the module dependencias are

s/such/such a/

documentation/ref-manual/classes.rst The :ref:`ref-classes-go-mod` class allows to use Go modules, and inherits the · line 949

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+downloaded during fetch task rather than when modules are imported, thus bein

s/fetch task/the :ref:ref-tasks-fetch task/ Yes, we also have references to tasks :)

documentation/ref-manual/classes.rst The :ref:`ref-classes-go-mod` class allows to use Go modules, and inherits the · line 957

Quoted 9 lines

g

documentation/ref-manual/classes.rst +5 -0
+coherent with Yocto's concept of fetching every source beforehand.
+
+The dependencies are unpacked into the modules' ``vendor`` directory, where a
+manifest file is generated.
+
  .. _ref-classes-gobject-introspection:
 
  ``gobject-introspection``

I fixed all these by myself. Nothing to do on your side.

Merged into "master-next"
Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 2/3 release-notes: add changes to Go language

In reply to [email protected]

From: Joao Marcos Costa <[email protected]>

Mention the new class 'go-vendor' in 'Miscellaneous changes'.

---
 documentation/migration-guides/release-notes-5.0.rst | 4 ++++
 1 file changed, 4 insertions(+)
documentation/migration-guides/release-notes-5.0.rst +4 -0
index fa18afe39..8df95ca21 100644
@@ -64,6 +64,10 @@ New Features / Enhancements in 5.0
    -  ``systemd-boot`` can, from now on, be compiled as ``native``, thus
       providing ``ukify`` tool to build UKI images.
 
+   -  The :ref:`ref-classes-go-vendor` class was added to support offline builds
+      (i.e., vendoring). It can also handle modules from the same repository,
+      taking into account their versions.
+
 Known Issues in 5.0
 ~~~~~~~~~~~~~~~~~~~
 
Signature · 1 line
2.43.0
#4 lore raw

PATCH 3/3 migration: add Go language changes

In reply to [email protected]

From: Joao Marcos Costa <[email protected]>

---
 documentation/migration-guides/migration-5.0.rst | 4 ++++
 1 file changed, 4 insertions(+)
documentation/migration-guides/migration-5.0.rst +4 -0
index a9075c298..902cc11bf 100644
@@ -52,6 +52,10 @@ See :ref:`all supported distributions <system-requirements-supported-distros>`.
 Go language changes
 ~~~~~~~~~~~~~~~~~~~
 
+The ``linkmode`` flag was dropped from ``GO_LDFLAGS`` for ``nativesdk`` and
+``cross-canadian``. Also, dynamic linking was disabled for the whole set of
+(previously) supported architectures in the ``goarch`` class.
+
 .. _migration-5.0-systemd-changes:
 
 systemd changes
Signature · 1 line
2.43.0
Reviewed-by on the v1 series Applied
#5 lore raw
In reply to [email protected]

Hello João,

Quoted 15 lines · On 4/5/24 at 12:03, [email protected] wrote:

From: Joao Marcos Costa <[email protected]>

Hello,

I am (re)sending the patches that needed some rework, but not as a v2 since some patches from the previous series were already merged. Plus, a new patch to document the go-vendor class in ref-manual/classes.rst was included.

Best regards,

Joao Marcos Costa (3):
classes: document new go-vendor class
release-notes: add changes to Go language
migration: add Go language changes

Quoted 4 lines
  documentation/migration-guides/migration-5.0.rst    |  4 ++++
  .../migration-guides/release-notes-5.0.rst          |  4 ++++
  documentation/ref-manual/classes.rst                | 13 +++++++++++++
  3 files changed, 21 insertions(+)

For all patches:

Merged into master-next
Thanks
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com