patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Alyssa Ross <hi@alyssa.is>
To: Demi Marie Obenour <demiobenour@gmail.com>
Cc: Spectrum OS Development <devel@spectrum-os.org>
Subject: Re: Duplicated VM start and shutdown code
Date: Fri, 10 Jul 2026 15:43:43 +0200	[thread overview]
Message-ID: <87qzlb9cz4.fsf@alyssa.is> (raw)
In-Reply-To: <ab908ddf-625d-461a-8985-9bfd66374a7c@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 926 bytes --]

Demi Marie Obenour <demiobenour@gmail.com> writes:

> I noticed that vm-import, run-appimage, and run-flatpak all have the
> same code to start a VM, and run-flatpak and run-appimage both have
> the same code to shut down a VM.  Is this intentional, or should it
> be replaced with common code?

Yes, it probably should.  But it is sort of intentional — sometimes I'm
not sure exactly which parts should be shared, so I leave code
duplicated for a while with the idea that it'll become more clear what
the common core should be over time.  (It usually works out.)  Without a
good understanding, it's easy to deduplicate too much, and end up with
something that isn't flexible enough down the line, and then it has to
be un-deduplicated again.  Happy for you to try deduplicating it if you
think you have a good idea of where to draw that line, but otherwise
it's also fine for it to stay duplicated for now.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

  reply	other threads:[~2026-07-10 13:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 21:04 Duplicated VM start and shutdown code Demi Marie Obenour
2026-07-10 13:43 ` Alyssa Ross [this message]
2026-07-10 17:27   ` Demi Marie Obenour
2026-07-13  9:02     ` Alyssa Ross
2026-07-13 14:44       ` Demi Marie Obenour

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=87qzlb9cz4.fsf@alyssa.is \
    --to=hi@alyssa.is \
    --cc=demiobenour@gmail.com \
    --cc=devel@spectrum-os.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock

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).