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

The F# Compiler, Core Library & Tools (F# Software Foundation Repository)

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
License.txt
NotificationsYou must be signed in to change notification settings

Pateldisolution/fsharp-1

 
 

Repository files navigation

This is the F# compiler, core library and core tools (open source edition). It uses the Apache 2.0 license.

Themaster branch is for the latest version of F# (currently F# 3.0).

To bootstrap the compiler, binaries built from an earlier version of this project are used.

Requires mono 2.9 or higher. Prefer Mono 3.0.

On OSX, requires automake 2.69. To install fromhomebrew:

brew install automake

Build status

F# 3.0 (branchmaster), Mono 3.x, OSX + some unit tests (Travis)Build Status

F# 3.0 (branchfsharp_30), Mono 3.x, OSX + some unit tests (Travis)Build Status

F# 3.1 (branchfsharp_31, Mono 3.x, OSX + some unit tests (Travis)Build Status

Mono 3.x (TeamCity)Build Status (Mono, TeamCity)

.NET 4.0, Windows (TeamCity)Windows .net 4.0 (TeamCity)

.NET 2.0 etc., Windows (TeamCity)Windows .net 2.0 etc.

Building

On Linux and other Unix systems:

The usual:

./autogen.shmakesudo make install

By default that makes optimized binaries. To make debug, usemake CONFIG=debug

On MacOS (OSX)

Use a prefix to your version of Mono:

./autogen.sh --prefix=/Library/Frameworks/Mono.framework/Versions/Current/makesudo make install

By default that makes optimized binaries. To make debug, usemake CONFIG=debug

On Windows, using msbuild (e.g.. if .NET is installed)

If you have only VS2012 installed, and not VS2010, you'll need to install the F# 2.0 Runtime (http://www.microsoft.com/en-us/download/details.aspx?id=13450)

cd srcmsbuild fsharp-proto-build.projngen install ..\lib\proto\4.0\fsc-proto.exe (optional)msbuild fsharp-library-build.proj /p:Configuration=Releasemsbuild fsharp-compiler-build.proj /p:Configuration=Release

You can also build the FSharp.Core for .NET 2.0, Mono 2.1, MonoTouch, Silverlight 5.0, Portable Profile47 (net45+sl5+win8), and XNA 4.0 for Xbox 360 profiles:

msbuild fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Releasemsbuild fsharp-library-build.proj /p:TargetFramework=mono21 /p:Configuration=Releasemsbuild fsharp-library-build.proj /p:TargetFramework=monotouch /p:Configuration=Releasemsbuild fsharp-library-build.proj /p:TargetFramework=portable-net45+sl5+win8 /p:Configuration=Releasemsbuild fsharp-library-build.proj /p:TargetFramework=sl5 /p:Configuration=Releasemsbuild fsharp-library-build.proj /p:TargetFramework=net40-xna40-xbox360 /p:Configuration=Release

You can also build the FSharp.Core and FSharp.Compiler.Silverlight.dll for Silverlight 5.0:

msbuild fsharp-library-build.proj /p:TargetFramework=sl5-compiler  /p:Configuration=Releasemsbuild fsharp-compiler-build.proj /p:TargetFramework=sl5-compiler /p:Configuration=Release

Change to /p:Configuration=Debug for debug binaries.

On Windows, using xbuild (e.g. if no .NET is installed and only Mono 3.0 is installed):

cd srcxbuild fsharp-proto-build.projxbuild fsharp-library-build.projxbuild fsharp-compiler-build.proj

Building using xbuild does not yet lay down a Mono-ready distribution (see src/fsharp/targets.make), so should onlybe used for private development rather than preparing distributions.

Strong Names

The FSharp.Core.dll produced is only delay-signed (Mono does not require strong names).If a strong-name signed FSharp.Core.dll is needed then use the one in

   lib\bootstrap\signed\3.0\v4.0\FSharp.Core.dll

What you get

Once built the main compiler binaries go inlib/release/4.0

There are versions of FSharp.Core for .NET 2.0, MonoAndroid, MonoTouch (Mono profile 2.1) inlib/release/2.0lib/release/2.1lib/release/2.1monotouch

On 'make install' the binaries etc. go in the prefix, e.g.

/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/2.0/FSharp.Core.dll/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/2.1/FSharp.Core.dll/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.0/fsc.exe/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.0/FSharp.Compiler.dll.../Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/fsc.exe/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/FSharp.Compiler.dll.../Library/Frameworks/Mono.framework/Versions/Current/lib/mono/gac/.../FSharp.Compiler.dll/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/gac/.../FSharp.Compiler.dll...

plus some files for xbuild support

/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/Microsoft\ F#/v4.0/*/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/Microsoft\ SDKs/F#/3.0/Framework/*

(these names are the canonical names for Microsoft.FSharp.Targets used by project files coming from Visual Studio)

plus scripts

/usr/bin/fsharpc (F# compiler)/usr/bin/fsharpi (F# Interactive)

Development notes

###Continuous Integration Build

We have a CI build set up with the JetBrains/Teamcity server as part of the F# community projects there:

http://teamcity.codebetter.com/project.html?projectId=project61&tab=projectOverview

@forki controls access. Right now this builds both a Mono 'make' install and a Windows 'cd src; msbuild fsharp-build.proj' build. No binaries are saved from the build, it is just for sanity checking.

###Editing the Compiler with Visual Studio or MonoDevelop

Openall-vs2012.sln, and edit in modes Debug or Release. The compiler takes a good while to compile and thatcan be a bit invasive to the work flow, so it's normally better to do the actual compilation fromthe command line, see above.

The F# support in MonoDevelop uses an in-process background compiler. On the Mac this causes pausing garbagecollections to kick in which makes editing the compiler in MonoDevelop awkward.

Building F# Core Unit Tests for .NET 4.x (optional)

This uses the proto compiler to build the unit tests that check some parts ofFSharp.Core.dll andFSharp.Compiler.dll. There is also another set of tests undertests\fsharp.

msbuild fsharp-library-unittests-build.proj /p:TargetFramework=net40

Note: You must have NUnit installed to build the unit tests.

Validation and Use

Here are some simple tests to validate what you have built by checkingfsi.exe (F# Interactive) starts up:

lib\debug\4.0\fsi.exe1 + 1;;\#q;;lib\debug\4.0\fsi.exe /helplib\debug\4.0\fsc.exe /helpecho printfn "hello world" > hello.fslib\debug\4.0\fsc.exe hello.fshello.exe

Running Compiler tests (on Windows)

There are language tests undertests\fsharp\core. The test apparatus is primitive and unfortunately uses batch files. You can run these on Windows using:

cd ..\tests\fsharp\core..\..\build-and-run-all-installed-ilx-configs.bat results.log

The results file will contain one entry for each test directory, plus any reported errors.

tests\fsharp\coretests\fsharp\core\queriesCustomQueryOpstests\fsharp\core\queriesLeafExpressionConverttests\fsharp\core\queriesNullableOperatorstests\fsharp\core\queriesOverIEnumerable...

Some tests for LINQ queries require SQL Server be installed. A failing test will look like this:

ERRORLEVEL=1: in tests\fsharp\core\csfromfs\build.bat

You can then go to the relevant directory and runbuild.bat andrun.bat.

History

F# compiler sources dropped by Microsoft are available fromfsharppowerpack.codeplex.com.

Uses bootstrapping libraries, tools and F# compiler. Thelib/bootstrap/X.0 directories contain mono-built libraries, compiler and tools that can be used to bootstrap a build. You can also supply your own via the--with-bootstrap option.

About

The F# Compiler, Core Library & Tools (F# Software Foundation Repository)

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
License.txt

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • F#98.9%
  • C#0.5%
  • OCaml0.2%
  • HTML0.2%
  • Makefile0.1%
  • Shell0.1%

[8]ページ先頭

©2009-2025 Movatter.jp