[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Pkg-javascript-devel] Bug#1004658: Bug#1004658: Help to compile a wasm package



On 31/01/2022 19:23, Jonas Smedegaard wrote:
Quoting Jan Niehusmann (2022-01-31 18:01:58)
On Mon, Jan 31, 2022 at 05:29:23PM +0100, Geert Stappers wrote:
At https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004658#35
is adviced:

   source-map-mappings should be packaged separately,
   and then build-depended on from package node-source-map.

Would this really solve the issue?

No.

But it would shift the issue from being handled as some asset needed by
a NodeJS module, to being handled as the primary prupose of a Rust
library.


The artifact needed by node-source-map is a WASM binary of
source_map_mappings_wasm_api. What kind of deb package would provide
that file?

The description of source-map-mappings says:
"This is intended to be compiled to WebAssembly and eventually used from
the mozilla/source-map library. This is not a general purpose source
maps library."

It seems to be a integral part of node-source-map, and only
distributed separately because it's written in a different language.

So I wonder if a debian package of source-map-mappings would be useful
at all.

Is this a good reason to include it in the debian source package of
node-source-map?

It might arguably be sensible to package both projects together, if done
in a way that ensured that both parts were treated carefully
(Debian-specific compiler options applied, Debian-specific install paths
used, Debian-specific test tricks applied, etc.).

So maaaaybe if done by a maintainer knowledgeable on both NodeJS and
Rust and bold enough to invent some tooling to compete with pkg-js-tools
and debcargo (because at least debcargo is not fit for use outside the
Rust team).  Personally I do not recommend to reinvent CDBS...

...or that one single package could contain all the custom rules to
handle things correctly *without* custom tooling.  Then the maintainer
would need to keep track of what wisdom evolves in the related unused
tools and reimplement that for this one single package.

No need to do this, the only goal of source-map-mapping is to produce mapping.wasm which is then embedded in JS package (package isn't publish anywhere else). The job is done (see debian/rules), we just have to find the good dependencies and fix the build since built wasm isn't exactly what upstream embeds in node-source-map, maybe some unpublished work...


Reply to: