go icon indicating copy to clipboard operation
go copied to clipboard

text/template: remove concurrency from scanner

Open robpike opened this issue 3 years ago • 2 comments

The concurrency makes for a fun demonstration (see the youtube video), but causes problems when other parts of the system want to interact with the scanner. Races result. Plus various changes to the package over time have introduced problems.

Change the scanner to be more traditional, proceeding in lockstep with the parser rather than independently. It should be easy to do and will simplify and perhaps speed up the whole thing.

robpike avatar Jun 07 '22 00:06 robpike

I have a change that implements this, but am waiting for the next release cycle to start before sending it out for review.

robpike avatar Jun 16 '22 07:06 robpike

Change https://go.dev/cl/421883 mentions this issue: text/template/parse: simplify I/O in lexing

gopherbot avatar Aug 07 '22 23:08 gopherbot