You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
<b>Questions?</b> If you have questions about the source code, please ask in the issues and discussion forums.
324
324
</p>
325
325
326
-
<h3>Compilation Instructions</h3>
327
326
327
+
<h3>1. Building a Proto Compiler</h3>
328
328
329
329
<p>
330
330
The compiler is compiled as a set of .NET 4.0 components using a bootstrap process.
331
-
When you build the compiler using the standard instructions below, you get<code>fsc.exe</code>,<code>fsi.exe</code>,<code>FSharp.Core.dll</code>,<code>FSharp.Compiler.dll</code> and some related DLLs.
332
-
</p>
333
-
331
+
This uses the lkg compiler to build. Note that you need the .NET framework 3.5 installed on your machine in order to complete this step.</p>
<p>You can now use the updated F# compiler in<code>Debug\net40\bin\fsc.exe</code> and F# Interactive in<code>Debug\net40\bin\fsi.exe</code> to develop and test basic language and tool features.<p>
345
+
<p><b>Note:</b> The updated library is not used until you run<code>update.cmd</code>, see below. The updated
346
+
compiler is not run 'pre-compiled' until you run<code>update.cmd -ngen</code>, see below.</p>
343
347
344
-
<h3>2. Building an F# (Debug) library, compiler, type providers and unit tests</h3>
345
348
346
-
<p>This uses the proto compiler to build FSharp.Core.dll, FSharp.Compiler.dll and fsc.exe to run on for Mono/.NET 4.0.</p>
349
+
<h3>3. Full Steps Before Running Tests</h3>
350
+
351
+
<p>See<ahref="TESTGUIDE.html">TESTGUIDE.html</a> for instructions on how to run tests.</p>
352
+
353
+
<p>Prior to a<b>Debug</b> test run, you need to complete<b>all</b> of these steps:</p>
<p>There are language tests under the<code>tests</code> directory. The test apparatus uses batch files, assuming<ahref="http://www.perl.org/get.html">Perl</a> (ActiveState Perl 5.16.3 is known to work fine) is installed. You can run these on Windows using:</p>
368
-
<pre>
369
-
cd ..\tests
370
-
BuildTestTools.cmd debug
371
-
Runtests.cmd debug fsharp
372
-
Runtests.cmd debug fsharpqa
373
-
Runtests.cmd debug coreunit
374
-
</pre>
375
-
<p>
376
-
For more details on how to run, debug, and write tests, see<ahref="tests\TESTGUIDE.html">tests\TESTGUIDE.html</a>.
377
-
</p>
378
-
379
-
380
-
<p>You can also use the F# compiler and F# interactive as follows:</p>
381
-
382
-
<pre>
383
-
..\Debug\net40\bin\fsc.exe /help
384
-
..\Debug\net40\bin\fsi.exe /help
385
-
..\Debug\net40\bin\fsi.exe
386
-
1 + 1;;
387
-
#q;;
388
-
</pre>
389
-
<p>Compile hello world.</p>
390
-
<pre>
391
-
echo printfn "hello world"> hello.fs
392
-
..\Debug\net40\bin\fsc.exe hello.fs
393
-
copy ..\Debug\net40\bin\FSharp.Core.dll .
394
-
hello.exe
395
-
del /q hello.fs
396
-
del /q FSharp.Core.dll
397
-
</pre>
398
-
399
-
<h3>4. [Optional] Building and testing the "release" compiler</h3>
400
-
401
-
<p>This uses the proto compiler to build the FSharp.Compiler.dll and fsc.exe to run on for Mono/.NET 4.0.</p>
377
+
<p>Prior to a<b>Release</b> test run, you need to do<b>all</b> of these:</p>
<h3>6. [Optional] Build and install Visual Studio components</h3>
433
411
<p>
434
412
To install the VS components:
435
413
</p>
436
-
<p>
437
-
Ensure that the VSIX package is uninstalled, in VS select Tools/Extensions and Updates,
438
-
If the packages VisualStudio.FSharp.EnableOpenSource is installed, select Uninstall
439
-
</p>
414
+
<ul>
415
+
<li>
416
+
First ensure that the VSIX package is uninstalled, in VS select Tools/Extensions and Updates,
417
+
If the packages VisualStudio.FSharp.EnableOpenSource is installed, select Uninstall
418
+
</li>
419
+
<li>Then:</li>
420
+
</ul>
440
421
<pre>
441
-
..\Debug\net40\bin\EnableOpenSource.vsix
422
+
Debug\net40\bin\EnableOpenSource.vsix
442
423
</pre>
443
424
<p>
444
-
RestartVisual Studio, now it should be runningthe open source FSharp.VS.FSI.
425
+
Now restartVisual Studio, now it should be runningyour freshly built Visual F# IDE Tools.
445
426
</p>
446
-
<pre>
447
-
</pre>
448
427
449
428
<h3>Notes on the build</h3>
450
429
451
-
<p>
452
-
The compiler binaries produced are "private" and
453
-
strong-named signed with a test key (src\fsharp\test.snk). They use CLI assembly version nunmber 2.9.9.999. You can place these components in the GAC but they will not replace
454
-
the components used by Visual Studio or other normal F# programs.
455
-
</p>
456
-
457
-
<p>
458
-
The prerequisites and build command line for compiling the source (on Windows) are shown
459
-
later in this README. Here's the logic of the build:
460
-
</p>
461
430
<ul>
431
+
<li>
432
+
The<code>update.cmd</code> script add the built FSharp.Core to the
433
+
GAC, adds required strong name validation skips, and NGens the compiler and libraries.
434
+
This requires admin privileges.
435
+
</li>
436
+
<li>
437
+
The compiler binaries produced are "private" and strong-named signed with a test key (src\fsharp\test.snk).
438
+
</li>
462
439
<li>We first need an existing F# compiler, using the one in the 'lkg' directory. Let's assume this compiler has an FSharp.Core.dll with version X.</li>
463
440
<li>
464
441
We use this compiler to compile the source in this distribution, to produce a "proto" compiler, in the Proto
465
442
directory. When run, this compiler still relies on the FSharp.Core.dll with version X.
466
443
</li>
467
444
<li>
468
-
We use the proto compiler to compile the source for FSharp.Core.dll in this distribution, producing
469
-
an FSharp.Core.dll with the version identified in src\source-build-version, usually 1.9.999.
445
+
We use the proto compiler to compile the source for FSharp.Core.dll in this distribution.
470
446
</li>
471
447
<li>
472
448
We use the proto compiler to compile the source for FSharp.Compiler.dll, fsc.exe, fsi.exe and other
473
-
binaries found in this distribution. When run, these binaries will rely on the FSharp.Core.dll with version
474
-
1.9.999. This is good, since it means the 1.9.999 binaries now form a consistent, bootstrapped compiler. If
475
-
you like you should now be able to throw away the compiler with version X.
449
+
binaries found in this distribution.
450
+
</li>
451
+
<li>
452
+
Some additional tools are required to build the compiler, notably fslex.exe, fsyacc.exe,
453
+
FSharp.PowerPack.Build.Tasks.dll, FsSrGen.exe, FSharp.SRGen.Build.Tasks.dll and the other
454
+
tools found in the lkg directory.
476
455
</li>
477
456
</ul>
478
-
<p>
479
-
Some additional tools are required to build the compiler, notably fslex.exe, fsyacc.exe,
480
-
FSharp.PowerPack.Build.Tasks.dll, FsSrGen.exe, FSharp.SRGen.Build.Tasks.dll and the other
481
-
tools found in the lkg directory. These are "Last Known Good" binaries created from a version of the F# Power Pack
482
-
on CodePlex. If you like you can throw away these binaries and use your own compiled versions of these tools.