racket / racket/drracket

package move under drracket causes infinite internal error loop

Open
#529 0 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

  1. install a package you don't mind deleting. Hopefully it has no dependencies. let's call it bogo
> raco pkg install bogo
  1. start drracket
  2. Use shift-option-o to open some file in that package
    (it might not have to be shift-option-o, but that's what I used)
  3. change to the terminal and use
> cd /tmp
> raco pkg update --clone bogo

... to move the installed location of the package to /tmp
5) go back to DrRacket, make some trivial change to the file that no longer exists.
6) try to quit DrRacket
See Internal error

open-output-file: error opening file
  path: /Users/clements/racket/racket/share/pkgs/br-parser-tools-lib/info.rkt
  system error: No such file or directory; errno=2
  context...:
   /Users/clements/racket/racket/share/pkgs/gui-lib/mred/private/editor.rkt:304:17: open-the-file-port-and-set-creator-and-type
   /Users/clements/racket/racket/share/pkgs/gui-lib/mred/private/editor.rkt:316:21
   /Users/clements/racket/racket/share/pkgs/drracket/drracket/private/unit.rkt:2981:8
   /Users/clements/racket/racket/share/pkgs/drracket/drracket/private/unit.rkt:2980:6: save-all-unsaved-files method in frame-mixin
   /Users/clements/racket/racket/share/pkgs/drracket/drracket/private/unit.rkt:3388:6: on-activate method in frame-mixin
   /Users/clements/racket/racket/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:435:6
   /Users/clements/racket/racket/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:486:32
   /Users/clements/racket/racket/share/pkgs/gui-lib/mred/private/wx/common/dialog.rkt:58:4: show method in dialog-mixin
   /Users/clements/racket/racket/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /Users/clements/racket/racket/collects/ffi/unsafe/atomic.rkt:73:13
   /Users/clements/racket/racket/share/pkgs/gui-lib/mred/private/messagebox.rkt:77:6: show-and-return-results method in message-box/custom-dialog%
   /Users/clements/racket/racket/share/pkgs/gui-lib/framework/gui-utils.rkt:233:0: unsaved-warning
   /Users/clements/racket/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3
   /Users/clements/racket/racket/share/pkgs/gui-lib/framework/private/editor-misc.rkt:624:4: user-saves-or-not-modified? method in file-mixin
   /Users/clements/racket/racket/share/pkgs/gui-lib/framework/private/editor-misc.rkt:620:4: can-close? method in file-mixin
   /Users/clements/racket/racket/share/pkgs/gui-lib/framework/private/frame.rkt:1436:4: can-close? method in editor-mixin
   ...

Which is fine, but clicking "okay" just opens the same dialog again and again and again...

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

Reproduce the package move and DrRacket quit sequence, then start with the stack-trace entry points in drracket/private/unit.rkt and gui-lib/framework/private/editor-misc.rkt, especially save-all-unsaved-files and user-saves-or-not-modified?. Trace the repeated dialog through the listed editor and message-box files; done means a moved package with an unsaved editor no longer traps quitting in a repeated error dialog.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.