Request: Less Intrusive Compile Error Message

Trying out Pulp rn. so far really cool!

One thing that's getting on the nerves is the Error popup for script edits, which requires closing any time you click off. It's intrusive and slows down script writing, as it shows even when switching tabs (often to the documentation).

Would prefer either an error log, the ability to toggle it off, or just make it only show when pressing Play/Exporting. Not sure why it's necessary when there's already a helpful error message in red at the bottom that tells error line.

(also can we get a suggestion tag? :playdate_sideways_smile:)

4 Likes

Thanks for the suggestion! I added a new Feature Request subcategory that your thread is now under.

1 Like

Thanks for the feedback Munro. This one is kind of tricky. We don’t store PulpScript in its raw text form. String parsing in our runtime is computationally intensive and generates a lot of garbage so we compile PulpScript into a more easily digestible form in the editor at author time. If code can’t be compiled it can’t be stored. So if you were to switch away, and then back, the script would be in the last compilable state before the syntax error, which depending on the type of error could mean losing a large chunk of logic. Hence the warning.

I have a few ideas on how to make this less intrusive. In the meantime, commenting out the problem line(s) can silence the prompt while you jump to the docs and back. There’s even a keyboard shortcut that will comment out/uncomment a single line or multiple, selected lines: cmd+/.

1 Like

On the subject of that @shaun, can we please have block comment code rather than having to do each line individually?

/*
commented lines
commented lines
commented lines
*/
3 Likes

I signed up to beg for this too, but I see that @shaun says you can highlight multiple lines and cmd+/ them all at once which is enough for me already, phew.

1 Like

I like that it keeps you from spending a lot of time wondering why your updates aren't showing up. I think there's some things that can make it easier to live with, like dismissing the modal when clicking outside the dialog area. Maybe dismissing on any keypress, rather than just on enter/escape (as long as it doesn't mess with accessibility).

I do like Munro's suggestion of having the dialog appear only when you attempt to build/run, since I get this issue mostly when I'm alt-tabbing to the documentation to double check my syntax.

1 Like

The issue with only showing the prompt on save or play is that you might end up with multiple syntax errors spread across multiple sources. There needs to be UI to support identifying and locating the errors and then you need to mentally context switch for each one. We’ll solve it eventually but it’s a tricky one :sweat_smile:

1 Like

Ah interesting, I hadn't even noticed that it brings up the dialog when you attempt to switch scripts

Sometimes it reappears right after closing just by putting your cursor in the script textarea, so yeah even if it was easier to close it's still frustrating. Maybe the red text can be improved to look more like a banner and more obvious and only showing the modal on save or play.

I pushed a stopgap for this issue last night. You can now open links to the docs without being prompted but the notification will be present when you return to the editor tab.

Not being able to dismiss the notification by clicking anywhere outside the notification window was a bug. That has also been fixed.

3 Likes