fsharp / zarchive-fsharpbinding Goto Github PK
View Code? Open in Web Editor NEWArchive of F# Language Bindings for Open Editors
License: Other
Archive of F# Language Bindings for Open Editors
License: Other
We need the addin to work on multiple versions of MonoDevelop since Ubuntu locks you down to a particular version. The changes in b2fafe2 allow
make pack-all
This builds three .mpack files, currenlty one each for
- MonoDevelop 3.0.3.2 (the last apt-get on Ubuntu)
- MonoDevelop 3.0.4.7 (the Stable on Mac/Windows)
- MonoDevelop 3.0.5 (the Beta on Mac/Windows)
These are built against known MonoDevelop binaries in dependencies/...
Future updates to the binding can target these and/or other versions of MonoDevelop.
See twitter report https://twitter.com/ptrelford/status/256655959382962176
If it is possible, it would be nice to use F# tokenizer (from FSharp.Compiler.dll) to do the color highlighting. This would resolve issue with nested comments and it would correctly highlight #if-ed code.
See also: http://lists.ximian.com/pipermail/monodevelop-devel-list/2010-October/000324.html
When ever I try to create a new console project or tutorial project I get an Object reference not set to an instance of an object error. The complete details are as follows:
System.NullReferenceException: Object reference not set to an instance of an object
at Microsoft.FSharp.Compiler.FSharpCompiler..ctor (MonoDevelop.FSharp.FSharpCompilerVersion reqVersion) [0x00000] in :0
at <StartupCode$FSharpBinding>.$[email protected] (Microsoft.FSharp.Core.Unit unitVar) [0x00000] in :0
at Microsoft.FSharp.Control.LazyExtensions+Create@5709[Microsoft.FSharp.Compiler.FSharpCompiler].Invoke () [0x00000] in /home/kaz/src/fsharp/src/fsharp/FSharp.Core/prim-types.fs:5709
at System.Lazy`1[T].InitValue () [0x00000] in :0
Mono version: $ mono --version
Mono JIT compiler version 3.0.1 (master/b0c6dc1 Sun Nov 4 05:16:42 EST 2012)
Fsharpc version/header: $ fsharpc
F# Compiler for F# 3.0 (Open Source Edition)
Monodevelop version: 3.0.3.5
The F# templates say TargetFrameworkVersion="4.0" (just like many ASP.NET C# templates for example), but when they get created the projects are still targeting .NET 3.5
e.g. FSharpConsoleProjec.xpt.xml
<Project name = "${ProjectName}" directory = ".">
<Options ExternalConsole="True" TargetFrameworkVersion="4.0" />
Have gone over the MD code and just don't get why its not working.
Annoying because the user has to manually retarget to .NET 4.0 or 4.5 etc - a pain for MonoAndroidMonoTouch templates.
The template project files are also always initially in VS2008 format.
I am using MonoDevelop 3.0.3.2 on Ubuntu 12.04 with the F# language binding.
I built F# 3.0 compiler from source and fsharpc is in /usr/local/bin.
In preferences, F# Settings tab I have set the path of F# Compiler to /usr/local/bin/fsharpc .
However, when I build my project (just the Hello World console template) I can see in the build output that it is trying to use /usr/bin/fsc. This is a bad idea in my case, because my /usr/bin/fsc is the fast Scala compiler. That is why I like, told it to use the other path. Anyway it was really frustrating because it fails silently - it says "Build succeeded" but no exe is produced.
If I rename /usr/bin/fsc then it wakes up and uses the supplied setting.
Custom command line arguments provided in project options don't currently work with arguments that include spaces. For example, providing the custom command line arguments below causes the IntelliSense not to work:
-I:"C:\temp\foo bar\dir"
When I try to open .fs files from F# projects I get exception.
ERROR [2011-05-12 12:28:21Z]: System.TypeInitializationException: An exception was thrown by the type initializer for FSharp.MonoDevelop.LanguageService ---> System.TypeInitializationException: An exception was thrown by the type initializer for <StartupCode$FSharpBinding>.$LanguageService ---> System.TypeInitializationException: An exception was thrown by the type initializer for FSharpCompiler ---> System.TypeInitializationException: An exception was thrown by the type initializer for <StartupCode$FSharpBinding>.$FSharpCompiler ---> System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Compiler, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a19089b1c74d0809' or one of its dependencies. The system cannot find the file specified.
File name: 'FSharp.Compiler, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a19089b1c74d0809'
at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000] in :0
at System.AppDomain.Load (System.String assemblyString) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.AppDomain:Load (string)
at System.Reflection.Assembly.Load (System.String assemblyString) [0x00000] in :0
at <StartupCode$FSharpBinding>.$FSharpCompiler..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at Microsoft.FSharp.Compiler.Reflection+FSharpCompiler..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at Microsoft.FSharp.Compiler.SourceCodeServices+InteractiveChecker.Create (Microsoft.FSharp.Core.FSharpFunc`2 dirty) [0x00000] in :0
at FSharp.MonoDevelop.LanguageService..ctor () [0x00000] in :0
at <StartupCode$FSharpBinding>.$LanguageService..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at FSharp.MonoDevelop.LanguageService..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at FSharp.MonoDevelop.FSharpParser.Parse (MonoDevelop.Projects.Dom.Parser.ProjectDom dom, System.String fileName, System.String fileContent) [0x00000] in :0
at MonoDevelop.Projects.Dom.Parser.ProjectDomService.DoParseFile (MonoDevelop.Projects.Dom.Parser.ProjectDom dom, System.String fileName, System.String fileContent) [0x00000] in :0
at MonoDevelop.Projects.Dom.Parser.ProjectDomService.ParseFile (MonoDevelop.Projects.Dom.Parser.ProjectDom dom, System.String fileName, MonoDevelop.Projects.Dom.Parser.ContentDelegate getContent) [0x00000] in :0
at MonoDevelop.Projects.Dom.Parser.ProjectDomService.ParseFile (MonoDevelop.Projects.Dom.Parser.ProjectDom dom, System.String fileName) [0x00000] in :0
at MonoDevelop.Projects.Dom.Parser.ProjectDomService.GetParsedDocument (MonoDevelop.Projects.Dom.Parser.ProjectDom dom, System.String fileName) [0x00000] in :0
at MonoDevelop.SourceEditor.SourceEditorView.Load (System.String fileName, System.String encoding) [0x00000] in :0
at MonoDevelop.SourceEditor.SourceEditorView.Load (System.String fileName) [0x00000] in :0
at MonoDevelop.Ide.Gui.LoadFileWrapper.Invoke (System.String fileName) [0x00000] in :0
but FSharp.Compiler exist:
/usr/lib/mono/2.0/FSharp.Compiler.dll -> ../gac/FSharp.Compiler/2.0.0.0__b03f5f7f11d50a3a/FSharp.Compiler.dll
/usr/lib/mono/4.0/FSharp.Compiler.dll -> ../gac/FSharp.Compiler/4.0.0.0__b03f5f7f11d50a3a/FSharp.Compiler.dll
The previous MonoDevelop binding did its own build system by cracking the project files. This is now slowly being phased out and replaced by xbuild.
The problem is, we cant build this add in with xbuild without a small change. The old way of doing things gave a resource in a subdirectory such as
abc/def.xml
the name
def.xml
xbuild, however, uses the name
abc.def.xml
We should move to the right resource names.
In the code below, the emacs syntax highlighting is confused by '?'.
let ( *> ) (p: Parser<'a, 'u>) (q: Parser<'b, 'u>) : Parser<'a * 'b, 'u> =
p .>>? spaces .>>.? q
let ( **> ) (p: Parser<'a, 'u>) (q: Parser<'b, 'u>) : Parser<'a * 'b, 'u> =
p .>>.? q
Further:
The templates create projects referencing the F# 2.0 targets file at
$(MSBuildExtensionsPath32)\Microsoft F#\v4.0\Microsoft.FSharp.targets
The reasons for this are explained in FSahrpBinding.addin.xml.orig. However, this means new projects created using MonoDevelop on Windows can't use F# 3.0 features unless you either open with VS 2012 (which does an upgrade to F# 3.0) or manually change the targets reference to
$(MSBuildExtensionsPath32)\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
which is the F# 3.0 targets file.
On Linux and Mac it doesn't matter since even if you use the F# 2.0 targets file you still get F# 3.0 if F# 3.0 is installed.
We should consider switching to assume F# 3.0 in the templates once we can safely assume all users of the binding have F# 3.0 installed.
p.s. unfortunately it seems difficult to make templates which are neutral
It appears to miss out some of the resource files at the moment. Building via xbuild works fine.
Currently, it is possible to debug F# projects when running MonoDevelop on .NET on Windows. Debugging using the command-line Mono debugger ("mdb") also works on Linux, but not from the MonoDevelop IDE. We need to find out what needs to be done in order to support debugging in MonoDevelop IDE.
The implementation of the FSharpBinding DLL has template and icon resources in folders.
This gives inconsistent resource names between mono/MonoDevelop/xbuild and .NET/Windows/VisualStudio/msbuild. There is a bug about this here: fsharp/fsharp#50.
A partial workaround in F# 3.0 xbuild support has been submitted, but for now it is just much wiser not to use resources in folders when you want project portability between these two toolchains. It looks a little ugly but is not too bad.
When installing F# Language Integration from a web/local repository (using the mrep package), you can get an exception when opening the "View" menu.
Steps to reproduce:
Result A dialog window with exception is shown. The exception occurs somewhere in FSharpInteractivePad.CurrentPad member.
When I am editing a FSX file in MonoDevelop and then want to execute some code in the F# interactive then I assume that I should put the cursor on the line in the FSX file that I want to execute and then press Alt-Enter.
This do not execute code in the interactive prompt. I experience either
Any suggestion to as what I do wrong?
The error details:
System.InvalidOperationException: An item with id 'FSharp.MonoDevelop.FSharpInteractivePad' already exists.
at MonoDevelop.Components.Docking.DockFrame.AddItem (System.String id) [0x00048] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrame.cs:197
at MonoDevelop.Ide.Gui.DefaultWorkbench.AddPad (MonoDevelop.Ide.Codons.PadCodon padCodon, System.String placement, DockItemStatus defaultStatus) [0x00089] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs:1281
at MonoDevelop.Ide.Gui.DefaultWorkbench.AddPad (MonoDevelop.Ide.Codons.PadCodon content, Boolean show) [0x0004c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs:483
at MonoDevelop.Ide.Gui.DefaultWorkbench.AddPad (MonoDevelop.Ide.Codons.PadCodon content) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs:453
at MonoDevelop.Ide.Gui.Workbench.AddPad (MonoDevelop.Ide.Codons.PadCodon content) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs:305
at MonoDevelop.Ide.Gui.Workbench.AddPad (IPadContent padContent, System.String id, System.String label, System.String defaultPlacement, IconId icon) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs:311
at MonoDevelop.FSharp.FSharpInteractivePad.get_CurrentPad () [0x00000] in :0
at MonoDevelop.FSharp.SendSelection.Update (MonoDevelop.Components.Commands.CommandInfo info) [0x00000] in :0
at MonoDevelop.Components.Commands.CommandHandler.InternalUpdate (MonoDevelop.Components.Commands.CommandInfo info) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandHandler.cs:47
at MonoDevelop.Components.Commands.CommandManager.DefaultUpdateCommandInfo (MonoDevelop.Components.Commands.ActionCommand cmd, MonoDevelop.Components.Commands.CommandInfo info) [0x00079] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1257
at MonoDevelop.Components.Commands.CommandManager.GetCommandInfo (System.Object commandId, MonoDevelop.Components.Commands.CommandTargetRoute targetRoute) [0x001a9] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1223
Can this binding respect the default F# Interactive as set in Monodevelop preferences? I have F# 3.0 installed in /usr/local/lib/mono/..., symlinked as ~/bin/fsi, and would like to use that for F# 3.0 REPL. Do I really have to rebuild the binding to change F# version in MonoDevelop F# REPL?
I use next patch to use .NET 4.0 and to fix error with Mono.Unix:
--- configure.sh 2011-07-23 11:32:58.000000000 +0400
+++ configure.sh 2011-07-23 11:36:06.226984026 +0400
@@ -23,7 +23,5 @@
echo ""
echo "Press enter to continue..."
-read a
-
# ------------------------------------------------------------------------------
# Parse command line arguments and specify default values
@@ -83,12 +81,12 @@
MDDIR=$RESULT
echo "Successfully found MonoDevelop root directory." $MDDIR
-PATHS=( /usr/lib/fsharp /usr/local/lib/fsharp /opt/mono/lib/mono/2.0 )
+PATHS=( /usr/lib/mono/4.0 /usr/lib/fsharp )
searchpaths "F#" FSharp.Core.dll PATHS[@]
FSDIR=$RESULT
echo "Successfully found F# root directory." $FSDIR
-PATHS=( /usr/lib/mono/2.0 /Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/2.0 /opt/mono/lib/mono/2.0 )
+PATHS=( /usr/lib/mono/4.0 )
searchpaths "Mono" mscorlib.dll PATHS[@]
MONODIR=$RESULT
echo "Successfully found Mono root directory." $MONODIR
@@ -135,3 +132,4 @@
sed "s,INSERT_CSHARP_COMPILER,$GMCS,g" Makefile.1 > Makefile.2
rm Makefile.1
mv Makefile.2 Makefile
+
--- Makefile.orig 2011-07-29 19:16:55.000000000 +0400
+++ Makefile.orig 2011-07-29 19:18:10.000000000 +0400
@@ -59,5 +59,5 @@
REFERENCES = \
-r:$(MONOBIN)/mscorlib.dll \
- -r:System.dll -r:System.Xml.dll \
+ -r:System.dll -r:System.Xml.dll -r:Mono.Posix.dll \
-r:$(MDBIN)/MonoDevelop.Core.dll \
-r:$(MDBIN)/MonoDevelop.Ide.dll \
--- src/Services/FSharpCompiler.fs 2011-07-29 19:16:55.000000000 +0400
+++ src/Services/FSharpCompiler.fs 2011-07-29 19:18:10.000000000 +0400
@@ -74,7 +74,7 @@
/// Wrapper type for the 'FSharp.Compiler.dll' assembly - expose types we use
type FSharpCompiler private () =
- static let asm = Assembly.Load("FSharp.Compiler, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a19089b1c74d0809")
+ static let asm = Assembly.Load("FSharp.Compiler, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
static member InteractiveChecker = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.InteractiveChecker")
static member IsResultObsolete = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.IsResultObsolete")
static member CheckOptions = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions")
@@ -84,7 +84,7 @@
/// Wrapper type for the 'FSharp.Compiler.Server.Shared.dll' assembly - expose types we use
type FSharpCompilerServerShared private () =
- static let asm = Assembly.Load("FSharp.Compiler.Server.Shared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a19089b1c74d0809")
+ static let asm = Assembly.Load("FSharp.Compiler.Server.Shared, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
static member InteractiveServer = asm.GetType("Microsoft.FSharp.Compiler.Server.Shared.FSharpInteractiveServer")
// --------------------------------------------------------------------------------------
But when I compile I'm getting next errors:
Successfully found MonoDevelop root directory. /usr/lib/monodevelop
Successfully found F# root directory. /usr/lib/mono/4.0
Successfully found Mono root directory. /usr/lib/mono/4.0
Successfully found Gtk# root directory. /usr/lib/mono/gtk-sharp-2.0
Successfully found Glib# root directory. /usr/lib/mono/gtk-sharp-2.0
Successfully found Atk# root directory. /usr/lib/mono/gtk-sharp-2.0
Successfully found Gdk# root directory. /usr/lib/mono/gtk-sharp-2.0
Successfully found Pango root directory. /usr/lib/mono/gtk-sharp-2.0
>>> Source configured.
>>> Compiling source in /tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999 ...
make -j5
mkdir -p bin
gmcs -debug+ -out:bin/FSharpBinding.Gui.dll -target:library -r:/usr/lib/mono/4.0/mscorlib.dll -r:System.dll -r:System.Xml.dll -r:Mono.Posix.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Core.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Ide.dll -r:/usr/lib/monodevelop/bin/Mono.TextEditor.dll -r:/usr/lib/mono/4.0/FSharp.Core.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Interactive.Settings.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Server.Shared.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll src/Gui/FSharpBuildOrderWidget.cs src/Gui/FSharpSettingsWidget.cs src/Gui/FSharpCompilerOptionsWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpBuildOrderWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpSettingsWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpCompilerOptionsWidget.cs src/Gui/gtk-gui/generated.cs
fsharpc --noframework --debug --optimize- --target:library -r:bin/FSharpBinding.Gui.dll --out:bin/FSharpBinding.dll -r:/usr/lib/mono/4.0/mscorlib.dll -r:System.dll -r:System.Xml.dll -r:Mono.Posix.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Core.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Ide.dll -r:/usr/lib/monodevelop/bin/Mono.TextEditor.dll -r:/usr/lib/mono/4.0/FSharp.Core.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Interactive.Settings.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Server.Shared.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll --resource:src/Resources/FSharpBinding.addin.xml --resource:src/Resources/EmptyFSharpSource.xft.xml --resource:src/Resources/EmptyFSharpScript.xft.xml --resource:src/Resources/FSharpConsoleProject.xpt.xml --resource:src/Resources/fsharp-icon-32.png --resource:src/Resources/fsharp-script-32.png --resource:src/Resources/fsharp-file-icon.png --resource:src/Resources/fsharp-project-icon.png --resource:src/Resources/fsharp-script-icon.png --resource:src/Resources/FSharpSyntaxMode.xml src/PowerPack/CodeDomVisitor.fs src/PowerPack/CodeDomGenerator.fs src/PowerPack/CodeProvider.fs src/PowerPack/LazyList.fsi src/PowerPack/LazyList.fs src/Services/Mailbox.fs src/Services/Parameters.fs src/Services/FSharpCompiler.fs src/Services/CompilerLocationUtils.fs src/Services/Common.fs src/Services/Parser.fs src/Services/LanguageService.fs src/Services/CompilerService.fs src/Services/InteractiveSession.fs src/FSharpInteractivePad.fs src/FSharpOptionsPanels.fs src/FSharpSyntaxMode.fs src/FSharpResourceIdBuilder.fs src/FSharpLanguageBinding.fs src/FSharpParser.fs src/FSharpTextEditorCompletion.fs src/FSharpResolverProvider.fs
Microsoft (R) F# 2.0 Compiler build (private)
Copyright (c) 2002-2010 Microsoft Corporation. All Rights Reserved.
/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/PowerPack/CodeDomGenerator.fs(248,44): warning FS0044: This construct is deprecated
/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Parameters.fs(45,14): error FS0855: No abstract or interface member was found that corresponds to this override
/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Parameters.fs(51,14): error FS0855: No abstract or interface member was found that corresponds to this override
/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Common.fs(11,11): error FS0039: The namespace 'Addins' is not defined
/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Common.fs(381,39): error FS0039: The namespace or module 'AddinManager' is not defined
/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Common.fs(383,9): error FS0039: The namespace or module 'AddinManager' is not defined
/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Common.fs(397,39): error FS0039: The namespace or module 'AddinManager' is not defined
/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Common.fs(399,9): error FS0039: The namespace or module 'AddinManager' is not defined
/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/FSharpSyntaxMode.fs(10,21): error FS1108: The type 'Context' is required here and is unavailable. You must add a reference to assembly 'Mono.Cairo, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'.
make: *** [all] Error 1
emake failed
I use Gentoo amd64, mono-2.10.5, monodevelop-2.6 and last fsharp from master branch.
The current implementation ignores the option "Generate XML documentation" in F# compiler settings. This should be implemented - optionally, we may add a text box for specifying the XML file path name (or just use the output directory).
According to Tomas's blog, the code does not compile for Monodevelop 2.6. It looks it is true.
running the make clean command results in the clean target running in a loop.
platform: OSX/ MonoDevelop
After running a successful:
./configure
make
I get the following when running make install:
MonoDevelop Add-in Setup Utility
ERROR: The package 'Core v3.0.5' could not be found in any repository
ERROR: The package 'Ide v3.0.5' could not be found in any repository
ERROR: The package 'SourceEditor2 v3.0.5' could not be found in any repository
ERROR: The package 'Refactoring v3.0.5' could not be found in any repository
Not all dependencies could be resolved.
make: *** [install] Error 255
Im running on a Mac with MonoDevelop 3.0.4.7.
Is the install process different now or is something broken?
In the solution explorer view each FSharp.Core reference shows as "unresolved"
This doesn't seem to be a blocking problem (you can still build) but it looks bad.
When opening an FS file that has references to other libraries and files (from the project context), we should not display all errors. Note: Investigate how this works in Visual Studio
While investigating a type provider issue I noticed that intellisense was extremely laggy and even completely absent on nested functions.
Take the following type provider snippet:
let internal typedAppSettings (ownerType:TypeProviderForNamespaces) (cfg:TypeProviderConfig) =
let appSettings = erasedType<obj> thisAssembly rootNamespace "AppSettings"
appSettings.DefineStaticParameters(
parameters = [ProvidedStaticParameter("configFileName", typeof<string>)],
instantiationFunction = (fun typeName parameterValues ->
match parameterValues with
| [| :? string as configFileName |] ->
let typeDef = erasedType<obj> thisAssembly rootNamespace typeName
try
let filePath = findConfigFile cfg.ResolutionFolder configFileName
let fileMap = ExeConfigurationFileMap(ExeConfigFilename=filePath)
let appSettings = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None).AppSettings.Settings
let timer = new System.Timers.Timer(10000.0)
timer.Elapsed.Add (fun _ -> ownerType.Invalidate())
watchForChanges ownerType filePath
for key in appSettings.AllKeys do
let field =
match (appSettings.Item key).Value with
| Int fieldValue -> ProvidedLiteralField(niceName key, typeof<int>, fieldValue)
| Bool fieldValue -> ProvidedLiteralField(niceName key, typeof<bool>, fieldValue)
| Double fieldValue -> ProvidedLiteralField(niceName key, typeof<float>, fieldValue)
| fieldValue -> ProvidedLiteralField(niceName key, typeof<obj>, fieldValue)
field.AddXmlDoc (sprintf "Returns the value from %s with key %s" configFileName key)
field.AddDefinitionLocation(1,1,configFileName)
typeDef.AddMember field
typeDef
with
| exn -> typeDef
| x -> failwithf "unexpected parameter values %A" x))
appSettings
Saying that, I have just checked now and the lag is not too bad, maybe this is a slow leakage problem.
I did notice MonoDevelop consuming a large amount of ram and I have had issues with fsi consuming 100% cpu at times too even though I was not using it.
I have encountered a path error on Windows 7, and found a possible solution. When trying to compile, the compiler gives an error over the following paths:
-r:C:\Program Files (x86)\FSharp-2.0.0.0\bin\FSharp.Core.dll
-r:"C:\Program Files (x86)\FSharp-2.0.0.0\bin\FSharp.Core.dll"
The first line seems to be the problem, not wrapping the line. I solved the issue by replacing line 299 in src/Services/Common.fs:
let wrapf = if shouldWrap then wrapFile else id
with
let wrapf = if shouldWrap then wrapFile else wrapFile
and getting
-r:"C:\Program Files (x86)\FSharp-2.0.0.0\bin\FSharp.Core.dll"
-r:"C:\Program Files (x86)\FSharp-2.0.0.0\bin\FSharp.Core.dll"
thus ensuring it is always wrapped. I have tested the solution on Debian and Windows 7, and it seems to work fine. If the fix is fine, I would suggest it is committed to master.
Having a depth coloriser for MonoDevelop would be epic, I always use that extension in Visual Studio.
no docs coming from .XML files are being shown in tooltips, completion lists etc.
Using the latest version from MELPA, I receive this error message if I try to visit an F# buffer with C-x C-f
before calling run-fsharp
. Maybe fsharp-mode could be modified to call run-fsharp
on visiting a buffer if the *inferior-fsharp*
buffer doesn't exist yet? (Or just use a default value for fsharp-indent-offset
?). Just my 2c but I think this error will annoy a lot of people.
It should refer to at least the VS2010 or VS2012 targets file
debugging a hello world on windows fails
Start with debugging gives COMException (0x80070032)
Not sure of the status of xbuild support, supposedly it is much improved in Mono 3.0.
We need to see if it is ok and if we should use it instead of all the current hacking we do.
If you open a .fsproj, then a .sln is create alongside it
Annoyingly, this .sln doesn't actually contain the .fsproj (it opens as empty), but when you go to open the .fsproj again, the empty .sln is opened instead. You have to manually delete the empty .sln before you can open the .fsproj.
This applies even if there is a .sln in the directory above (which Visual Studio would normally open)
Assume this is F# specific
Emacs F# mode has tab-to-indent, and MonoDevelop has Smart Indent for C#. It would be great to have Smart Indent for F#.
Currently uses fsc .fs which isn't that useful for real projects.
When using MonoDevelop with the F# Language Binding add-in, the order the files are compiled in the project seems wrong.
I opened the frack project in monodevelop and it seems to get compiled in the same order the project appears in in the solution window:
(for some reason this image won't embed: http://img828.imageshack.us/img828/3397/201012192119531680x1050.png)
This causes a compile error as the Application.fs files refers to types defined in the other files, and should come later in the compilation.
In Visual Studio, it compiles cleanly, and looks like this:
The project file has the files listed like this:
<ItemGroup>
<Compile Include="BaseSpecs.fs" />
<Compile Include="EnumerableStream.fs" />
<Compile Include="ByteString.fs" />
<Compile Include="ArraySpecs.fs" />
<Compile Include="Utility.fs" />
<Compile Include="UriSpecs.fs" />
<Compile Include="Request.fs" />
<Compile Include="RequestSpecs.fs" />
<Compile Include="Response.fs" />
<Compile Include="Application.fs" />
<Compile Include="Extensions.fs" />
<Compile Include="Middleware.fs" />
</ItemGroup>
I am not sure if this a problem with MonoDevelop or the F# binding but I thought this would be the right place to start discussing.
MD likes to rewrite "true" to "True".
That's annoying as it causes churn in source control.
There are no .xml files for mscorlib.dll etc. on mono, so no docs are showing
Have asked on mono-list about this
I get the above error when calling M-x fsharp-mode. It happens on Windows 7.
When executing code using Alt+Enter (Mac) or Ctrl+Enter (Linux) in F# Interactive and the code contains some error, the error is reported in a file "stdin". In Visual Studio, errors are reported relatively to the source file - we should get the same experience (but I'm not sure how this is done in VS).
The Emacs mode sends the line location together with the input code. That was pretty easy to do, it's something like:
#42 "filename.fs"
Type providers appear to work initially but on compilation non defined member errors are shown.
This effects MonoDevelop 3.05 stable and 3.06 beta. This is with the 3.2.10 binding from the gallery.
Could this be related to compilation order as intellisense works ok. Its as if the compilation phase is not getting the generated output from the type provider.
Its possible that this may be a fault in the fsharpx type providers as the Regex, Maths, and freebase providers seem to compile ok. This could simply be a cross platform issue for fsharpx. If so I can move this issue over there...
this feature would be great, I wondered if the recent refactoring might make this easier?
But the highlight and building works.
I had a project that originally used the built-in build order, but I eventually switched to xbuild, because I use FsLex and FsYacc. And I repeatedly ran into intellisense yelling at me, that modules were not defined, the build would work though.
prior to this commit, there were the problems
After searching for the reason, i found, that apparently the intellisense takes the build order from the MonoDevelop project settings, rather than the build order in the PropertyGroup.
As a work-around, I just manually set the build order equal to the one of the xbuild and that fixed the issue (with the commit, I gave the link)
I was trying to pass the (*) function as an argument and the syntax highlighting made the rest of the file be a block comment. In fact, the compiler says the following
( * ) => ok for the compiler and syntax highlighting
(* ) => nok for both, it is in fact an unfinished block comment
(*) => ok for the compiler, but the syntax highlighting sees this as a block comment until the end of the file
Workaround: write ( * ) instead of (*)
The configure script needs to take a --prefix argument to allow you to use Mono 2.10 or other build of Mono and the F# compiler (rather than hard-wiring /opt/mono - I am using /opt/mono-2.10)
(It could also be renamed from "configure.sh" to "configure" to be more like all the other mono packages?)
Add a Resolve namespace menu item to the context menu when over a value or symbol underlined in red that is undefined but is a type of method defined in the project's:
(a) referenced assemblies
(b) implementation
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.