V version: V 0.1.25 bcaf72e
OS: Debian 10
What did you do? $ v fmt blog_example.v
What did you expect to see? formatted output of the blog example
What did you see instead?
/home/riordanix/Workspace/v/vlib/vweb/vweb.v:141:9: type `T` has no field or method `vweb`
139| //fn handle_conn(conn net.Socket) {
140|
141| //println('handle')
^
142|
143|
vfmt error while formatting file: blog_example.v .
Encountered a total of: 1 errors.
The error gives the correct line number, but the printed code is actually on line 127. Regardless, I don't think vfmt should care about what modules I'm using, but just format the file I give it.
May be related to #3026, but I'm writing a new issue because I think this has more to do with vfmt needing to know about imported modules.
The new fmt module will use a different approach to format code. The issue will be resolved after we switch to the new vfmt.
commit 2a06263a5b202a7c494e3c67d4021408e6f8938d fixes this.
Most helpful comment
The new
fmtmodule will use a different approach to format code. The issue will be resolved after we switch to the new vfmt.