-
Notifications
You must be signed in to change notification settings - Fork 7
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
Looks like godot is making a mess with file handling #32
Comments
Yep, interesting. This is a kind of error that "should never happen" :) But of course it'd be easier if you just shared a reproducable example so I could debug it myself. |
Hello @tetafro, I'm facing the same problem and I generated some code to try to help you debug it: https://github.com/igorscandido/GodotIssue-32 You can run It seems that the problem is that For you to be able to teste both cases I separated a code that works ( |
Context
I'm using https://github.com/valyala/quicktemplate to generate pages.
quicktemplate
generate code following the.qtpl
file. So, if I have a template namedfoo.qtpl
it generates afoo.qtpl.go
.The problem
I have a 943-line
foo.qtpl
file that generates an 822-linefoo.qtpl.go
file. When I rungodot
for thefoo.qtpl.go
file, it fails with the following message:Failed to run linter on file '/path/to/foo.qtpl.go': parse input file: inconsistency between file and AST: /path/to/foo.qtpl
.Pay attention to the file paths on the message.
Debugging a little, I found where the error occurs:
godot/getters.go
Lines 63 to 65 in a43fe64
When printing
fmt.Println(len(pf.lines), p.Line)
I got the following results:822 943
. Note that 822 is the number of lines thatfoo.qtpl.go
has and that 943 is the number of lines infoo.qtpl
. I didn't debug anymore, so I'm not sure if it's agodot
orgolang
bug.I can investigate further if I have time, but I don't promise.
Edit: I'm using the last godot version
The text was updated successfully, but these errors were encountered: