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

Commit61fa323

Browse files
dsymeunknown
authored and
unknown
committed
Simplify DEVGUIDE.html
1 parent2d8ebcd commit61fa323

File tree

1 file changed

+86
-111
lines changed

1 file changed

+86
-111
lines changed

‎DEVGUIDE.html‎

Lines changed: 86 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -307,19 +307,10 @@
307307

308308
<h1>F# Compiler + Library Open Contribution Repository</h1>
309309

310-
<p>This repo is a place where you can contribute to the F# compiler.</p>
311-
312-
<p>The compiler is normally compiled as a set of .NET 4.0 components.</p>
313-
314-
<p><b>Before we start, are you sure you&#39;re in the right place?</b></p>
315-
<ul>
316-
<li>To learn what F# is and why it&#39;s interesting, go to<ahref="http://fsharp.org">fsharp.org</a></li>
317-
<li>To get a free F# environment, go to<ahref="http://fsharp.org/use/windows">fsharp.org</a>&nbsp;&nbsp;</li>
318-
<li>If you want to to use F# in Visual Studio 2010, 2012 or 2013, go to<ahref="http://fsharp.net">fsharp.net</a>.</li>
319-
</ul>
320310
<p>
321-
To emphasize, this distribution should not be seen as a way to &quot;get&quot; an F#
322-
compiler for immediate use. For that you&#39;re better off going to<ahref="http://fsharp.org">fsharp.org</a>.
311+
This repo is where you can contribute to the F# compiler.
312+
To learn what F# is and why it&#39;s interesting, go to<ahref="http://fsharp.org">fsharp.org</a>.
313+
To get a free F# environment, go to<ahref="http://fsharp.org/use/windows">fsharp.org</a>.
323314
</p>
324315
<p>
325316
<b>License:</b> Contributions made to this repo are subject to terms and conditions of the Apache License, Version 2.0. A
@@ -330,82 +321,74 @@ <h1>F# Compiler + Library Open Contribution Repository</h1>
330321

331322
<p>
332323
<b>Questions?</b> If you have questions about the source code, please ask in the issues and discussion forums.
333-
334-
<h3>Compilation Instructions</h3>
335-
336-
<p>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.</p>
337-
338-
<p>
339-
The compiler binaries produced are "private" and
340-
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
341-
the components used by Visual Studio or other normal F# programs.
342324
</p>
343325

326+
<h3>Compilation Instructions</h3>
344327

345-
<h3>Notes on the build</h3>
346328

347329
<p>
348-
The prerequisites and build command line for compiling the source (on Windows) are shown
349-
later in this README. Here's the logic of the build:
350-
</p>
351-
<ul>
352-
<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>
353-
<li>
354-
We use this compiler to compile the source in this distribution, to produce a "proto" compiler, in the Proto
355-
directory. When run, this compiler still relies on the FSharp.Core.dll with version X.
356-
</li>
357-
<li>
358-
We use the proto compiler to compile the source for FSharp.Core.dll in this distribution, producing
359-
an FSharp.Core.dll with the version identified in src\source-build-version, usually 1.9.999.
360-
</li>
361-
<li>
362-
We use the proto compiler to compile the source for FSharp.Compiler.dll, fsc.exe, fsi.exe and other
363-
binaries found in this distribution. When run, these binaries will rely on the FSharp.Core.dll with version
364-
1.9.999. This is good, since it means the 1.9.999 binaries now form a consistent, bootstrapped compiler. If
365-
you like you should now be able to throw away the compiler with version X.
366-
</li>
367-
</ul>
368-
<p>
369-
Some additional tools are required to build the compiler, notably fslex.exe, fsyacc.exe,
370-
FSharp.PowerPack.Build.Tasks.dll, FsSrGen.exe, FSharp.SRGen.Build.Tasks.dll and the other
371-
tools found in the lkg directory. These are "Last Known Good" binaries created from a version of the F# Power Pack
372-
on CodePlex. If you like you can throw away these binaries and use your own compiled versions of these tools.
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.
373332
</p>
374333

375-
<h3>1. Building a Proto Compiler and the F# core library for .net 4.0, .net 2.0, and .net portable profile 47</h3>
334+
335+
<h3>1. Building a Proto Compiler</h3>
376336

377337
<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>
378338
<pre>
379339
cd src
380340
gacutil /i ..\lkg\FSharp-2.0.50726.900\bin\FSharp.Core.dll
381341
msbuild fsharp-proto-build.proj
342+
</pre>
343+
344+
<h3>2. Building an F# (Debug) library, compiler, type providers and unit tests</h3>
345+
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>
347+
<pre>
382348
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
383352
msbuild fsharp-library-build.proj /p:TargetFramework=net20
384353
msbuild fsharp-library-build.proj /p:TargetFramework=portable47
385-
</pre>
354+
</pre>
386355

387-
<h3>2. Building an F# (Debug) compiler for .NET 4.0 profile</h3>
388356

389-
<p>This uses the proto compiler to build the FSharp.Compiler.dll and fsc.exe to run on for Mono/.NET 4.0.</p>
357+
<h3>3. Running Tests</h3>
358+
359+
<p>
360+
First use the provided script to add the built FSharp.Core to the
361+
GAC, add required strong name validation skips, and NGen the compiler.
362+
Requires admin privileges.
363+
</p>
390364
<pre>
391-
msbuild fsharp-compiler-build.proj /p:TargetFramework=net40
392-
</pre><p>[Optional] Use the provided script to update the GAC, add required strong name validation skips, and NGen. Requires admin privileges.<pre>
393365
update.cmd debug -ngen
394366
</pre>
395367

396-
<h3>3. Verify the F# compiler build with simple smoke test</h3>
368+
<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>
369+
<pre>
370+
cd ..\tests
371+
BuildTestTools.cmd debug
372+
Runtests.cmd debug fsharp
373+
Runtests.cmd debug fsharpqa
374+
Runtests.cmd debug coreunit
375+
</pre>
376+
<p>
377+
For more details on how to run, debug, and write tests, see<ahref="tests\TESTGUIDE.html">tests\TESTGUIDE.html</a>.
378+
</p>
379+
397380

398-
<li>Simple FSI run and quit test.</li>
399-
<pre>
381+
<p>You can also use the F# compiler and F# interactive as follows:</p>
382+
383+
<pre>
384+
..\Debug\net40\bin\fsc.exe /help
385+
..\Debug\net40\bin\fsi.exe /help
400386
..\Debug\net40\bin\fsi.exe
401387
1 + 1;;
402388
#q;;
403-
</pre><li>Verify tool command lines</li><pre>
404-
..\Debug\net40\bin\fsi.exe /help
405-
..\Debug\net40\bin\fsc.exe /help
406-
407389
</pre>
408-
<li>Compile hello world.</li><pre>
390+
<p>Compile hello world.</p>
391+
<pre>
409392
echo printfn "hello world"> hello.fs
410393
..\Debug\net40\bin\fsc.exe hello.fs
411394
copy ..\Debug\net40\bin\FSharp.Core.dll .
@@ -414,64 +397,56 @@ <h3>3. Verify the F# compiler build with simple smoke test</h3>
414397
del /q FSharp.Core.dll
415398
</pre>
416399

417-
<h3>4. Building FSharp.Data.TypeProviders for .NET 4.0</h3>
418-
419-
<p>This uses the proto compiler to build the type provider assembly FSharp.Data.TypeProviders.dll for .NET 4.0.</p>
420-
<pre>
421-
msbuild fsharp-typeproviders-build.proj /p:TargetFramework=net40
422-
</pre>
423-
424-
<h3>5. Building F# Core Unit Tests for .NET 4.0</h3>
425-
426-
<p>This uses the proto compiler to build the unit tests that check some parts of FSharp.Core.dll and FSharp.Compiler.dll. You must have<ahref="http://nunit.org/?p=download">NUnit</a> (2.6.3 is known to work fine) installed.</p>
427-
<pre>
428-
msbuild fsharp-library-unittests-build.proj /p:TargetFramework=net40
429-
</pre>
430-
<p><b>Running Tests</b>
431-
<p>Below are the very basic commands you can use to execute the included unit tests and general compiler/runtime tests.
432-
For more details on how to run, debug, and write tests, see<ahref="tests\TESTGUIDE.html">tests\TESTGUIDE.html</a>.</p>
433-
434-
<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>
435-
<pre>
436-
cd ..\tests
437-
BuildTestTools.cmd debug
438-
Runtests.cmd debug fsharp
439-
Runtests.cmd debug fsharpqa
440-
Runtests.cmd debug coreunit</pre>
441-
442-
<h3>6. [Alternate Build Instructions] Build an optimised F# (Release) compiler for .NET 4.0 profile</h3>
400+
<h3>4. [Optional] Building and testing the "release" compiler</h3>
443401

444402
<p>This uses the proto compiler to build the FSharp.Compiler.dll and fsc.exe to run on for Mono/.NET 4.0.</p>
445403
<pre>
446404
msbuild fsharp-compiler-build.proj /p:TargetFramework=net40 /p:Configuration=Release
447-
</pre><p>[Optional] Use the provided script to update the GAC, add required strong name validation skips, and NGen. Requires admin privileges.<pre>
448-
update.cmd release -ngen
449405
</pre>
450406

451-
<h3>7. Verify the optimised F# compiler buildwithsimple smoke test</h3>
407+
<h3>5. [Optional] Open a solutionwithVisual Studio</h3>
452408

453-
<li>Simple FSI run and quit test.</li>
454-
<pre> ..\Release\net40\bin\fsi.exe
455-
1 + 1;;
456-
#q;;
457-
</pre><li>Verify tool command lines</li><pre>
458-
..\Release\net40\bin\fsi.exe /help
459-
..\Release\net40\bin\fsc.exe /help
460-
461-
</pre>
462-
<li>Compile hello world.</li>
463-
<pre>
464-
echo printfn "hello world"> hello.fs
465-
..\Release\net40\bin\fsc.exe hello.fs
466-
copy ..\Release\net40\bin\FSharp.Core.dll .
467-
hello.exe
468-
del /q hello.fs
469-
del /q FSharp.Core.dll
470-
</pre>
409+
<p>
410+
You can use "fsharp.sln" to browse source code using Visual Studio.
411+
However, you need to complete step 1) and 2) in order to properly
412+
open this solution. In addition, FSharp.Core.Unittests project requires NUnit installed.
413+
</p>
414+
415+
<h3>Notes on the build</h3>
471416

472-
<h3>8. [Optional] Open a solution with Visual Studio</h3>
417+
<p>
418+
The compiler binaries produced are "private" and
419+
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
420+
the components used by Visual Studio or other normal F# programs.
421+
</p>
422+
423+
<p>
424+
The prerequisites and build command line for compiling the source (on Windows) are shown
425+
later in this README. Here's the logic of the build:
426+
</p>
427+
<ul>
428+
<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>
429+
<li>
430+
We use this compiler to compile the source in this distribution, to produce a "proto" compiler, in the Proto
431+
directory. When run, this compiler still relies on the FSharp.Core.dll with version X.
432+
</li>
433+
<li>
434+
We use the proto compiler to compile the source for FSharp.Core.dll in this distribution, producing
435+
an FSharp.Core.dll with the version identified in src\source-build-version, usually 1.9.999.
436+
</li>
437+
<li>
438+
We use the proto compiler to compile the source for FSharp.Compiler.dll, fsc.exe, fsi.exe and other
439+
binaries found in this distribution. When run, these binaries will rely on the FSharp.Core.dll with version
440+
1.9.999. This is good, since it means the 1.9.999 binaries now form a consistent, bootstrapped compiler. If
441+
you like you should now be able to throw away the compiler with version X.
442+
</li>
443+
</ul>
444+
<p>
445+
Some additional tools are required to build the compiler, notably fslex.exe, fsyacc.exe,
446+
FSharp.PowerPack.Build.Tasks.dll, FsSrGen.exe, FSharp.SRGen.Build.Tasks.dll and the other
447+
tools found in the lkg directory. These are "Last Known Good" binaries created from a version of the F# Power Pack
448+
on CodePlex. If you like you can throw away these binaries and use your own compiled versions of these tools.
449+
</p>
473450

474-
<p> You can use "fsharp.sln" to browse source code using Visual Studio. However, you need to complete step 1) and 2) in order to properly open this solution. In addition, FSharp.Core.Unittests project requires NUnit installed.</p>
475-
<br>
476451

477452
</body>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp