Opened 2 years ago

Closed 10 months ago

Last modified 9 months ago

#64052 closed enhancement (invalid)

py*-grpcio* @1.41.1_2: don't fetch from git

Reported by: cooljeanius (Eric Gallager) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: emcrisostomo (Enrico Maria Crisostomo), mascguy (Christopher Nielsen)
Port: grpc py37-grpcio py37-grpcio-tools py38-grpcio py38-grpcio-tools py39-grpcio py39-grpcio-tools

Description

The various grpcio ports all fetch from git, and that can take a really long time. It would be easier for end users if we could just have a tarball to download instead.

Change History (12)

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

The only reason why anyone would set a port to fetch from git is if a tarball were not available...

comment:2 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:3 in reply to:  1 Changed 2 years ago by cooljeanius (Eric Gallager)

Replying to ryandesign:

The only reason why anyone would set a port to fetch from git is if a tarball were not available...

There are actually tarballs available, though, under the "releases" tab. For example, here's the most recent one: https://github.com/grpc/grpc/releases/tag/v1.42.0

comment:4 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

There are no source code release tarballs there. "grpc_objective_c_plugin-1.42.0-macos-x86_64.zip" is a precompiled binary which we do not use. If you are referring to the two links "Source code (zip)" and "Source code (tar.gz)", those are automatically generated tarballs, which never contain git submodules. This project uses and requires the presence of submodules. This is one of the primary reasons why a port might fetch from git.

comment:5 in reply to:  4 Changed 2 years ago by cooljeanius (Eric Gallager)

Replying to ryandesign:

There are no source code release tarballs there. "grpc_objective_c_plugin-1.42.0-macos-x86_64.zip" is a precompiled binary which we do not use. If you are referring to the two links "Source code (zip)" and "Source code (tar.gz)", those are automatically generated tarballs, which never contain git submodules. This project uses and requires the presence of submodules. This is one of the primary reasons why a port might fetch from git.

Well ok, so if the port absolutely needs the submodules, aren't there at least some flags that could be passed to git to make the fetching go quicker? Like, I seem to remember that fetching the entire history of a git repository can take awhile, and that there's a flag to skip that...

comment:6 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Yes, it can be specified to fetch only the n most recent commits, or something. The inkscape-devel port for example does this by specifying a --depth to git.

comment:7 Changed 2 years ago by cooljeanius (Eric Gallager)

This also applies to the plain grpc port, too, btw... can someone add that to the "Port" field?

comment:8 in reply to:  7 Changed 2 years ago by mascguy (Christopher Nielsen)

Port: grpc added

Replying to cooljeanius:

This also applies to the plain grpc port, too, btw... can someone add that to the "Port" field?

Done

comment:9 Changed 10 months ago by mascguy (Christopher Nielsen)

Resolution: invalid
Status: newclosed

AFAIK, fetching from Git is a necessity, given the need to pull in submodules. (Per comment:4.) Closing.

comment:10 in reply to:  9 ; Changed 10 months ago by cooljeanius (Eric Gallager)

Replying to mascguy:

AFAIK, fetching from Git is a necessity, given the need to pull in submodules. (Per comment:4.) Closing.

Why not at least pass the --depth flag to git, as per comment:6?

comment:11 in reply to:  10 ; Changed 10 months ago by mascguy (Christopher Nielsen)

Replying to cooljeanius:

Why not at least pass the --depth flag to git, as per comment:6?

Testing locally on my machine, using --depth=1 for the submodules results in negligible performance gains. (A few seconds at most.) The majority of the fetch time relates to grpc itself.

Feel free to test yourself. But not much we can do.

comment:12 in reply to:  11 Changed 9 months ago by cooljeanius (Eric Gallager)

Replying to mascguy:

Replying to cooljeanius:

Why not at least pass the --depth flag to git, as per comment:6?

Testing locally on my machine, using --depth=1 for the submodules results in negligible performance gains. (A few seconds at most.)

I think the few extra seconds would be a worthwhile gain.

Note: See TracTickets for help on using tickets.