Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 894264 - A way to make dependency tarballs unnecessary in go-module.eclass.
Summary: A way to make dependency tarballs unnecessary in go-module.eclass.
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-14 01:55 UTC by amano.kenji
Modified: 2023-02-15 16:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description amano.kenji 2023-02-14 01:55:10 UTC
While you can, in practice, just create a git repository for each go program and put your dependency tarballs there, it's cumbersome.

I think there is a way to make dependency tarballs unnecessary in go-module.eclass without EGO_SUM in ebuild.

Raku and janet are fine languages for parsing go.sum. Thus, a helper for go-module.eclass can be written in raku or janet to parse go.sum and automatically generate tarball URIs for SRC_URI. The helper can also be called to extract the tarballs into a temporary vendor directory used by go-module.eclass.

It still requires bigger manifests, but does manifest size really matter unless it's too big?

How does anyone think of this?
Comment 1 William Hubbs gentoo-dev 2023-02-14 21:29:39 UTC
It sounds like you are proposing a replacement for get-ego-vendor and
most of the eclass code.

I could probably take get-ego-vendor further and have it generate values
for SRC_URI directly instead of using EGO_SUM.
This would do what you are proposing, but it still doesn't solve the
underlying issues.

The first issue is the size of the manifest.
Manifests can be multi-thousands of lines long in this setup, and that
has been sited as a problem by QA.

The more concerning issue is the size of SRC_URI.
SRC_URI can have thousands of entries, which will cause $A to be too big
to be exported to the environment. This will break portage.
Comment 2 amano.kenji 2023-02-15 13:29:04 UTC
Is there a third way?
Comment 3 William Hubbs gentoo-dev 2023-02-15 16:16:58 UTC
I don't know of one unfortunately.
The only thing I can come up with is if the package manager would allow
us to fetch the dependencies during the build as proposed in
bug #833567; however, as you can see by reading this bug, this doesn't look
like it is going to happen any time soon.
Comment 4 William Hubbs gentoo-dev 2023-02-15 16:18:44 UTC
If you come up with a proposal other than this, I would really like to
hear it, so feel free to let me know.

Thanks,

William