We hope at some point in the future to have a source release where this is easier to deal with.

In the mean time, see Tomas' response; all the pieces/components you need should be available, it just takes a bit of tinkering to get it all cobbled together to build.

By on 3/17/2010 3:34 PM ()

Hi,
I managed to build the F# compiler from the source, but I don't exactly remember the steps. However, here are a couple of pointers that should help.

  • First, you'll have to place the source code in some folder and you'll need to have a working version of the compiler in a directory that is located relatively in ..\lkg\FSharp-2.0.50726.900\bin. Once you get this working, you should be getting a different error.
  • Next, you'll need to get the FsSrGen tool from the F# PowerPack sources from CodePlex ( [link:fsharppowerpack.codeplex.com] ). Build this tool and copy it to the bin directory of the F# compiler (including FSharp.SRGen.Build.Tasks.dll and FSharp.SRGen.targets).

When I was building the project, there were also some other minor issues that had to be corrected, however things may have changed since then. Anyway, here is what I had to do:

  • After building FsSrGen build task, I tried compiling “proto” and it complained that “FsSrGen” task is missing a required parameter “OutputFsFile”. I don’t really know where this should be specified, so I changed the build task (FsSrGen.fs from CodePlex) to automatically generate name for the “FS” and “RESX” output files. Something like this (and I also removed [<Required>] attributes for these two):
1
2
3
4
if outputFsFile = null then outputFsFile <- inputFile.Replace(".txt", ".fs")
builder.AppendSwitchIfNotNull(" ", outputFsFile)
if outputResxFile = null then outputResxFile <- inputFile.Replace(".txt", ".resx")
builder.AppendSwitchIfNotNull(" ", outputResxFile)
  • After this, the tool worked fine and generated some outputs. When compiling any libraries that use the FsResGen task, it still complained that a namespace is missing (from the generated “FS” file), so it looks that the output files are not added to the build task to be compiled (“FS”) or embedded as a resource (“FSX”). I fixed it by hand by adding the two missing tasks:
1
2
3
4
5
6
7
<FsSrGen Include="..\FSInteractiveSettings.txt">
  <Link>FSInteractiveSettings.txt</Link>
</FsSrGen>
<EmbeddedResource Include="..\FSInteractiveSettings.resx" />
<Compile Include="..\FSInteractiveSettings.fs">
  <Link>FSInteractiveSettings.fs</Link>
</Compile>

This is partly based on a report I sent to fsbugs when I managed to compile it, so sorry for a chaotical structure of the reply :-). I believe that you should be able to get it working with this information - if you have any questions, feel free to ask - it would be great if you could post a more specific error message in that case.

By on 3/17/2010 3:27 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper