IDE Autocomplete stops working in big file

What I’m trying to do:
Code in the Anvil IDE in a file >400 lines and use the autocomplete

What I’ve tried and what’s not working:
In all my client and server files smaller than 400 lines of code, I can use the autocomplete just fine, but in a file I have that is over 400 lines, the autocomplete just stops working. This applies to both client and server files.

I know this isn’t because of bad syntax since the file that isn’t using the autocomplete runs perfectly fin.

Is this a bug or a known limitation of the online IDE?

Hi @duncan_richards12,

There isn’t a design limitation at 400 lines! Could you provide a clone link for an app that demonstrates the problem you’re having?

Its a bit of a big app and I would rather not have it all hang out there since its not just a hobby project, would it be better to email the support email the clone link or email the specific file?

If an ordinary file of >400 lines doesn’t replicate the issue, then that does lead to a suspicion that there’s something funny about your code in particular. If you’ve tried a publicly-shareable replication and that doesn’t work, drop a link to your app (not a clone link, we’ll just use Magic Admin Powers) to support@anvil.works.

My experience is that autocomplete stops working as soon as there is a syntax error elsewhere in the file. No matter how long or short the file, it starts working again after the error is fixed. I have a 1566-line module that behaves exactly this way, so length does not appear to be the issue.

That said, I have a 510-line file where syntax highlighting fails whenever I extend a function. The added code is formatted as a comment. It is formatted normally after the code runs for awhile.

My best guess is that this might be a matter of two different parsers disagreeing on what constitutes valid code: Skulpt’s, and Anvil’s formatter/syntax-highlighter.

I agree.
… and sometimes it fails when there is a syntax error elsewhere in the app, even if it’s in another file.

But I have just tried, and it seems to be more robust now.
This would have failed a few weeks ago:
image

1 Like