wasp icon indicating copy to clipboard operation
wasp copied to clipboard

preserve ModuleItem location information

Open yuri91 opened this issue 1 year ago • 1 comments

I am using wasp for a project, and I realized that when iterating a text module, I can't get the location information from the ModuleItems

The issue is an extra unneeded dereference operation:

When constructing a ModuleItem from the actual item (function, import, ...) the original At<> was unwrapped by the dereference operator, and then the conversion operator of At would wrap the item again (because ModuleItem actually wants an At<> as variant member), but with a default location with an empty span.

yuri91 avatar Oct 21 '22 14:10 yuri91

Good catch! This also needs some read_test.cc fixes, which are a bit clumsy to resolve, unfortunately. Here's the patch that I made locally that fixes those issues: read_test.zip

binji avatar Oct 21 '22 22:10 binji

Ah right, I didn't run the tests.

I applied your patch (thanks!) and they pass now

yuri91 avatar Oct 24 '22 10:10 yuri91

I think this is working, but CI is blowing up for a different reason.

binji avatar Oct 28 '22 23:10 binji