Bug#1068932: bookworm-pu: package node-v8-compile-cache/2.3.0-3+deb12u1

2024-06-16 Thread Adam D. Barratt
On Sat, 2024-04-13 at 18:01 +0200, Jérémy Lal wrote:
> FTBFS because of test failures, see #1068921
> These are regressions caused by nodejs 18.19.0+dfsg-6~deb12u1

For the record, the metadata on that bug is confus{ed,ing} - it claims
to be about a bug in the bookworm version of node-v8-compile-cache, but
is filed against the version of the package in unstable/testing.

Regards,

Adam



Bug#1068932: bookworm-pu: package node-v8-compile-cache/2.3.0-3+deb12u1

2024-06-15 Thread Jonathan Wiltshire
Control: tag -1 confirmed

On Sat, Apr 13, 2024 at 06:01:37PM +0200, Jérémy Lal wrote:
> [ Reason ]
> FTBFS because of test failures, see #1068921
> These are regressions caused by nodejs 18.19.0+dfsg-6~deb12u1

Please go ahead.

Thanks,


-- 
Jonathan Wiltshire  j...@debian.org
Debian Developer http://people.debian.org/~jmw

4096R: 0xD3524C51 / 0A55 B7C5 1223 3942 86EC  74C3 5394 479D D352 4C51
ed25519/0x196418AAEB74C8A1: CA619D65A72A7BADFC96D280196418AAEB74C8A1



Processed: Re: Bug#1068932: bookworm-pu: package node-v8-compile-cache/2.3.0-3+deb12u1

2024-06-15 Thread Debian Bug Tracking System
Processing control commands:

> tag -1 confirmed
Bug #1068932 [release.debian.org] bookworm-pu: package 
node-v8-compile-cache/2.3.0-3+deb12u1
Added tag(s) confirmed.

-- 
1068932: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068932
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#1068932: bookworm-pu: package node-v8-compile-cache/2.3.0-3+deb12u1

2024-04-13 Thread Jérémy Lal
Package: release.debian.org
Severity: normal
Tags: bookworm
X-Debbugs-Cc: node-v8-compile-ca...@packages.debian.org, Debian Javascript 
Maintainers 
Control: affects -1 + src:node-v8-compile-cache
User: release.debian@packages.debian.org
Usertags: pu

[ Reason ]
FTBFS because of test failures, see #1068921
These are regressions caused by nodejs 18.19.0+dfsg-6~deb12u1

[ Impact ]
Only FTBFS

[ Tests ]
The tests are fixed, not skipped, so they will pass with
nodejs 18.19.0+dfsg-6~deb12u1 and node-undici 
5.15.0+dfsg1+~cs20.10.9.3-1+deb12u4

[ Risks ]
Close to none

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
One patch that fixes the tests, consists of two commits cherr-picked,
and a small rewrite to allow the test to pass with nodejs 18.13 and 18.19.
diff -Nru node-v8-compile-cache-2.3.0/debian/changelog 
node-v8-compile-cache-2.3.0/debian/changelog
--- node-v8-compile-cache-2.3.0/debian/changelog2022-11-22 
13:06:02.0 +0100
+++ node-v8-compile-cache-2.3.0/debian/changelog2024-04-13 
17:52:45.0 +0200
@@ -1,3 +1,11 @@
+node-v8-compile-cache (2.3.0-3+deb12u1) UNRELEASED; urgency=medium
+
+  * Upload to bookworm-p-u
+  * patch: NativeCompileCache-test for Node 18.13 and 18.19
+and fix test mock. Closes: #1068921
+
+ -- Jérémy Lal   Sat, 13 Apr 2024 17:52:45 +0200
+
 node-v8-compile-cache (2.3.0-3) unstable; urgency=medium
 
   [ Debian Janitor ]
diff -Nru node-v8-compile-cache-2.3.0/debian/gbp.conf 
node-v8-compile-cache-2.3.0/debian/gbp.conf
--- node-v8-compile-cache-2.3.0/debian/gbp.conf 2022-11-22 13:06:02.0 
+0100
+++ node-v8-compile-cache-2.3.0/debian/gbp.conf 2024-04-13 15:00:41.0 
+0200
@@ -1,4 +1,5 @@
 [DEFAULT]
+debian-branch = debian/bookworm
 pristine-tar = True
 
 [import-orig]
diff -Nru 
node-v8-compile-cache-2.3.0/debian/patches/native-compile-cache-test.patch 
node-v8-compile-cache-2.3.0/debian/patches/native-compile-cache-test.patch
--- node-v8-compile-cache-2.3.0/debian/patches/native-compile-cache-test.patch  
1970-01-01 01:00:00.0 +0100
+++ node-v8-compile-cache-2.3.0/debian/patches/native-compile-cache-test.patch  
2024-04-13 17:51:42.0 +0200
@@ -0,0 +1,42 @@
+Description: fix this test to pass on nodejs 18.13 and 18.19
+Author: Jérémy Lal 
+Last-Update: 2024-04-13
+Forwarded: https://github.com/zertosh/v8-compile-cache/pull/49
+Origin: 
https://github.com/zertosh/v8-compile-cache/commit/de822a607c9dbe7cfc826a44c67fc5f82b03c9ca
+--- a/test/NativeCompileCache-test.js
 b/test/NativeCompileCache-test.js
+@@ -85,12 +85,14 @@
+ tap.test('deletes previously cached code when the cache is an invalid file', 
t => {
+   fakeCacheStore.has = () => true;
+   fakeCacheStore.get = () => Buffer.from('an invalid cache');
+-  let deleteWasCalledWith = null;
+-  fakeCacheStore.delete = arg => { deleteWasCalledWith = arg; };
++  let wasCalledWith = null;
++  fakeCacheStore.set = arg => { wasCalledWith = arg; };
++  // older v8 still calls delete, though
++  fakeCacheStore.delete = arg => { wasCalledWith = arg; };
+ 
+   const fn3 = require('./fixtures/file-3');
+ 
+-  t.equal(deleteWasCalledWith, require.resolve('./fixtures/file-3'));
++  t.equal(wasCalledWith, require.resolve('./fixtures/file-3'));
+   t.equal(fn3(), 3);
+ 
+   t.end();
+--- a/test/FileSystemBlobStore-mock.js
 b/test/FileSystemBlobStore-mock.js
+@@ -20,7 +20,14 @@
+   }
+ 
+   set(key, invalidationKey, buffer) {
++const entry = this._cachedFiles.find(
++  file => file.key === key && file.invalidationKey === invalidationKey
++);
++if (entry == null) {
+ this._cachedFiles.push({key, invalidationKey, buffer});
++} else {
++  entry.buffer = buffer;
++}
+ return buffer;
+   }
+ 
diff -Nru node-v8-compile-cache-2.3.0/debian/patches/series 
node-v8-compile-cache-2.3.0/debian/patches/series
--- node-v8-compile-cache-2.3.0/debian/patches/series   2022-11-22 
13:06:02.0 +0100
+++ node-v8-compile-cache-2.3.0/debian/patches/series   2024-04-13 
15:00:41.0 +0200
@@ -1 +1,2 @@
 latest-tap.patch
+native-compile-cache-test.patch