Skip to content

Commit

Permalink
build based on a7ebcfa
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Jul 30, 2024
1 parent 8ce3538 commit 975edc1
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-28T19:16:00","documenter_version":"1.5.0"}}
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-30T09:29:37","documenter_version":"1.5.0"}}
2 changes: 1 addition & 1 deletion dev/config/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
end
END</code></pre><h2 id="Configuring-the-revise-mode"><a class="docs-heading-anchor" href="#Configuring-the-revise-mode">Configuring the revise mode</a><a id="Configuring-the-revise-mode-1"></a><a class="docs-heading-anchor-permalink" href="#Configuring-the-revise-mode" title="Permalink"></a></h2><p>By default, in packages all changes are tracked, but with <code>includet</code> only method definitions are tracked. This behavior can be overridden by defining a variable <code>__revise_mode__</code> in the module(s) containing your methods and/or data. <code>__revise_mode__</code> must be a <code>Symbol</code> taking one of the following values:</p><ul><li><code>:eval</code>: evaluate everything (the default for packages)</li><li><code>:evalmeth</code>: evaluate changes to method definitions (the default for <code>includet</code>) This should work even for quite complicated method definitions, such as those that might be made within a <code>for</code>-loop and <code>@eval</code> block.</li><li><code>:evalassign</code>: evaluate method definitions and assignment statements. A top-level expression <code>a = Int[]</code> would be evaluated, but <code>push!(a, 1)</code> would not because the latter is not an assignment.</li><li><code>:sigs</code>: do not implement any changes, only scan method definitions for their signatures so that their location can be updated as changes to the file(s) are made.</li></ul><p>If you&#39;re using <code>includet</code> from the REPL, you can enter <code>__revise_mode__ = :eval</code> to set it throughout <code>Main</code>. <code>__revise_mode__</code> can be set independently in each module.</p><h2 id="Optional-global-configuration"><a class="docs-heading-anchor" href="#Optional-global-configuration">Optional global configuration</a><a id="Optional-global-configuration-1"></a><a class="docs-heading-anchor-permalink" href="#Optional-global-configuration" title="Permalink"></a></h2><p>Revise can be configured by setting environment variables. These variables have to be set before you execute <code>using Revise</code>, because these environment variables are parsed only during execution of Revise&#39;s <code>__init__</code> function.</p><p>There are several ways to set these environment variables:</p><ul><li>If you are <a href="#Using-Revise-by-default">Using Revise by default</a> then you can include statements like <code>ENV[&quot;JULIA_REVISE&quot;] = &quot;manual&quot;</code> in your <code>.julia/config/startup.jl</code> file prior to the line containing <code>using Revise</code>.</li><li>On Unix systems, you can set variables in your shell initialization script (e.g., put lines like <code>export JULIA_REVISE=manual</code> in your <a href="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/profile.html"><code>.bashrc</code> file</a> if you use <code>bash</code>).</li><li>On Unix systems, you can launch Julia from the Unix prompt as <code>$ JULIA_REVISE=manual julia</code> to set options for just that session.</li></ul><p>The function of specific environment variables is described below.</p><h3 id="Manual-revision:-JULIA_REVISE"><a class="docs-heading-anchor" href="#Manual-revision:-JULIA_REVISE">Manual revision: JULIA_REVISE</a><a id="Manual-revision:-JULIA_REVISE-1"></a><a class="docs-heading-anchor-permalink" href="#Manual-revision:-JULIA_REVISE" title="Permalink"></a></h3><p>By default, Revise processes any modified source files every time you enter a command at the REPL. However, there might be times where you&#39;d prefer to exert manual control over the timing of revisions. <code>Revise</code> looks for an environment variable <code>JULIA_REVISE</code>, and if it is set to anything other than <code>&quot;auto&quot;</code> it will require that you manually call <code>revise()</code> to update code.</p><h3 id="User-scripts:-JULIA_REVISE_INCLUDE"><a class="docs-heading-anchor" href="#User-scripts:-JULIA_REVISE_INCLUDE">User scripts: JULIA_REVISE_INCLUDE</a><a id="User-scripts:-JULIA_REVISE_INCLUDE-1"></a><a class="docs-heading-anchor-permalink" href="#User-scripts:-JULIA_REVISE_INCLUDE" title="Permalink"></a></h3><p>By default, <code>Revise</code> only tracks files that have been required as a consequence of a <code>using</code> or <code>import</code> statement; files loaded by <code>include</code> are not tracked, unless you explicitly use <code>includet</code> or <code>Revise.track(filename)</code>. However, you can turn on automatic tracking by setting the environment variable <code>JULIA_REVISE_INCLUDE</code> to the string <code>&quot;1&quot;</code> (e.g., <code>JULIA_REVISE_INCLUDE=1</code> in a bash script).</p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>Most users should avoid setting <code>JULIA_REVISE_INCLUDE</code>. Try <code>includet</code> instead.</p></div></div><h2 id="Configurations-for-fixing-errors"><a class="docs-heading-anchor" href="#Configurations-for-fixing-errors">Configurations for fixing errors</a><a id="Configurations-for-fixing-errors-1"></a><a class="docs-heading-anchor-permalink" href="#Configurations-for-fixing-errors" title="Permalink"></a></h2><h3 id="No-space-left-on-device"><a class="docs-heading-anchor" href="#No-space-left-on-device">No space left on device</a><a id="No-space-left-on-device-1"></a><a class="docs-heading-anchor-permalink" href="#No-space-left-on-device" title="Permalink"></a></h3><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>This applies only to Linux</p></div></div><p>Revise needs to be notified by your filesystem about changes to your code, which means that the files that define your modules need to be watched for updates. Some systems impose limits on the number of files and directories that can be watched simultaneously; if such a limit is hit, on Linux this can result in Revise silently ceasing to work (albeit with unit tests failing) or in a fairly cryptic error like</p><pre><code class="language-sh hljs">ERROR: start_watching (File Monitor): no space left on device (ENOSPC)</code></pre><p>The cure is to investigate and possibly increase the number of files that can be watched.</p><p>Invoking</p><pre><code class="language-sh hljs">$ sysctl fs.inotify</code></pre><p>at the linux prompt may e.g. result in</p><pre><code class="nohighlight hljs">fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 524288</code></pre><p>For Revise usage, <code>max_user_watches &gt;= 65536</code> is recommended, and more can be helpful; the value of 524288 above is common on modern systems. One can set higher values as needed, e.g.,</p><pre><code class="nohighlight hljs">$ sudo sysctl fs.inotify.max_user_instances=2048</code></pre><p>After changing these values, it is advised to run Revise&#39;s unit tests to see if they pass.</p><p>This change can be made <a href="https://www.suse.com/de-de/support/kb/doc/?id=000020048">permanent</a>.</p><p>For more information see issues <a href="https://github.com/timholy/Revise.jl/issues/26">#26</a> and <a href="https://github.com/timholy/Revise.jl/issues/778">#778</a>.</p><h3 id="Polling-and-NFS-mounted-code-directories:-JULIA_REVISE_POLL"><a class="docs-heading-anchor" href="#Polling-and-NFS-mounted-code-directories:-JULIA_REVISE_POLL">Polling and NFS-mounted code directories: JULIA_REVISE_POLL</a><a id="Polling-and-NFS-mounted-code-directories:-JULIA_REVISE_POLL-1"></a><a class="docs-heading-anchor-permalink" href="#Polling-and-NFS-mounted-code-directories:-JULIA_REVISE_POLL" title="Permalink"></a></h3><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>This applies only to Unix systems with code on network-mounted drives</p></div></div><p><code>Revise</code> works by monitoring your filesystem for changes to the files that define your code. On most operating systems, Revise can work &quot;passively&quot; and wait to be signaled that one or more watched directories has changed.</p><p>Unfortunately, a few file systems (notably, the Unix-based Network File System NFS) don&#39;t support this approach. In such cases, Revise needs to &quot;actively&quot; check each file periodically to see whether it has changed since the last check. This active process is called <a href="https://en.wikipedia.org/wiki/Polling_(computer_science)">polling</a>. You turn on polling by setting the environment variable <code>JULIA_REVISE_POLL</code> to the string <code>&quot;1&quot;</code> (e.g., <code>JULIA_REVISE_POLL=1</code> in a bash script).</p><div class="admonition is-warning"><header class="admonition-header">Warning</header><div class="admonition-body"><p>If you&#39;re using polling, you may have to wait several seconds before changes take effect. Polling is <em>not</em> recommended unless you have no other alternative.</p></div></div><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>NFS stands for <a href="https://en.wikipedia.org/wiki/Network_File_System">Network File System</a> and is typically only used to mount shared network drives on <em>Unix</em> file systems. Despite similarities in the acronym, NTFS, the standard <a href="https://en.wikipedia.org/wiki/NTFS">filesystem on Windows</a>, is completely different from NFS; Revise&#39;s default configuration should work fine on Windows without polling. However, WSL2 users currently need polling due to <a href="https://github.com/JuliaLang/julia/issues/37029">this bug</a>.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../cookbook/">Revise usage: a cookbook »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Sunday 28 July 2024 19:16">Sunday 28 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
fs.inotify.max_user_watches = 524288</code></pre><p>For Revise usage, <code>max_user_watches &gt;= 65536</code> is recommended, and more can be helpful; the value of 524288 above is common on modern systems. One can set higher values as needed, e.g.,</p><pre><code class="nohighlight hljs">$ sudo sysctl fs.inotify.max_user_instances=2048</code></pre><p>After changing these values, it is advised to run Revise&#39;s unit tests to see if they pass.</p><p>This change can be made <a href="https://www.suse.com/de-de/support/kb/doc/?id=000020048">permanent</a>.</p><p>For more information see issues <a href="https://github.com/timholy/Revise.jl/issues/26">#26</a> and <a href="https://github.com/timholy/Revise.jl/issues/778">#778</a>.</p><h3 id="Polling-and-NFS-mounted-code-directories:-JULIA_REVISE_POLL"><a class="docs-heading-anchor" href="#Polling-and-NFS-mounted-code-directories:-JULIA_REVISE_POLL">Polling and NFS-mounted code directories: JULIA_REVISE_POLL</a><a id="Polling-and-NFS-mounted-code-directories:-JULIA_REVISE_POLL-1"></a><a class="docs-heading-anchor-permalink" href="#Polling-and-NFS-mounted-code-directories:-JULIA_REVISE_POLL" title="Permalink"></a></h3><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>This applies only to Unix systems with code on network-mounted drives</p></div></div><p><code>Revise</code> works by monitoring your filesystem for changes to the files that define your code. On most operating systems, Revise can work &quot;passively&quot; and wait to be signaled that one or more watched directories has changed.</p><p>Unfortunately, a few file systems (notably, the Unix-based Network File System NFS) don&#39;t support this approach. In such cases, Revise needs to &quot;actively&quot; check each file periodically to see whether it has changed since the last check. This active process is called <a href="https://en.wikipedia.org/wiki/Polling_(computer_science)">polling</a>. You turn on polling by setting the environment variable <code>JULIA_REVISE_POLL</code> to the string <code>&quot;1&quot;</code> (e.g., <code>JULIA_REVISE_POLL=1</code> in a bash script).</p><div class="admonition is-warning"><header class="admonition-header">Warning</header><div class="admonition-body"><p>If you&#39;re using polling, you may have to wait several seconds before changes take effect. Polling is <em>not</em> recommended unless you have no other alternative.</p></div></div><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>NFS stands for <a href="https://en.wikipedia.org/wiki/Network_File_System">Network File System</a> and is typically only used to mount shared network drives on <em>Unix</em> file systems. Despite similarities in the acronym, NTFS, the standard <a href="https://en.wikipedia.org/wiki/NTFS">filesystem on Windows</a>, is completely different from NFS; Revise&#39;s default configuration should work fine on Windows without polling. However, WSL2 users currently need polling due to <a href="https://github.com/JuliaLang/julia/issues/37029">this bug</a>.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../cookbook/">Revise usage: a cookbook »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Tuesday 30 July 2024 09:29">Tuesday 30 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/cookbook/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@

julia&gt; mygreeting()
&quot;Hello, world!&quot;</code></pre><p>Now, in your editor modify <code>mygreeting</code> to do this:</p><pre><code class="language-julia hljs">mygreeting() = &quot;Hello, revised world!&quot;</code></pre><p>and then try it in the same session:</p><pre><code class="language-julia hljs">julia&gt; mygreeting()
&quot;Hello, revised world!&quot;</code></pre><p>As described above, the first revision you make may be very slow, but later revisions should be fast.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../config/">« Configuration</a><a class="docs-footer-nextpage" href="../limitations/">Limitations »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Sunday 28 July 2024 19:16">Sunday 28 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
&quot;Hello, revised world!&quot;</code></pre><p>As described above, the first revision you make may be very slow, but later revisions should be fast.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../config/">« Configuration</a><a class="docs-footer-nextpage" href="../limitations/">Limitations »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Tuesday 30 July 2024 09:29">Tuesday 30 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 975edc1

Please sign in to comment.