Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Index was outside the bounds of the array #1063

Closed
dennismarksbury opened this issue Aug 23, 2022 · 3 comments
Closed

Build: Index was outside the bounds of the array #1063

dennismarksbury opened this issue Aug 23, 2022 · 3 comments

Comments

@dennismarksbury
Copy link

dennismarksbury commented Aug 23, 2022

After working out what I believe to be all the code issues, I am getting the following error when I try to build the project

Environment:
Visual Studio 2019
Peachpie SDK 1.0.23

Reproduce the error at: https://github.com/dennismarksbury/LaravelOnPeachPie

Error:

Severity	Code	Description	Project	File	Line	Suppression State
Error		Index was outside the bounds of the array.
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitDeclareTypeByDependencies(ImmutableArray`1 versions, KeyValuePair`2[] dependency_handle, Int32 index, Dictionary`2 dependencies, NamedLabel lblDone, NamedLabel lblFail)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitDeclareTypeByDependencies(ImmutableArray`1 versions, KeyValuePair`2[] dependency_handle, Int32 index, Dictionary`2 dependencies, NamedLabel lblDone, NamedLabel lblFail)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitDeclareTypeByDependencies(ImmutableArray`1 versions, KeyValuePair`2[] dependency_handle, Int32 index, Dictionary`2 dependencies, NamedLabel lblDone, NamedLabel lblFail)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitVersionedTypeDeclaration(ImmutableArray`1 versions)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitDeclareType(SourceTypeSymbol t, Boolean parsePhase)
   at Pchp.CodeAnalysis.Semantics.BoundTypeDeclStatement.Emit(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.BoundStatement.Pchp.CodeAnalysis.CodeGen.IGenerator.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.Generate(IGenerator element)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Pchp.CodeAnalysis.Semantics.Graph.BoundBlock.Emit(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.Graph.StartBlock.Emit(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.Graph.BoundBlock.Pchp.CodeAnalysis.CodeGen.IGenerator.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.GenerateBlock(BoundBlock block)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.LocalScope.ContinueWith(BoundBlock block)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.GenerateScope(BoundBlock block, ScopeType type, Int32 to)
   at Pchp.CodeAnalysis.Symbols.SourceRoutineSymbol.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.CodeGen.MethodGenerator.<>c__DisplayClass1_0.<GenerateMethodBody>b__0(ILBuilder builder)
   at Pchp.CodeAnalysis.CodeGen.MethodGenerator.GenerateMethodBody(PEModuleBuilder moduleBuilder, MethodSymbol routine, Action`1 builder, VariableSlotAllocator variableSlotAllocatorOpt, DiagnosticBag diagnostics, Boolean emittingPdb)
   at Pchp.CodeAnalysis.CodeGen.MethodGenerator.GenerateMethodBody(PEModuleBuilder moduleBuilder, SourceRoutineSymbol routine, Int32 methodOrdinal, VariableSlotAllocator variableSlotAllocatorOpt, DiagnosticBag diagnostics, Boolean emittingPdb)
   at Pchp.CodeAnalysis.SourceCompiler.EmitMethodBody(SourceRoutineSymbol routine)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)	LaravelOnPeachPie	C:\Users\denni\.nuget\packages\peachpie.net.sdk\1.0.23\build\Peachpie.NET.Core.Sdk.targets	245	
@jakubmisek
Copy link
Member

thanks for reporting the issue!

Isn't there anything missing in the repo at dennismarksbury/LaravelOnPeachPie ? I have a lot of other compile-time errors when trying to build it.

@dennismarksbury
Copy link
Author

dennismarksbury commented Aug 23, 2022 via email

@jakubmisek
Copy link
Member

thanks @dennismarksbury - there was a bug in the compiler;

now there seems to be a few errors related to the PHP code itself. Also we've found another minor issue in the compiler - working on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants