razor icon indicating copy to clipboard operation
razor copied to clipboard

[FUSE] Section names in cshtml files are not mapped

Open davidwengier opened this issue 1 year ago • 2 comments

I'm not actually sure if this is a bug, or just a difference, but right now in design time @section names are mapped to an object in the generated C#, so get classified by Roslyn, and would have to be valid C# identifiers etc. In runtime the section names are just an opaque string, and are not mapped.

This might not really help in tooling at all, but its at least a cause of a failing test so we should sort something out.

(Saw this in the cohost_use_generator branch, so it might not be FUSE, but I'm pretty sure)

davidwengier avatar Sep 09 '24 06:09 davidwengier

@chsienki is this FUSE related?

jaredpar avatar Oct 08 '24 16:10 jaredpar

@jaredpar Yes, but after discussion I'm going to close it as by-design. It's a case where something has always been legal in runtime (and thus the command line compiler) but would fail at design time and squiggle in the IDE. Under fuse we no longer incorrectly squiggle.

Leaving it open right now to track removing the failing test that checks for the squiggle.

chsienki avatar Oct 08 '24 17:10 chsienki

@davidwengier Do you know which test this was failing?

chsienki avatar Nov 25 '24 19:11 chsienki

'twas a semantic tokens test. I think the test inputs and outputs are shared for these between cohosting and non, so if this is by design, you can probably send it back to tooling and I'll separate the tests or something.

davidwengier avatar Nov 25 '24 20:11 davidwengier

The test referencing this issue has now been unskipped, so it represents the current behaviour of FUSE. Should be no need for follow up if this is by design.

davidwengier avatar Mar 06 '25 22:03 davidwengier