Nitra ice
От: meadow_meal  
Дата: 15.01.17 00:39
Оценка:
При обновлении моего проекта до последней версии Нитры проект перестал компилироваться с ошибкой:

2>C:\Program Files (x86)\Nemerle\Net-4.0\Nemerle.MSBuild.targets(289,5): error : internal compiler error: got some unknown exception of type System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
2>       в DotNet.AstUtils.ResolveAll[TSymbol,TRef](ImmutableArray`1 refs, Builder& result)
2>       в DotNet.AstUtils.MakeConstructedType(ILocated ast, ImmutableArray`1 args, DependentPropertyEvalContext context)
2>       в DotNet.QualifiedReference.Generic.EvalProperties(DependentPropertyEvalContext context)
2>       в Nitra.Ast.AstMembers.AstDependentProperty.EvalProperties(DependentPropertyEvalContext context)
2>       в Nitra.Ast.AstMembers.AstMember.AstList.EvalProperties(DependentPropertyEvalContext context)
2>       в Nitra.Ast.TopAst.EvalProperties(DependentPropertyEvalContext context)
2>       в DotNet.NamespaceMember.AstList.EvalProperties(DependentPropertyEvalContext context)
2>       в DotNet.ExplicitNamespace.EvalProperties(DependentPropertyEvalContext context)
2>       в DotNet.NamespaceMember.AstList.EvalProperties(DependentPropertyEvalContext context)
2>       в DotNet.CompilationUnit.EvalProperties(DependentPropertyEvalContext context)
2>       в Nitra.Declarations.EvalPropertiesHost.EvalProperties(DependentPropertyEvalContext context, IDependentPropertyContainer obj, Single statistics)
2>       в Nitra.Declarations.ProjectEvalPropertiesHost.ExecutePass(DependentPropertyEvalContext context, String passName)
2>       в Nitra.Declarations.EvalPropertiesHost.EvalProperties(DependentPropertyEvalContext context, String passName, Int32 stage)
2>       в DotNet.CompilationUnit.RefreshProject(CancellationToken cancellationToken, ImmutableArray`1 files, Object data)
2>       в Nitra.ProjectSystem.Project.UpdateProperties(CancellationToken cancellationToken)
2>       в Nitra.Compiler.CompilingNitraProject.BeforeTypedMembers()
2>       в Nemerle.Compiler.MacroColorizator.InGlobalColor(FunctionVoid fn)
2>       в Nitra.InvokeNitraCompiler_assembly_preaddMacro.Run(Typer _N__1, list`1 parms)
2>       в Nemerle.Compiler.TypesManager.AttributeMacroExpansion.Expand()
2>       в Nemerle.Compiler.TypesManager.ExpandMacros()
2>       в Nemerle.Compiler.TypesManager.Run()
2>       в Nemerle.Compiler.ManagerClass.Run()
2>       в Nemerle.CommandlineCompiler.MainClass.main_with_catching()
2>Done building project "Igor.Grammar.nproj" -- FAILED.


Последняя ревизия Нитры с которой все работает — 09ead507c498e93e5e0e696391904e8b5746a90b 10.12.2016 4:30:04 Refactoring of UnionScope

Если я комментирую все декларации в нитра-файлах, кроме CompilationUnit, то проект естественно не компилируется, но ice нет. Но стоит раскомментировать что-то еще — и сразу ice.

Например:
    ast CompilationUnit
    {
        in ContainingTable : TableScope;

        Modules.ContainingTable = ContainingTable;
        Usings.Scope = ContainingTable;
        Usings.ImportScopeIn = ContainingTable;
        Modules.ImportScope = Usings.ImportScopeOut;

        Usings : Using*;
        Modules : Module*;
    }
    
    ast Using : BindableAst
    {
    stage 1:
        out Ref : Ref[ModuleSymbol] = ModuleRef.Ref.Resolve();
        out Module : ModuleSymbol = Ref.Symbol;
        inout ImportScope : Scope;

        ModuleRef.Scope = Scope;
        ImportScopeOut = Ref.Symbol.MemberTable.UnionWith(ImportScopeIn);

        ModuleRef : Reference;
    }


Раскомментирую ast Using — сразу Ice. Закомментирую — остаются только нормальные ошибки.

Буду признателен за любую помощь.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.