<p dir="auto">Some programming languages leave binary compiled files to the source tree by default. <code class="notranslate">.pyc</code> files in Python being the most notably example.</p>
<p dir="auto">Together with <code class="notranslate">tree-view</code> <code class="notranslate">hideIgnoredNames</code> being false by default this makes navigation in the source tree little bit cumbersome due to scrolling through unnecessary <code class="notranslate">.pyc</code> duplicates, as demonstrated in the screenshot below:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/49922/3311919/c71be7c0-f6ca-11e3-90b4-e39d89fcb45d.png"><img src="https://cloud.githubusercontent.com/assets/49922/3311919/c71be7c0-f6ca-11e3-90b4-e39d89fcb45d.png" alt="screen shot 2014-06-18 at 12 27 00" style="max-width: 100%;"></a></p>
<p dir="auto">What is Atom stance towards "sane defaults"? Could it be acceptable patch to have <code class="notranslate">.pyc</code> in the ignored files by default (thus giving better out of the box experience), or should things like that go to a separate package which all Python developers then install? (Though Python highlighter comes with the default installation.) I am not sure if I want to make a pull request on this, as I am not aware of the authors stance on the matter like this.</p>
<p dir="auto">For comparison, Sublime Text &amp; co. seem to hide <code class="notranslate">.pyc</code> files by default.</p>
<p dir="auto">Suppose I have a package that's only activated in response to the <code class="notranslate">my-package:start</code> command, and in response to that command, it adds an instance of <code class="notranslate">MyPackageView</code> as a new item in the current <code class="notranslate">Pane</code>.</p>
<p dir="auto">If I want that view to be serialized when the editor closes, it seems like I'd just register deserialization like this:</p>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyPackageView
  atom.deserializers.add(this)

  constructor: (@data) -&gt; #property assigned
  serialize: -&gt; { deserializer: 'MyPackageView', data: @data } 
  @deserialize: ({data}) -&gt; new MyPackageView(data)"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-en">MyPackageView</span>
  <span class="pl-smi">atom</span>.<span class="pl-smi">deserializers</span>.<span class="pl-c1">add</span>(<span class="pl-c1">this</span>)

  <span class="pl-en">constructor</span><span class="pl-k">:</span> (<span class="pl-smi">@data</span>) <span class="pl-k">-&gt;</span> <span class="pl-c"><span class="pl-c">#</span>property assigned</span>
  <span class="pl-en">serialize</span><span class="pl-k">:</span> <span class="pl-k">-&gt;</span> { <span class="pl-v">deserializer</span><span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">'</span>MyPackageView<span class="pl-pds">'</span></span>, <span class="pl-v">data</span><span class="pl-k">:</span> <span class="pl-smi">@data</span> } 
  <span class="pl-en"><span class="pl-smi">@</span>deserialize</span><span class="pl-k">:</span> ({data}) <span class="pl-k">-&gt;</span> <span class="pl-k">new</span> <span class="pl-en">MyPackageView</span>(data)</pre></div>
<p dir="auto">(from <a href="https://atom.io/docs/latest/advanced/serialization" rel="nofollow">serialization docs</a>, see also <a href="https://github.com/atom/atom/blob/v0.133.0/src/deserializer-manager.coffee#L24">DeserializeManager</a>)</p>
<p dir="auto">But the problem with this is that, if we add this view and then close/reopen Atom, it can't find <code class="notranslate">MyPackageView</code> when trying to deserialize this pane item.</p>
<p dir="auto">It seems that instead of loading the package but then waiting until activation event to call <code class="notranslate">activate()</code>, the package isn't even being <em>loaded</em> until the activation event fires.  I'm not sure whether this is the intended behavior or not, but based on the comments about deferring <code class="notranslate">require</code>s in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="36014873" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/2654" data-hovercard-type="issue" data-hovercard-url="/atom/atom/issues/2654/hovercard" href="https://github.com/atom/atom/issues/2654">#2654</a> and also in <a href="https://discuss.atom.io/t/how-to-speed-up-your-packages/10903" rel="nofollow">How To Speed Up Your Packages</a>, it appears to be a change, one consequence of this is that deferring <code class="notranslate">require</code> until <code class="notranslate">activate()</code> makes no difference to application load time.  (Although, deferring it until some point even later than that could still speed up <em>package</em> activation time.)</p>
<p dir="auto">If this is actually the intended behavior of the package loading system, then one approach would be to register your package (or have it automatically inferred) when doing <code class="notranslate">deseralizers.add()</code>, so that the package could be stored as deserializer metadata, and then loaded during deserialization if necessary.</p>