drracket
drracket copied to clipboard
Package source: Single line text box accepts multi-line input
This is a bug that bit some of my students who were trying to install our course software which is distributed as a package on github.
In DrRacket, the File > Install Package... dialogue asks for a package source as a single line text box. But via copy & paste you can enter multi-line text, which is almost surely invalid input, so should not be allowed.
Here's how it manifested for my students: If you paste a URL you copied, but happened to have grabbed a newline at the end (an easy mistake to make), then it will appear as though you pasted nothing (but using the arrow keys you can see the URL is just above the blank line). You might try pasting again, but nothing appears, so finally you type out the URL, check that it's right, and hit install, but then get an error saying github cannot checkout the given URL and that it may not be a git repository. There error message appears sensible but the URL appears as many times as you pasted (with a newline between). You check the URL in the error message and it's the right one, so you're stumped.
Perhaps the textbox should only accept the first line of input, or strip out newlines, or something, but the currently interface leads to baffling failures.
Yes, this problem has been around for a long time. I reported it a number of years ago, and then I believed that it had been fixed, but I've observed it again recently.
I typically attach a note about this to my syllabus, but I agree that this behavior should be altered. (note my clever use of the passive voice!)
Goodness, today I discovered this affects the "username" box of the handin server as well... one of my students was trying to submit as
"jvazqu45
jvazqu45+areid02+cbarbe03+chmiddle
areid02+cbarbe03+chmiddle+jvazqu45
areid02+cbarbe03+chmiddle+jvazqu45
areid02+cbarbe03+chmiddle+jvazqu45
areid02+cbarbe03+chmiddle+jvazqu45
areid02+cbarbe03+chmiddle+jvazqu45
areid02+cbarbe03+chmiddle+jvazqu45
areid02+cbarbe03+chmiddle+jvazqu45
areid02+cbarbe03+chmiddle+jvazqu45
jvazqu45"
I guess the easy fix is just to pop up an error box when the fields get submitted?
See also https://github.com/racket/drracket/issues/540