<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<font face="Ubuntu">There was a question on AskUbuntu today [0]
about rapid iteration on snaps, avoiding the squashfs compression
and remounting.</font><br>
<br>
As Daniel answered, this is what 'snap try' is for.<br>
<br>
A snap is a filesystem that is mounted so it looks like a directory
with all of the app files (and dependencies etc) underneath a single
directory. 'snap try' lets you actually use a normal directory as a
snap. So you make a directory, put all the bits in that directory,
then 'try' it. Now you can edit the snap directly just by changing
things in that directory, live, and see the immediate consequences
of those changes.<br>
<br>
I wonder if we shouldn't have a "sample snap" directory which
snapcraft can create, to walk people through this?<br>
<br>
Something like:<br>
<br>
$ snapcraft try-example<br>
Unpacking into ./try-example/ ... Now you can 'snap try
./try-example'<br>
<br>
After the 'snap try' command, the directory is mounted as a snap.<br>
You can edit the contents of the try-example/ directory to
live-edit the<br>
try-example snap. Start with 'snap list' and the 'try-example'
command.<br>
<br>
I think all we need is a patch to snapcraft which includes the
try-example<br>
snap contents and that error message, and some checking to make sure
we can<br>
write the directory and are not over-writing a directory.<br>
<br>
Thoughts? Anybody want to have a go at that?<br>
<br>
NB there is currently a bug in snapd if you *remove* the directory
while 'try'ing it, to be fixed in the next release.<br>
<br>
Mark<br>
<br>
[0]
<a class="moz-txt-link-freetext" href="http://askubuntu.com/questions/795882/how-can-i-iterate-more-quickly-when-creating-a-snap">http://askubuntu.com/questions/795882/how-can-i-iterate-more-quickly-when-creating-a-snap</a><br>
</body>
</html>