- Notifications
You must be signed in to change notification settings - Fork0
The F# Compiler, Core Library & Tools (F# Software Foundation Repository)
License
MIT, MIT licenses found
Licenses found
Pateldisolution/fsharp-1
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository is theF# Software Foundation repository for F#, as described inthe mission statement of the Foundation:
The F# Software Foundation... maintains a core open-source F# code repository and distributions made available to the public free of charge for use across multiple platforms. This includes the F# compiler, F# language specification, the F# core library and assorted tools and applications.
The process for contributing to the F# Compiler, Core Library and Tools is describedhere.
The main day-to-day purpose of this repository is to deliver extra packagings of the F# compiler, core library and core tools for use in different settings. This repo accepts direct contributions related to the cross-platform packaging of F#. Most other contributions to the F# compiler/library/tools go first via theupstream repository which is also used to package the Visual F# Tools and .NET SDK tooling for F#. This repo mirrors the core implementation of the F# language from the upstream repository. This arrangement ensures that versions do not diverge, and that very extensive QA is done on all core contributions.
The F# community use this repo and others to publish these components:
FSharp.Compiler.Tools NuGet package (published from this repo)
FSharp.Compiler.Service NuGet package (published fromderivative repo)
Fable, the F# compiler for JavaScript, published from its own repo but using FSharp.Compiler.Service NuGet package
“fsharp” Debian Linux packages for F# + Mono (published fromderivative repo)
Linuxbrew package which works on all distributions, as part oftheir mono package
“fsharp” as bundled in macOS tooling for F# + Mono by Xamarin and installed either fromthe Mono Project Download page or via homebrew cask as part of the
mono-mdkcask (brew cask install mono-mdk). The mono repository includes F# into Mono itself usingthis script, note that some patches may be added as defined by that script.“fsharp” docker image (published fromrelated repo)
“fsharp” homebrew formula (published as part ofthe mono homebrew formula)
other packagings such as: theF# support in Jupyter Notebooks - iFSharp; the F# support in Azure Functions; andWebSharper all using the FSharp.Compiler.Service NuGet package
See notes below for most of these. Because the core logic of F# is made available asa library component, an unlimited number of other packagings of F# are possible. Please contribute additional notes to thisREADME.md if you are packaging F# for other settings.
If you are using Windows, you should normally fork theupstream repository repo and contribute directly there. Your contributions will then be merged into this repo.
If you are using Linux or macOS, you can contribute directly toupstream repository if you like. Some CI for that repo runs on Linux. Your contributions will then be merged into this repo. Alternatively, you can prepare your contributions by forking this repository (the code is essentially the same). This will give you access to some additional testingavailable from this repo.
Themaster branch is for F# 4.x. To bootstrap the compiler, binaries built from an earlier version of this project are used. This codebase uses the Apache 2.0 license.
| F# | Branch | macOS/Linux | Windows |
|---|---|---|---|
| 4.1+ | master | ![]() | |
| 4.0 | fsharp4 | ![]() |
The FSharp.Core NuGet package was previously published from this repo.With the consent of the F# Software Foundation this package is now published by Microsoft.
- FSharp.Core.dll for .NET Framework/Mono
- FSharp.Core.dll for .NET Standard
This repo is currently used to makethe FSharp.Compiler.Tools NuGet package. This package includes the following for both .NET Core and .NET Framework/Mono:
- the F# compiler
fsc.exe - F# Interactive
fsi.exe - build support,
- a copy of FSharp.Core used to run the tools
- related DLLs.
The NuGet packages are exactly the ones produced by AppVeyor CI, e.g.for version 4.1.2. They are pushed tohttps://nuget.orgby someone with appropriate permissions.
TheFSharp.Compiler.Tools NuGet package can be used if you wish to use the latest F# compiler on a computer without relying on the installed version of Visual Studio.Adding it via NuGet to a project will override the in-box compiler with the compiler from the NuGet package.Note: you will need to manually modify your project file once (seefsharp#676).
Usage: Seehttp://fsharp.org/use/linux
apt-get install fsharpSeethe mono packaging repo, which is a downstream variant of this repo, where this package is actually made.
- There is a tag for each upstream source tag
- There is a tag for each "debianized" package
- Packaging metadata lives in debian/
- install files are files installed to disk
- cligacinstall are GAC-installed libraries
controlis the manifest of packages- rules is the Makefile which handles build/install.
Jo Shields (@directhex) has done much of this work and says:
I tend to only update the published packages when a) the same update has already been pulled in on Mac by Jason, and either b) something breaks horribly in the existing version on a new Mono, or c) someone explicitly asks me to.
Linux package delivery is (now) based on packages built on our public Jenkins instance, and published automatically as a post-build step, based on two inputs - a Git repository in standard Debian git packaging format (whichhttps://github.com/mono/linux-packaging-fsharp already is), and a tarball to consider as the canonical source of the next release (giving the same tarball in subsequent builds is how you indicate packaging-only changes such as alterations to metadata in debian/)
Alexander Köplinger has admin access to Jenkins, SSH access to the Jenkins and repository servers, and has taken care of things for me in my absence in the past (but isn't a Debian packaging expert, so would be trusting that metadata changes are solid)
F# is packaged as part of Mono on macOS. Jason Imison says:
We use a system called BockBuild that pushes versions of F# (sometimes with patches) out with Mono for macOS (F# is bundled with mono here, not a separate package).
You can see an example build script here (if you have access, ping me if not)https://github.com/xamarin/bockbuild/blob/2017-02/packages/fsharp.py. Unfortunately, you need to know the branch name here – 2017-02 is what is going to be released with VS for Mac aka Mono 4.9.x
We build fsharp/fsharp internally so that we’re not dependent on you pushing out fixes / bumping packages. Miguel de Icaza likes to ‘own’ the code that we ship precisely to stop these kind of emergency issues.
@cartermp says:
For future reference,dependencies and code for the F# editing and F# Interactive support in Visual Studio for Mac/Xamarin Studio is here
A feed of NuGet packages from builds is available from AppVeyor using the NuGet feed:https://ci.appveyor.com/nuget/fsgit-fsharp
If using Paket, add the source at the top ofpaket.dependencies.
source https://www.nuget.org/api/v2source https://ci.appveyor.com/nuget/fsgit-fsharpAdd the dependency onFSharp.Core and runpaket update. See the AppVeyorbuild history for a list of available versions. Here are some options for specifying the dependency:
nuget FSharp.Corenuget FSharp.Core prereleasenuget FSharp.Core 3.1.2.3nuget FSharp.Core 3.1.2.3-b208If using NuGet Package Manager, add the source to the list of available package sources.
Building F# on Unix-type platforms requiresMono 5.0 or higher.
makesudo make installThat build and installs optimized binaries. To make debug, usemake Configuration=Debug
Building on macOS requires an install of the latest Visual Studio for Mac tools or Mono package.
makesudo make installThat build and installs optimized binaries. To make debug, usemake Configuration=Debug
Install.NET 4.5.1.
Build using:
mono\build.batThis builds the proto compiler, then the library, then the final compiler.
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\.NETFramework\v4.0\...vagrant upvagrant sshcd /vagrantsudo apt-get install mono-completemakesudo make installTo integrate latest changes fromhttps://github.com/Microsoft/visualfsharp, first understand that this repo isbasically a cut-down version of "visualfsharp" with these (and other) files striped out:
fcs: these files are specific to the F# compiler servicevsintegration: this repos does not contain any of the Visual Studio IDE toolingtests/fsharpqa: this repo does not undergo the full QA test process, so tests that are not run are strippedtests/service: this repo does not run the FSharp.Compiler.Service testssetup: these files are specific to the VS packaging of F#src/buildfromsource: support for the .NET SDK build-from-source, not needed in this repoTESTGUIDE.md: support for the .NET SDK build-from-source, not needed in this repo
To integrate latest changes fromhttps://github.com/Microsoft/visualfsharp, first fork + clone, then use
git checkout mastergit pull https://github.com/fsharp/fsharp mastergit checkout -b NAMEOFBRANCHChoose a different branch name as necessary. Then choose a visualfsharp commit to integrate up to. Normally just try:
git pull https://github.com/Microsoft/visualfsharp masterbut if you run into trouble reset and try again at a specific hash. Then remove stripped files:
git rm -fr --ignore-unmatch vsintegration setup tests/fsharpqa tests/service TESTGUIDE.md src/buildfromsource* fcs netci.groovy src/fsharp/FSharp.Compiler.nuget scripts/dotnet-install.sh before_install.sh build.cmd build.sh src/fsharp/FSharp.Compiler.Private src/fsharp/FSharp.Core.nuget src/fsharp/Fsc/project.json src/fsharp/fsi/project.json tests/EndToEndBuildTests tests/FSharp.Core.UnitTests/project.json DotnetCLIToolsVersion.txt DEVGUIDE.md FSharpBuild.Directory.Build.targets VisualFSharp.sln src/fsharp/FSharp.Build/project.jsonthen
git statusand resolve any remaining conflicts. Resolving conflicts should normally be easy, but anything inUnmerged paths may need attention:
- Files "deleted by us" indicate a stripped file has been changed. We don't care about those, so generally add them to the
git rm -frline above, orgit rm -fthem one by one. To remove them all in one go on macOS or Linux,git status | grep "deleted by us" | awk '{print $4}' | xargs git rm. - Outright conflicts will need work and may indicate some change in this repository hasn't yet gone back to
visualfsharp
One you're happy, commit any changes you needed to make
git commit -a -m "integration from visualfsharp master"git push origin NAMEOFBRANCHthen submit the PR to this repo calling it "integration from visualfsharp master" and wait until it's green.
Tagging a release
Add a tag by updating the version number in
mono\appveyor.ps1and editing the release notes in
CHANGELOG-fsharp.mdeither by a new PR or as part of the integration PR. Then apply the tag as follows (if you have push permission)
git tag YOURTAGgit push https://github.com/fsharp/fsharp --tagsReleasing FSharp.Compiler.Tools nuget
After the AppVeyor CI for the tag is green the Artifacts folder of the CI will contain the FSharp.Compiler.Tools nuget package release. You can download and push this package to nuget manually.
set APIKEY=....nuget\nuget.exe push Downloads\FSharp.Compiler.Tools...nupkg %APIKEY% -Source https://nuget.orgWe only generally push packages coming from AppVeyor CI and not locally built packages.
Improving this
- Work out how to fully automate easy integrations?
- Work out how to pick up the version tag rather than having it in
appveyor.ps1? - Automate more of the release process?
A continuous integration build is set up with Travis and AppVeyor. See above.
Historically it is difficult to edit the compiler with Xamarin Studio or MonoDevelop because of bugs in loading the hand-edited project files and targets used in the F# compiler build. These are generally in the process of being fixed, your mileage will vary.
Only a subset of the tests are currently enabled.
After building and installing, run
cd tests/fsharp/core./run-all.shSee theTESTGUIDE.md for instructions for how to test on Windows. Use that repositoryto develop and test on Windows.
F# compiler sources as initially dropped are available fromfsharppowerpack.codeplex.com.
On 4 April 2014, Microsoft Open Tech published the F# compiler sources athttp://visualfsharp.codeplex.com and beganaccepting contributions to the F# compiler/library and tools.
In 2016 the Microsofthttp://visualfsharp.codeplex.com repo moved to GitHub athttps://github.com/Microsoft/visualfsharp.
This repository 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. Y
The maintainers of this repository appointed by the F# Core Engineering Group are:
- Enrico Sada,Don Syme
- with help and guidance fromTomas Petricek,Robin Neatherway,Cameron Taggart,Dave Thomas,Jo Shields,Kevin Ransom andHenrik Feldt and many others
About
The F# Compiler, Core Library & Tools (F# Software Foundation Repository)
Resources
License
MIT, MIT licenses found
Licenses found
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Languages
- F#98.9%
- C#0.5%
- OCaml0.2%
- HTML0.2%
- Makefile0.1%
- Shell0.1%


