[nem-en] What is additional_decls?

Kamil Skalski kamil.skalski at gmail.com
Sat Nov 18 14:15:38 CET 2006


The first thing I would like to say is... I'M REALLY IMPRESSED by the
VS integration. It is awesome - at last we have the cool language and
excellent IDE working together!

Of course I spotted several (quite minor at this point of project)
tweaks, but most are not important. I have one question however - what
makes the VS project a Nemerle project? I noticed that there is
Nemerle.Compiler.Utils.nproj file, but it does not open as Nemerle
project. There is however Nemerle.Compiler.Utils.csproj, which after
opening gets full Nemerle support (syntax highlighting + completion).
Some time ago I've created a csproj for my Nemerle application (it
just contains the references to .n files and uses Nemerle MSBuild for
compiling) - now if I open it, it gets syntax highlighting, but no
completion.

And now about the bug reproduction. I successfully opened the
Nemerle.Compiler.Utils.csproj in completion mode, but if I try to open
the file you pointed
http://nemerle.org/svn/vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n
I get following error in VS (in red):


Object reference not set to an instance of an object.
Hide

at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.System.CodeDom.Compiler.ICodeParser.Parse(TextReader
stream)
at System.CodeDom.Compiler.CodeDomProvider.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32
fReload)


It seems to occur only for this single file. Is this related somehow
to the bug? Or is it some incorrect serialization data stored
somewhere, which I should clean up?

On 11/17/06, vc <vc at rsdn.ru> wrote:
> > So I understand you end up with TypeBuilder, for which Record macro
> > generated incorrect constructor. Is this happening during first time
> > Hierarchy.Run is executed or after that?
>
> It's happening in Hierarchy.Run() in
> http://nemerle.org/svn/vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Comple
> tion2/Engine/Engine-main.n
> at line 78
>
> Callstack:
> Nemerle.Core.Record_type_postaddMacro.Run(...)
> Nemerle.Compiler.TypesManager.AttributeMacroExpansion.Expand()
> Nemerle.Compiler.TypesManager.ExpandMacros()
> Nemerle.Compiler.TypeBuilder.process_macro_attributes(Nemerle.MacroPhase
> stage
>   = BeforeInheritance | BeforeTypedMembers)
> Nemerle.Compiler.TypesManager._N__N_l28318_28404.apply_void(...)
> Nemerle.Compiler.TypesManager._N_maybe_f_28575.apply_void(...)
> Nemerle.Collections.List.Iter<Nemerle.Compiler.TypeBuilder>(...)
> Nemerle.Core.list<Nemerle.Compiler.TypeBuilder>.Iter(
>   Nemerle.Builtins.FunctionVoid<Nemerle.Compiler.TypeBuilder>
>   f = {Nemerle.Compiler.TypesManager._N_maybe_f_28575})
> Nemerle.Compiler.TypesManager.Iter(...)
> Nemerle.Compiler.TypesManager.Iter(...)
> Nemerle.Compiler.TypesManager.Run()
> Nemerle.Completion2.Engine.BuildTypedtreeAndInitProject()
>
>
> > Does it happen always?
>
> Yes, always?
>
> > I still suspect this has something to do with partial classes.
>
> May be. But it happen only in VS Integration.
>
> > I will try to set up the environment for VS integration tomorrow.
>
> Very well! :)
> Instructions here:
> http://rsdn.ru/article/nemerle/Nemerle.VsIntegration-en.xml
> It's old. But it's better than nothing. :)
>
>
> > If
> > you can provide some small example / reproduction project it would be
> > helpful to find the problem.
>
> We use same project (Nemerle.Compiler.Utils) for debugging:
> http://nemerle.org/svn/vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Compil
> er.Utils.nproj
>
> Open it under experimental hive of VS 2005 and open in it the file:
> http://nemerle.org/svn/vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Comple
> tion2/Engine/Engine-main.n
>
> In line 123 you see error.
>
>
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>


-- 
Kamil Skalski
http://nazgul.omega.pl



More information about the devel-en mailing list