changing value of ux:Class attribute does not produce an error in either the sublime text plugin or local preview

I start with a working piece of code with a particular custom ux component. For example, in Components/PageWithTitle.ux I have

<Page ux:Class="PageWithTitle" ux:Name="self">
 ... more stuff here...
</Page>

And in MainView.ux I use this component, e.g.

<App>
	<ClientPanel>
		<PageControl>
			<PageWithTitle Title="Basic animation" HeaderColor="#595FFF" HeaderTextColor="#fff"  Color="#FEFDFC" Instructions="Tap and hold the rectangle">
				... more stuff here...
			</PageWithTitle>
		</PageControl>
	</ClientPanel>
</App>

Now I edit PageWithTitle.ux and change the ux:Class attribute, for .e.g.

<Page ux:Class="PageWithTitleCHANGED" ux:Name="self">

I’m still using PageWithTitle in MainView.ux, but I don’t get any errors, either in the preview or in the sublime text plugin console. Also, if I open MainView.ux and save the file, I don’t get an error from that either - even though PageWithTitle doesn’t exist any more.

Interestingly, if I change the PageWithTitle tag in MainView.ux to something different, like

<PageWithTitleNONEXISTENT>...</PageWithTitleNONEXISTENT>

Here I do get a ‘Data type not found’ error, but if I change it back to what it was originally and save as

<PageWithTitle>...</PageWithTitle>

Then I don’t get any errors, even though this also no longer exists, having been renamed.

If I close the preview window and restart it from the command line, then I do get the appropriate error.

It looks to me as though something is being cached and that’s why the error is not being reported…

It appears we have a defect in our class caching in preview. When you change the name the old one still lingers in the class cache. You don’t get any error then since it still finds that old one.

We’ll look at fixing the issue. In the meantime, if you restart preview itself that should clear the cache.