Re: dns/bind916 builds rust unexpectedly

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Tue, 26 Sep 2023 21:32:20 UTC
On Tue, 26 Sep 2023 22:03:18 +0200
Thierry Thomas <thierry@freebsd.org> wrote:

> Le mar. 26 sept. 23 à  9:44:51 +0200, Guido Falsi <madpilot@FreeBSD.org>
>  écrivait :
> 
> > Actually it's much worse than that. It's not only rust per se.
> > 
> > My poudriere machine rarely can do a build run without rebuilding one or
> > more of rust, some version of clang, some version of gcc, qt[56]-webengine,
> > py-qt6 (this one does most of the work single threaded unluckily). Also it
> > often ends up having to rebuild firefox and thinderbird (these two heavily
> > use rust, and get little speed up from ccache), libreoffice (this one at
> > least get a very strong speed up thanks to ccache) etc.
> 
> This is true, but rust is very heavy, and it seems to be updated quiet
> frequently.
> 
> Just an idea: maybe it could be possible to repocopy lang/rust to e.g.
> lang/rust-devel (we already have rust-nightly), lang/rust being a stable
> release, used to compile the depending ports, and rust-devel being used
> by rust developers and updated more frequently.
> 
> I do not know if these ports would be installed at the same place, with
> CONFLICTS_INSTALL, or if would be better to install the -devel port
> with some suffix? [rust@FreeBSD.org added to Cc:]
> -- 
> Th. Thomas.

There is lang/rust-nightly [1] [2], which may be the -devel version.
IIRC, this is not so frequently updated. currently, the latest update
was to 1.72.0.20230612 at Jun.20, 2023, while lang/rust 1.72.0 landed
at Sep.08, 2023.

The problem, I think, is that all BUILD_DEPEND'ed ports are basically
bumped when lang/rust is updated.

I'm not at all a rust developer nor porter, but if possible, files
causing the rebuild (would be statically linked files like crt0.o in C)
would be better splitted into individual port(s) and updated only when
its source code is updated (and, if applicable, the behaviour of
resulting binary is ACTUALLY changed WITH BACKWARD-INCOMPATIBLE WAY by
rust code generator or optimizer) and all rust[-nightly] consumers
LIB_DEPEND to them.


[1] https://cgit.freebsd.org/ports/tree/lang/rust-nightly

[2] https://www.freshports.org/lang/rust-nightly/

-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>