[MonoDevelop] F# and using a response file to pass options

Vasili I. Galchin vigalchin at gmail.com
Thu Mar 25 01:17:59 EDT 2010


passing an options file to my FSharpBinding (close to CSharp .... e.g.
FSharpBindingCompilerManager.cs mainly differs
     on building the fsc command line options!!:



                static int DoCompilation (string compilerName, string
compilerArgs, string working_dir, Dictionary<string, string> envVars,
List<string> gacRoots, ref string output, ref string error)
                {

                        output = Path.GetTempFileName();
                        error = Path.GetTempFileName();

                        StreamWriter outwr = new StreamWriter (output);
                        StreamWriter errwr = new StreamWriter (error);

                        ProcessStartInfo pinfo = new ProcessStartInfo
(compilerName, compilerArgs);   <<< 2nd parm to constructor
                        pinfo.WorkingDirectory = working_dir;


causes grief when doing a fsc build:

Error FS0226: The file extension of '/tmp/tmp25bc50f.tmp' is not recognized.
Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli.
(FS0226) (Console1)

Soon I will share a snapshot of what I have done.

Vasili


On Thu, Mar 25, 2010 at 12:11 AM, Michael Hutchinson <
m.j.hutchinson at gmail.com> wrote:

> On Thu, Mar 25, 2010 at 12:34 AM, Vasili I. Galchin <vigalchin at gmail.com>
> wrote:
> > Hello,
> >
> >       After my experimentation, reading "fsc --help" vs "csc -- help",
> and
> > some fsc source code (build.fs), I am not convinced that compile-time
> > command line options can be passed in a "response file" to fsc as in the
> > case of csc (i.e. CSharpBindingCompilerManager.cs:Compile). Am I wrong?
>
> I can't find anything about fsc response files in the MSDN docs or a
> quick googling, but it's probably worth testing whether the csc
> argument (@responsefilename) works. IIRC one of the reasons for
> response files is to work around the OS's maximum permitted length for
> program arguments.
>
> --
> Michael Hutchinson
> http://mjhutchinson.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20100325/dcba7894/attachment.html 


More information about the Monodevelop-list mailing list