<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="353557" data-post-id="353557">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="nix2intel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nix2intel/120/37441_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  nix2intel
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>what if I were to tell you that it was a space in the name with a certain length? When I do</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">sh &lt;(curl 'https://ash-hq.org/new/hairbnb?install=phoenix') \
    &amp;&amp; cd hairbnb \
      &amp;&amp; mix igniter.install \
    ash_phoenix ash_json_api ash_postgres ash_authentication \
    ash_authentication_phoenix ash_admin ash_state_machine \
    ash_paper_trail cloak ash_cloak \
    --auth-strategy password \
      --yes
</code></pre>
<p>The above works, but the below will fail.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">sh &lt;(curl 'https://ash-hq.org/new/some_long_name_with_spaces?install=phoenix') \
    &amp;&amp; cd some_long_name_with_spaces \
      &amp;&amp; mix igniter.install \
    ash_phoenix ash_json_api ash_postgres ash_authentication \
    ash_authentication_phoenix ash_admin ash_state_machine ash_paper_trail cloak \
    ash_cloak \
    --auth-strategy password \
      --yes
</code></pre>
<p>I get the error that</p>
<p>Issues:</p>
<ul>
<li>** (Rewrite.SourceError) could not write to file “lib/some_long_name_with_spaces/application.ex”: file changed since reading</li>
</ul>
<p>i’ll pull that down, connect, and get you a copy of that debug.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="353557" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-igniter-mix-cant-continue-due-to-errors-on-dependencies/68859/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-353557" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="353557"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-solved cat-solved" title="Marked as solution"></div>
  </section>
</div>
    <div class="postbit" id="353560" data-post-id="353560">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="nix2intel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nix2intel/120/37441_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  nix2intel
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>here is the pastebin for the one that gives an issue</p><aside class="onebox pastebin" data-onebox-src="https://pastebin.com/GrqBimh4">
  <header class="source">

      <a href="https://pastebin.com/GrqBimh4" target="_blank" rel="noopener nofollow ugc">pastebin.com</a>
  </header>

  <article class="onebox-body">
    <h4><a href="https://pastebin.com/GrqBimh4" target="_blank" rel="noopener nofollow ugc">https://pastebin.com/GrqBimh4</a></h4>

<pre><code class="lang-auto"></code></pre>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="353560" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-igniter-mix-cant-continue-due-to-errors-on-dependencies/68859/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-353560" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="353560"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #32"></div>
  </section>
</div>
    <div class="postbit" id="353561" data-post-id="353561">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="nix2intel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nix2intel/120/37441_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  nix2intel
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>here was the debug_state function I called:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defp debug_state(label, igniter, extra \\ nil) do
    IO.puts("\n=== DEBUG: #{label} ===")

    sources = igniter.rewrite.sources
    IO.puts("Sources count: #{map_size(sources)}")

    if extra do
      IO.puts("\nExtra Info:")
      IO.inspect(extra, label: "Extra data", pretty: true)
    end

    Enum.each(sources, fn {path, source} -&gt;
      IO.puts("\nSource: #{path}")
      IO.inspect(source.hash, label: "Hash")

      try do
        v1 = Rewrite.Source.get(source, :content, 1)
        current = Rewrite.Source.get(source, :content)
        IO.puts("Has v1?: #{v1 != nil}")
        IO.puts("Has current?: #{current != nil}")

        if v1 &amp;&amp; current do
          IO.puts("Changed?: #{v1 != current}")
        end
      rescue
        _ -&gt; IO.puts("Error accessing content")
      end
    end)

    IO.puts("=== End #{label} ===\n")
    # Important: return the igniter
    igniter
  end
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="353561" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-igniter-mix-cant-continue-due-to-errors-on-dependencies/68859/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-353561" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="353561"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #33"></div>
  </section>
</div>
    <div class="postbit" id="353629" data-post-id="353629">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>YESSSS you did it! Thank you <img src="https://forum.elixirforum.com/images/emoji/apple/heart.png?v=15" title=":heart:" class="emoji" alt=":heart:" loading="lazy" width="20" height="20"> The “other OSes” problem was a total red herring. I can reproduce with a long name <img src="https://forum.elixirforum.com/images/emoji/apple/fire.png?v=15" title=":fire:" class="emoji" alt=":fire:" loading="lazy" width="20" height="20"> Thank you so much.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="353629" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-igniter-mix-cant-continue-due-to-errors-on-dependencies/68859/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-353629" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="353629"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #34"></div>
  </section>
</div>
    <div class="postbit" id="353635" data-post-id="353635">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="nix2intel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nix2intel/120/37441_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  nix2intel
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>When you find out why im dying to know lol</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="353635" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-igniter-mix-cant-continue-due-to-errors-on-dependencies/68859/36">Post #35</a>
	                </div>
	            </div>
              <div id="likers-container-353635" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="353635"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #35"></div>
  </section>
</div>
    <div class="postbit" id="353656" data-post-id="353656">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>will definitely report back</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="353656" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-igniter-mix-cant-continue-due-to-errors-on-dependencies/68859/37">Post #36</a>
	                </div>
	            </div>
              <div id="likers-container-353656" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="353656"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #36"></div>
  </section>
</div>
    <div class="postbit" id="353728" data-post-id="353728">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Wowee, that was a rabbit hole <img src="https://forum.elixirforum.com/images/emoji/apple/laughing.png?v=15" title=":laughing:" class="emoji" alt=":laughing:" loading="lazy" width="20" height="20"> Fixed versions are released. Here is what was happening:</p>
<p>Duplicate files were being added into the rewrite struct, due to how in some places (when adding a glob), we were adding files by <em>absolute</em> path, instead of <em>relative to CWD path</em>.</p>
<p>The kicker is how we were alerted to this problem <img src="https://forum.elixirforum.com/images/emoji/apple/sweat.png?v=15" title=":sweat:" class="emoji" alt=":sweat:" loading="lazy" width="20" height="20"> The reason that it only happened when the app name was longer is because rewrite uses <code>Task.async_stream</code> to write files in parallel. Inside of that stream each thing reads its original contents and then writes it if it hasn’t changed. The slight additional extra time that it took to either read the file or hash the file name (not sure which) for the longer file names, changed the performance of the writing enough that one of the tasks was slow enough to see the <em>new</em> file contents from one of the other tasks completing and writing its file contents. Now there are no duplicates because everything is using relative paths.</p>
<p>This could also have been the source of other subtle bugs <img src="https://forum.elixirforum.com/images/emoji/apple/sob.png?v=15" title=":sob:" class="emoji" alt=":sob:" loading="lazy" width="20" height="20"></p>
<p>Thank you for your help in figuring this one out!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="353728" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-igniter-mix-cant-continue-due-to-errors-on-dependencies/68859/38">Post #37</a>
	                </div>
	            </div>
              <div id="likers-container-353728" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="353728"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>