Received: from st43p00im-ztfb10063301.me.com (st43p00im-ztfb10063301.me.com [17.58.63.179]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id B2D7B782C73 for <~alpine/devel@lists.alpinelinux.org>; Mon, 1 Jun 2020 12:12:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1591013559; bh=fdOuAhl8zBM1fZu/94N0PmsEMchDSlLhBc8xvxe5+9U=; h=Content-Type:Subject:From:Date:Message-Id:To; b=R5hAI72mQgnGg1Nb7BX9GGq26XNzGAMsQnopuqGOjERDY8RwVlRI1m66mr0Owq5PM 6WJpxm4kj4HUZj9SDBu+lccHAwx//OM6VZOqnecw+ZDdtgUF/12lwoMw4mIfGJ7cM2 k8v8lzS1XHNJRhCFcfn1/XnjQNi1LU0qVs3Y3FnLxvmlv8i2fSJAUkcK+yg8kHX9oI sd7f2LSwNjKXDCSPcaiRw1Gq0WtZYRozAJKLyMorThqixk8quUOPuNPxyd/M+s5OG5 ToO5Pdfrvv0BEQ7Vu2jb6BW/w1Z61JgkWgXo7gmuW/yr1h/bR2BGjySFLaMcLDNrbX 4+IKmI90pA5Xw== Received: from [IPv6:2a01:4c8:c42:9065:ddf2:9be:151f:feb] (unknown [213.205.192.93]) by st43p00im-ztfb10063301.me.com (Postfix) with ESMTPSA id 74500A409FC; Mon, 1 Jun 2020 12:12:39 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Subject: Re: Line length for APKBUILD files From: Duncan Bellamy In-Reply-To: <47b50ae0b2e30e316927c7b3b0e29ac5e900e867.camel@cogitri.dev> Cc: Alpine develmopment <~alpine/devel@lists.alpinelinux.org> Date: Mon, 1 Jun 2020 13:12:36 +0100 Message-Id: <487CCA80-4621-41A4-B9C2-08C05A139B3B@me.com> References: <47b50ae0b2e30e316927c7b3b0e29ac5e900e867.camel@cogitri.dev> To: Rasmus Thomsen X-Mailer: iPad Mail (17F75) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-06-01_10:2020-06-01,2020-06-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2002250000 definitions=main-2006010092 Hi > On 1 Jun 2020, at 11:33, Rasmus Thomsen wrote: >=20 > =EF=BB=BFHello, >=20 >>>> On Mon, 2020-06-01 at 11:23 +0100, Duncan Bellamy wrote: >> Hi, >> I read Linus Torvalds is going to stop enforcing line lengths in >> kernel patches to increase readability. >=20 > FWIW, I don't think that kernel QA will stop enforcing line lengths, > just that the maximum character count per line will be increased. Many > have suggested ~120 lines per line to be a good compromise between > readability and being too restrictive. >=20 >> Is it something Alpine has considered doing? >> I think lines like the blocks with: >> install -dm 750 -o PKGUSER -g PKGGRP \ >> var/lib/ $pkgname >> Would be easier to read if they were on one line (per install) >=20 > Hm, that depends on the situation. In some cases linebreaks can make > reading things easier, even if linebreaks are enabled in the editor. > For example in the rust APKBUILD we have the following construct: >=20 > ./configure \ > --build=3D"$_build" \ > --host=3D"$_target" \ > --target=3D"$_target" \ > --prefix=3D"/usr" \ > --release-channel=3D"stable" \ > --enable-local-rust \ > --local-rust-root=3D"/usr" \ > --llvm-root=3D"/usr/lib/llvm$_llvmver" \ > --disable-docs \ > --enable-extended \ > --tools=3D"analysis,cargo,src" \ > --enable-llvm-link-shared \ > --enable-option-checking \ > --enable-locked-deps \ > --enable-vendor \ > --python=3D"$_python" \ > --set=3D"rust.musl-root=3D/usr" \ > --set=3D"target.$_target.llvm- > config=3D/usr/lib/llvm$_llvmver/bin/llvm-config" \ > --set=3D"target.$_build.musl-root=3D/usr" \ > --set=3D"target.$_build.crt-static=3Dfalse" >=20 > The indention makes it immediately obvious where each configuration > option begins and ends. Without it it's kind of a pain to read: >=20 > ./configure --build=3D"$_build" --host=3D"$_target" --target=3D"$_target" -= - > prefix=3D"/usr" --release-channel=3D"stable" --enable-local-rust --local- > rust-root=3D"/usr" --llvm-root=3D"/usr/lib/llvm$_llvmver" --disable-docs -= - > enable-extended --tools=3D"analysis,cargo,src" --enable-llvm-link-shared > --enable-option-checking --enable-locked-deps --enable-vendor -- > python=3D"$_python" --set=3D"rust.musl-root=3D/usr" -- > set=3D"target.$_target.llvm-config=3D/usr/lib/llvm$_llvmver/bin/llvm- > config" --set=3D"target.$_build.musl-root=3D/usr" -- > set=3D"target.$_build.crt-static=3Dfalse" Yes the configure is definitely more readable on separate lines >=20 > Even if your mail client has linebreaks enabled, this is nowhere as > nice to read as the previous version with linebreaks. As such I think > that linebreaks still make sense for command invocations, since they > can carry semantic meaning. >=20 > However, for things like makedepends, I think it'd be fine to stop > enforcing the character limit. The indention in that doesn't really > carry semantic meaning, nor does it make reading the list much easier > compared to your text editor doing automatic linebreaks. I'm not sure > if lifting that restriction makes sense though - maybe that > inconsistency would only confuse contributors. Yes it could be more confusing if some files are formatted one way and other= s another. >=20 > Regards, >=20 > Rasmus >=20 >> Duncan Regards, Duncan=