ariadne 0.4.1 supports using byte indices directly. This patch removes MappedSource, saving some computation but mostly memory usage when generating JSON or CLI reports for diagnostics.
We could also use NodeLocation as an ariadne span directly by implementing the Span trait for it. It's a little more convenient when creating the reports. I opted not to do that because it's user-visible if users install ariadne manually, instead I kept the internal conversion to a (FileId, Range<u64>) span.
ariadne 0.4.1 supports using byte indices directly. This patch removes
MappedSource
, saving some computation but mostly memory usage when generating JSON or CLI reports for diagnostics.We could also use
NodeLocation
as an ariadne span directly by implementing theSpan
trait for it. It's a little more convenient when creating the reports. I opted not to do that because it's user-visible if users install ariadne manually, instead I kept the internal conversion to a(FileId, Range<u64>)
span.