Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7ef4078

Browse files
dsymelatkin
authored andcommitted
updates to docs to clarify build steps before test
1 parentf4a2d1e commit7ef4078

File tree

2 files changed

+90
-136
lines changed

2 files changed

+90
-136
lines changed

‎DEVGUIDE.html‎

Lines changed: 77 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -323,164 +323,135 @@ <h1>F# Compiler + Library Open Contribution Repository</h1>
323323
<b>Questions?</b> If you have questions about the source code, please ask in the issues and discussion forums.
324324
</p>
325325

326-
<h3>Compilation Instructions</h3>
327326

327+
<h3>1. Building a Proto Compiler</h3>
328328

329329
<p>
330330
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.
332331
</p>
333332

334-
335-
<h3>1. Building a Proto Compiler</h3>
336-
337333
<p>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>
338334
<pre>
339-
cd src
340-
gacutil /i ..\lkg\FSharp-2.0.50726.900\bin\FSharp.Core.dll
341-
msbuild fsharp-proto-build.proj
335+
gacutil /i lkg\FSharp-2.0.50726.900\bin\FSharp.Core.dll
336+
msbuild src/fsharp-proto-build.proj
342337
</pre>
343338

344-
<h3>2. Building an F# (Debug) library, compiler, type providersandunit tests</h3>
339+
<h3>2. Building an F# (Debug) libraryandcompiler</h3>
345340

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>
341+
<p>This uses the proto compiler to build FSharp.Core.dll, FSharp.Compiler.dll and fsc.exe.</p>
347342
<pre>
348-
msbuild fsharp-library-build.proj /p:TargetFramework=net40
349-
msbuild fsharp-compiler-build.proj /p:TargetFramework=net40
350-
msbuild fsharp-typeproviders-build.proj /p:TargetFramework=net40
351-
msbuild fsharp-library-unittests-build.proj /p:TargetFramework=net40
352-
msbuild fsharp-library-build.proj /p:TargetFramework=net20
353-
msbuild fsharp-library-build.proj /p:TargetFramework=portable47
354-
msbuild fsharp-library-build.proj /p:TargetFramework=portable7
343+
msbuild src/fsharp-library-build.proj
344+
msbuild src/fsharp-compiler-build.proj
355345
</pre>
356-
<p>
357-
Use this script to add the built FSharp.Core to the
358-
GAC,<b>add required strong name validation skips</b>, and NGen the compiler and libraries.
359-
This requires admin privileges.
360-
</p>
361-
<pre>
362-
update.cmd debug -ngen
363-
</pre>
364-
365-
<h3>3. Running Tests</h3>
346+
<p>You can now use the updated commpiler in<code>Debug\net40\bin\fsc.exe</code> to develop and test basic language and tool features.</p>
366347

367-
<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>
378348

349+
<h3>3. Full Steps Before Running Tests</h3>
379350

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>
351+
<p>See<ahref="tests\TESTGUIDE.html">tests\TESTGUIDE.html</a> 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>
402354
<pre>
403-
msbuild fsharp-compiler-build.proj /p:TargetFramework=net40 /p:Configuration=Release
355+
msbuild src/fsharp-library-build.proj /p:Configuration=Debug
356+
msbuild src/fsharp-compiler-build.proj /p:Configuration=Debug
357+
msbuild src/fsharp-typeproviders-build.proj /p:Configuration=Debug
358+
msbuild src/fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Debug
359+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Debug
360+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=Debug
361+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=Debug
362+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=Debug
363+
msbuild src/fsharp-library-unittests-build.proj /p:Configuration=Debug
364+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable47 /p:Configuration=Debug
365+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7 /p:Configuration=Debug
366+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78 /p:Configuration=Debug
367+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259 /p:Configuration=Debug
368+
src\update.cmd debug -ngen
369+
tests\BuildTestTools.cmd Debug
404370
</pre>
405-
<p>
406-
Use this script to add the built FSharp.Core to the
407-
GAC,<b>add required strong name validation skips</b>, and NGen the compiler and libraries.
408-
This requires admin privileges.
409-
</p>
371+
<p>[Optional] If building and testing the Visual Studio bits (see below) you will also need:</p>
410372
<pre>
411-
update.cmd debug -ngen
373+
msbuild vsintegration\fsharp-vsintegration-build.proj /p:Configuration=Debug
374+
msbuild vsintegration\fsharp-vsintegration-unittests-build.proj /p:Configuration=Debug
412375
</pre>
413376

377+
<p>Prior to a<b>Release</b> test run, you need to do all of these:</p>
378+
<pre>
379+
msbuild src/fsharp-library-build.proj /p:Configuration=Release
380+
msbuild src/fsharp-compiler-build.proj /p:Configuration=Release
381+
msbuild src/fsharp-typeproviders-build.proj /p:Configuration=Release
382+
msbuild src/fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release
383+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
384+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
385+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
386+
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
387+
msbuild src/fsharp-library-unittests-build.proj /p:Configuration=Release
388+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
389+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
390+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
391+
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
392+
src\update.cmd release -ngen
393+
tests\BuildTestTools.cmd Release
394+
</pre>
395+
<p>[Optional] If building and testing the Visual Studio bits (see below) you will also need:</p>
396+
<pre>
397+
msbuild vsintegration\fsharp-vsintegration-build.proj /p:Configuration=Release
398+
msbuild vsintegration\fsharp-vsintegration-unittests-build.proj /p:Configuration=Release
399+
</pre>
414400

415-
416-
<h3>5. [Optional] Open a solution with Visual Studio</h3>
417-
418-
<p>
419-
You can use "fsharp.sln" to browse source code using Visual Studio.
420-
However, you need to complete step 1) and 2) in order to properly
421-
open this solution. In addition, FSharp.Core.Unittests project requires NUnit installed.
422-
</p>
423-
<h3>6. [Optional] Build Visual Studio components</h3>
401+
<h3>4. [Optional] Build and Install Visual Studio components</h3>
424402
<p>
425403
To build the VS components:
426404
</p>
427405
<pre>
428406
cd ..\vsintegration
429407
msbuild fsharp-vsintegration-build.proj
430408
</pre>
431-
432-
<h3>6. [Optional] Build and install Visual Studio components</h3>
433409
<p>
434410
To install the VS components:
435411
</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>
412+
<ul>
413+
<li>
414+
First ensure that the VSIX package is uninstalled, in VS select Tools/Extensions and Updates,
415+
If the packages VisualStudio.FSharp.EnableOpenSource is installed, select Uninstall
416+
</li>
417+
<li>Then:</li>
418+
</ul>
440419
<pre>
441420
..\Debug\net40\bin\EnableOpenSource.vsix
442421
</pre>
443422
<p>
444-
RestartVisual Studio, now it should be runningthe open source FSharp.VS.FSI.
423+
Now restartVisual Studio, now it should be runningyour freshly built components.
445424
</p>
446-
<pre>
447-
</pre>
448425

449426
<h3>Notes on the build</h3>
450427

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>
461428
<ul>
429+
<li>
430+
The<code>update.cmd</code> script add the built FSharp.Core to the
431+
GAC, adds required strong name validation skips, and NGens the compiler and libraries.
432+
This requires admin privileges.
433+
</li>
434+
<li>
435+
The compiler binaries produced are "private" and strong-named signed with a test key (src\fsharp\test.snk).
436+
</li>
462437
<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>
463438
<li>
464439
We use this compiler to compile the source in this distribution, to produce a "proto" compiler, in the Proto
465440
directory. When run, this compiler still relies on the FSharp.Core.dll with version X.
466441
</li>
467442
<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.
443+
We use the proto compiler to compile the source for FSharp.Core.dll in this distribution.
470444
</li>
471445
<li>
472446
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.
447+
binaries found in this distribution.
448+
</li>
449+
<li>
450+
Some additional tools are required to build the compiler, notably fslex.exe, fsyacc.exe,
451+
FSharp.PowerPack.Build.Tasks.dll, FsSrGen.exe, FSharp.SRGen.Build.Tasks.dll and the other
452+
tools found in the lkg directory.
476453
</li>
477454
</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.
483-
</p>
484455

485456

486457
</body>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp