Skip to content

Docs update #892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
112 changes: 65 additions & 47 deletions docs/compiler.html

Large diffs are not rendered by default.

19 changes: 3 additions & 16 deletions docs/corelib.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ <h2><a name="Shipping-an-FSharp-Core-with-your-application" class="anchor" href=
include a copy of FSharp.Core.dll as part of your application.</p>
<p>For example, if you build a <code>HostedCompiler.exe</code>, you will normally place an FSharp.Core.dll (say 4.3.1.0) alongside
your <code>HostedCompiler.exe</code>.</p>
<p>If doing dynamic compilation and execution you may also need to include
an FSharp.Core.optdata and FSharp.Core.sigdata, see below for guidance.</p>
<h2><a name="Binding-redirects-for-your-application" class="anchor" href="#Binding-redirects-for-your-application">Binding redirects for your application</a></h2>
<p>The FSharp.Compiler.Service.dll component depends on FSharp.Core 4.4.0.0. Normally your application will target
a later version of FSharp.Core, and you will need a <a href="http://msdn.microsoft.com/en-us/library/7wd6ex19(v=vs.110).aspx">binding redirect</a> to ensure
a later version of FSharp.Core, and you may need a <a href="http://msdn.microsoft.com/en-us/library/7wd6ex19(v=vs.110).aspx">binding redirect</a> to ensure
that other versions of FSharp.Core forward to the final version of FSharp.Core.dll your application uses.
Binding redirect files are normally generated automatically by build tools. If not, you can use one like this
(if your tool is called <code>HostedCompiler.exe</code>, the binding redirect file is called <code>HostedCompiler.exe.config</code>)</p>
Expand Down Expand Up @@ -125,23 +123,12 @@ <h2><a name="What-about-if-I-am-processing-a-script-or-using" class="anchor" hre
<li>
<p>If there is no static reference to FSharp.Core in the host assembly, then</p>
<ul>
<li>For FSharp.Compiler.Service 0.x series, a reference to FSharp.Core version 4.3.0.0 is added</li>
<li>For FSharp.Compiler.Service 1.3.1.x (F# 3.1 series), a reference to FSharp.Core version 4.3.1.0 is added</li>
<li>For FSharp.Compiler.Service 1.4.0.x (F# 4.0 series), a reference to FSharp.Core version 4.4.0.0 is added</li>
<li>For FSharp.Compiler.Service 1.4.0.x above (F# 4.0 series), a reference to FSharp.Core version 4.4.0.0 is added</li>
</ul>
</li>
</ol>
<h2><a name="Do-I-need-to-include-FSharp-Core-optdata-and-FSharp-Core-sigdata" class="anchor" href="#Do-I-need-to-include-FSharp-Core-optdata-and-FSharp-Core-sigdata">Do I need to include FSharp.Core.optdata and FSharp.Core.sigdata?</a></h2>
<p>If your compilation arguments explicitly reference an FSharp.Core.dll from an SDK location, then FSharp.Core.sigdata and FSharp.Core.optdata should be alongside the DLL
(if these files are not installed, then that's a bug in the F# SDK installation). If your compilation
arguments are always making an explicit reference, then you should <em>not</em> include FSharp.Core.optdata and FSharp.Core.sigdata as part of your application.</p>
<p>If you are relying on an implicit reference (e.g. for script processing, see above), this means your tool may reference the FSharp.Core.dll
that is part of your application. In this case, you may either get an error that FSharp.Core.optdata and FSharp.Core.sigdata are not
found alongside FSharp.Core.dll. <strong>If you want to implicitly reference the FSharp.Core.dll you are including in your application,
then also add FSharp.Core.sigdata and FSharp.Core.optdata as two additional files to your application</strong>. When using <code>CompileToDynamicAssembly</code>, this problem
can also manifest itself as <a href="https://github.com/fsharp/FSharp.Compiler.Service/issues/258">a stack overflow during assembly resolution</a>.</p>
<p>Tools that dynamically compile and execute code (e.g. a <code>HostedExecution.exe</code>) often make an implicit
reference to FSharp.Core.dll, which means they normally also include FSharp.Core.optdata and FSharp.Core.sigdata.</p>
<p>No, unless you are doing something with very old FSharp.Core.dll.</p>
<h2><a name="Summary" class="anchor" href="#Summary">Summary</a></h2>
<p>In this design note we have discussed three things:</p>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/devnotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h2><a name="Building-and-NuGet" class="anchor" href="#Building-and-NuGet">Build
<td class="snippet"><pre class="fssnip"><code lang="text">git clone https://github.com/fsharp/FSharp.Compiler.Service
cd FSharp.Compiler.Service
</code></pre></td></tr></table>
<p>Now follow build everything by running <code>.\fcs\build.cmd</code> (Windows) or <code>./fcs/build.sh</code> (Linux + Mac OS).
<p>Now follow build everything by running <code>build.cmd</code> (Windows) or <code>build.sh</code> (Linux + Mac OS).
The output will be located in the <code>bin</code> directory. If you also wish to build the documentation
and NuGet package, run <code>build Release</code> (this also attempts to publish the documentation to
GitHub, which only works if you have access to the GitHub repository).</p>
Expand Down
Loading