<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>emre şahin's digital garden 🍃 - debug</title>
    <link>https://emresahin.net/tags/debug/</link>
    <description>Posts in the debug tag</description>
    <language>en</language>
    <managingEditor>contact@emresahin.net (Emre Şahin)</managingEditor>
    <lastBuildDate>Tue, 15 Sep 2026 19:46:32 +0000</lastBuildDate>
    <atom:link href="https://emresahin.net/tags/debug/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>devlog 4</title>
      <published>2024-06-05T10:04:54+00:00</published>
      <updated>2024-06-05T10:04:54+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Wed, 05 Jun 2024 10:04:54 +0000</pubDate>
      <link>https://emresahin.net/devlog-4/</link>
      <guid isPermaLink="true">https://emresahin.net/devlog-4/</guid>
      <description>Let’s start by looking at the debug output issue. We can start by replacing the eprintln! macros with println! , perhaps. I replaced the eprintln! s with println! , but it didn’t make any difference. Maybe we should remove those statements completely. I can’t really find the place that kills the ...</description>
      <category>devlog</category>
      <category>xvc</category>
      <category>xvc storage</category>
      <category>python</category>
      <category>clap</category>
      <category>debug</category>
      <category>rust</category>
      <category>s3</category>
      <category>cli</category>
      <content:encoded><![CDATA[<p>Let’s start by looking at the debug output issue. We can start by replacing the <code>eprintln!</code> macros with <code>println!</code>, perhaps.</p>
<p>I replaced the <code>eprintln!</code>s with <code>println!</code>, but it didn’t make any difference. Maybe we should remove those statements completely.</p>
<p>I can’t really find the place that kills the kernel. The last command to run is <code>xvc file list</code>:</p>
<pre><code class="language-python">print(xvc_test_data.file().list("test-data/dir-0002"))
</code></pre>
<p>and the output it produces is:</p>
<pre><code>[src/output.rs:144:13] &amp;output_str = "SS         131 2024-06-05 08:57:11 41e16be7          test-data/dir-0002/file-0003.bin\nSS         131 2024-06-05 08:57:11 27f0
efd0          test-data/dir-0002/file-0002.bin\nSS         131 2024-06-05 08:57:11 66de5084          test-data/dir-0002/file-0001.bin\nTotal #: 3 Workspace Size:
      393 Cached Size:        6006\n"
</code></pre>
<p><code>print</code> may be causing the crash, but the more likely cause is the command that comes after this:</p>
<pre><code>!ls -l test-data/dir-0001/
</code></pre>
<p>I replaced this with <code>lsd</code>, which also failed. Maybe it’s actually a Python crash or bug.</p>
<p>The way to understand is to create a notebook file with only that cell and try to run it.</p>
<p>The <code>ls</code> line runs fine with a new notebook. It even runs on the <code>README</code> file when run at the beginning. The line that makes the kernel crash is:</p>
<pre><code class="language-python">xvc_test_data.storage().new_s3(name="backup", bucket_name="xvc-test", region="eu-central-1", storage_prefix="xvc-storage")
</code></pre>
<p>We can start by removing the <code>new_s3</code> part.</p>
<p>The <code>storage()</code> method runs fine. It returns an <code>XvcStorage()</code> object, as it should.</p>
<p>When I run <code>storage().list()</code>, it takes a very long time. The bug is likely related to <code>storage()</code>.</p>
<p>It looks like the <code>storage</code> object was adding <code>file</code> instead of <code>storage</code> as a subcommand. I’ve fixed it now.</p>
<p>That was the bug. The <code>README</code> notebook now creates the S3 storage.</p>
<p>What was the reason behind this?</p>
<p>Parsing the CLI to the <code>XvcCLI</code> object was perhaps the culprit. Let’s look at it more clearly.</p>
<p>Let’s try <code>xvc file new s3</code> as a command to see how it behaves.</p>
<p>It says <em>unrecognized subcommand</em> for <code>new</code>.</p>
<p>This is how it should be, but I wonder why it doesn’t work for the <code>XvcCLI</code> parser.</p>
<p>Anyway, it’s already 13:00, so let’s stop here for today.</p>]]></content:encoded>
    </item>
    <item>
      <title>Xvc Devlog</title>
      <published>2022-10-27T11:13:00+00:00</published>
      <updated>2022-10-27T11:13:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Thu, 27 Oct 2022 11:13:00 +0000</pubDate>
      <link>https://emresahin.net/xvc-devlog/</link>
      <guid isPermaLink="true">https://emresahin.net/xvc-devlog/</guid>
      <description>I’ll start a new series to record my Xvc development progress. I think it’s nice to have a dialogue between 🐢 and 🐇 to explain the decisions and progress. These will be published on my personal blog for now. In the future, we can have a dedicated blog for this. 🐇 LGTM. I think you can also link t...</description>
      <category>xvc</category>
      <category>devlog</category>
      <category>xvc</category>
      <category>cargo-geiger</category>
      <category>unsafe_code</category>
      <category>debug</category>
      <category>rust</category>
      <category>programming</category>
      <content:encoded><![CDATA[<p>I’ll start a new series to record my Xvc development progress. I think it’s nice to have a dialogue between 🐢 and 🐇 to explain the decisions and progress. These will be published on my personal blog for now. In the future, we can have a dedicated blog for this.</p>
<p>🐇 LGTM. I think you can also link to commits here when they occur.</p>
<p>🐢 I think that’s a bit too much work, but PRs may be linked.</p>
<p>🐇 Ok. Let’s start with the PRs. What are you working on these days?</p>
<p>🐢 I started fixing warnings in <a href="https://github.com/iesahin/xvc/issues/3">issue #3</a> and am now fixing missing documentation warnings.</p>
<p>🐇 Do you really think that we’ll have a use for [RMNStore] in the future?</p>
<p>🐢 I’m not sure. Possibly any M-N relationship can be tracked by two 1-N relationships. Under the hood, this is what RMNStore does actually.</p>
<p>🐇 Maybe we should just remove it.</p>
<p>🐢 I want to save it for the time being. If [<code>xvc-ecs</code>] is used in other places, it may be needed.</p>
<p>🐇 Ok. Probably YAGNI, but let’s keep it for the time being.</p>
<hr>
<p>🐢 Writing documentation can be a debugging method, too. I think I’ve found the reason for a <a href="https://github.com/iesahin/xvc/issues/45">bug here</a>.</p>
<p>🐇 Um, how could it lead to a bug?</p>
<p>🐢 Insert means a <em>new event</em> happened. But when converting a <code>VStore</code> to an <code>XvcStore</code>, new events are not happening. We are simply converting from one store to another.</p>
<p>🐇 That means they are added to <code>XvcStore::current</code> events, not <code>XvcStore::previous</code>, and when <code>save_dir</code> is called, they are saved.</p>
<p>🐢 Yeah, that was the bug. From time to time, I was seeing duplicate JSON files.</p>
<p>🐇 Then maybe it’s better to limit all <code>insert</code> usage.</p>
<p>🐢 Yeah, I should review that, too.</p>
<p>🐇 Added a <a href="https://github.com/iesahin/xvc/issues/45">bug report</a>.</p>
<hr>
<p>🐢 I’m installing <code>cargo-geiger</code> to show that there is no <code>unsafe</code> code.</p>
<p>🐇 Do you think you’ll maintain Xvc that way? That it won’t require any unsafe code?</p>
<p>🐢 Maintain the <code>forbidden(unsafe)</code> status? I think so. Xvc doesn’t seem to need any unsafe blocks by itself. Most of the dependencies may need it, though.</p>
<p>🐇 <a href="https://github.com/iesahin/xvc/issues/63">Working on it</a>, and it will be merged today.</p>
<hr>
<p>🐢 I worked on <a href="https://github.com/iesahin/xvc/issues/8">that <code>s3cmd</code> bug</a> yesterday, and it turned out that my modification of the configuration was the cause.</p>
<p>🐇 You were thinking that it’s about R2 all along?</p>
<p>🐢 I should suspect my custom config more.</p>
<p>🐇 Anyway, congratulations 🌠 that Xvc now has Cloudflare R2 support.</p>]]></content:encoded>
    </item>
  </channel>
</rss>
