racket / racket/drracket

Package source: Single line text box accepts multi-line input

Open
#190 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
516
Forks
103
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in DrRacket's File > Install Package... dialog and reproduce the problem by pasting a URL with a trailing newline or multiple lines into the package source field. Trace how that input reaches installation and make the field reject or normalize multi-line input so the package source remains valid. Verify the corrected behavior with pasted single-line and multi-line values.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.