On 2023-11-09 at 10:18, Harald Judt wrote: > On 2023-11-09 at 09:43, Eli Zaretskii wrote:>> Date: Thu, 9 Nov 2023 09:00:11 > +0100 >>> Cc: emacs-devel@gnu.org >>> From: Harald Judt >>> >>>> The size limitation should have its default value dependent on whether >>>> the build is a 32-bit (which we still support) or 64-bit.  You can >>>> look at how we compute treesit-max-buffer-size, to figure out how to >>>> express the conditions for the default value. >>> >>> Yes, but I wonder, why do this? There can be 32-bit systems as well as 64-bit >>> systems that can have only 2GiB RAM, both might fail when trying to open a >>> file that has e.g. 1536MiB. Then, there might be both types of systems that >>> have 8gb of RAM that can open such files with no problems? >> >> If you are saying that we can do with a single value, I'm okay with >> that, provided that this value will be accepted by users.  32-bit >> systems cannot have buffers larger than 2 GiB, and a reasonable limit >> would be something like 500 MiB, I think.  This could be too low for >> users of 64-bit systems, but if it's okay, it's fine with me.  Your >> proposed default, 1 GiB, is too large for a typical 32-bit system, >> IMO. >> >>> Maybe it would be possible to make it dependent on the amount of RAM available >>> on the system? >> >> Ideally, yes, but in practice knowing how much is available is not >> that easy on a modern OS, so I don't think it's worth the hassle, >> especially in fallback code. > > I agree, 500M for 32-bit and 1G for 64-bit are good defaults for the > dired-duplicates use-case, I guess most typical systems will be able to handle > it. I will implement it this way. > > Harald Ok, I have pushed these changes and bumped the version to 0.2 and I hope that this time the package builds correctly on ELPA (the last time it failed though it loads and compiles on my machine). Where would I find that file dired-duplicates-build-failure.txt in the GNU ELPA archive web site? The output from the previous run was: ------------------------------------------------------------------------------- The build scripts failed to build the tarball for version 0.1 of the package dired-duplicates. You can consult the latest error output in the file "dired-duplicates-build-failure.txt" in the GNU ELPA archive web site. You can also try and reproduce the error locally as follows: git clone --single-branch https://git.sv.gnu.org/git/emacs/elpa.git cd elpa make # Setup the infrastructure make packages/dired-duplicates # Create a worktree of the package make build/dired-duplicates # Build the tarballs into archive(-devel)/ ## The current error output was the following: ======== Building tarball archive/dired-duplicates-0.1.tar... Build error for archive/dired-duplicates-0.1.tar: (error "Can't find main file home/elpa/elpa/packages/dired-duplicates/dired-duplicates.el file in /home/elpa/elpa/packages/dired-duplicates") ######## Build of package archive/dired-duplicates-0.1.tar FAILED!! --------------------------------------------------------------------------------- Harald -- `Experience is the best teacher.' PGP Key ID: 4FFFAB21B8580ABD Fingerprint: E073 6DD8 FF40 9CF2 0665 11D4 4FFF AB21 B858 0ABD