From: Alyssa Ross <hi@alyssa.is>
To: Ville Ilvonen <ville.ilvonen@unikie.com>
Cc: Paco <paco@ecomail.io>, discuss@spectrum-os.org
Subject: Re: Documentation and diagrams
Date: Wed, 18 May 2022 12:53:53 +0000 [thread overview]
Message-ID: <20220518125353.cw4faxgab22r2jr5@eve> (raw)
In-Reply-To: <CAP-nJwHG_LVfioskKKOXWa7AheQAF2wf6roi4hJpo+Dt3RHmbg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3227 bytes --]
On Wed, May 18, 2022 at 03:44:45PM +0300, Ville Ilvonen wrote:
> On Tue, May 17, 2022 at 10:00 PM Paco <paco@ecomail.io> wrote:
> >
> > Hi all,
> >
> > > One question about draw.io: is there a tool we could use in the build
> > > process of our documentation to render the .drawio files to SVG, so we
> > > don't have to check in the SVG files?
> >
> > drawio supports being called on the command-line like this:
> >
> > drawio in.drawio --export --output out.png # or svg
>
> Yes, and no. Yes, command line but no in a headless environment.
> It was easy to test this before "jekyll build" with "drawio in.drawio
> --export --output test.svg"
>
> However,
>
> [vilvo@blop:~/dev/spectrum/Documentation]$ nix-build -I
> nixpkgs=../../nixpkgs-spectrum
> ...
> error: builder for
> '/nix/store/r8xf2kpba673ngi2fck4xsyvyc6pd3j1-spectrum-docs.drv' failed
> with exit code 133;
> last 10 log lines:
> > at new ElectronStore
> (/nix/store/iqinmbk2jzl8nay42hqkbd32mbj1jzq7-drawio-18.0.6/share/drawio/resources/app.asar/node_modules/electron-store/index.js:48:32)
> > at Object.<anonymous>
> (/nix/store/iqinmbk2jzl8nay42hqkbd32mbj1jzq7-drawio-18.0.6/share/drawio/resources/app.asar/electron.js:15:15)
> > at Module._compile (node:internal/modules/cjs/loader:1116:14)
> > at Object.Module._extensions..js
> (node:internal/modules/cjs/loader:1169:10)
> > at Module.load (node:internal/modules/cjs/loader:988:32)
> > at Module._load (node:internal/modules/cjs/loader:829:12)
> > at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
> > at Object.<anonymous> (node:electron/js2c/browser_init:185:3104)
> > at Object../lib/browser/init.ts
> (node:electron/js2c/browser_init:185:3308)
> > /build/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90:
> line 1: 5 Trace/breakpoint trap (core dumped) drawio in.drawio
> --export --output test.svg
>
> Issue is the same with drawio versions:
> - version 15.7.3 from nixpkgs
> - version 17.4.2 from nixpkgs-spectrum
> - latest rpm available - 18.0.6 from updated nixpkgs-spectrum
Does it maybe require an X server / Wayland compositor to talk to? That
would be a pain to do in the build but maybe not impossible. I know
there are programs for dummy compositors out there but don't know how
easy they are to use.
> > but it's a huge dependency, as it's an Electron app, installing it
> > requires ~400 MB…
>
> This could be managed with caching but that's not the issue.
>
> People seem to have worked around the issue in CI with solutions like
> https://hub.docker.com/r/tomkludy/drawio-renderer
>
> I did not test it yet but would this be ok for a CI pipeline?
If we can get it running in a Nix build, I don't think closure size will
be an issue. If the size becomes an issue in future, we could try
running the rendering code without Electron, by running the browser
version in whatever the modern equivalent of PhantomJS is, or just
trying to extract the renderer code and run it in Node directly.
But if we can get the Electron version running, it should be fine to use
that.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-05-18 12:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 5:52 Documentation and diagrams ville.ilvonen
2022-05-17 11:42 ` Mark Stosberg
2022-05-17 12:25 ` Alyssa Ross
2022-05-17 19:00 ` Paco
2022-05-18 12:44 ` Ville Ilvonen
2022-05-18 12:53 ` Alyssa Ross [this message]
2022-05-18 13:11 ` Alyssa Ross
2022-05-19 7:25 ` Ville Ilvonen
2022-05-19 7:35 ` Alyssa Ross
2022-05-19 8:33 ` Ville Ilvonen
2022-05-19 8:49 ` Alyssa Ross
2022-05-18 13:09 ` Michael Raskin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220518125353.cw4faxgab22r2jr5@eve \
--to=hi@alyssa.is \
--cc=discuss@spectrum-os.org \
--cc=paco@ecomail.io \
--cc=ville.ilvonen@unikie.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).