racket / racket/drracket

'Open Defining File' / 'Jump to definition(in other file)' opens wrong file

Open
#668 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

Steps to reproduce :

  1. create two sibling folders test and test3 (I did this in Downloads)
  2. create file test/test1.rkt
  3. create file test/test2.rkt
  4. create file test3/test1.rkt
  5. create file test3/test2.rkt
  6. open each file in doctor in a new tab
  7. run test/test1.rkt - works as expected
  8. run test3/test1.rkt - works as expected
  9. in test3/test1.rkt tab, right click on (show-me2) and select 'Jump to Definition (in Other File)' - goes to (define (show-me2) in test3/test2.rkt as expected
  10. go to tab for test/test1.rkt and right click on (show-me2) and select 'Jump to Definition (in Other File)' --- incorrectly goes to (define (show-me) in test3/test2.rkt (I expected it to open the required test/test2.rkt).

Files

test/test1.rkt

#lang at-exp Racket
(require "test2.rkt")
(displayln "this is test/test1")

(show-me)

test/test2.rkt

#lang at-exp Racket
(provide show-me)
(define (show-me)
  (displayln "this is test/test2"))

test3/test1.rkt

#lang at-exp Racket
(require "test2.rkt")
(displayln "this is test3/test1")

(show-me)

test3/test2.rkt

#lang at-exp Racket
(provide show-me)
(define (show-me)
  (displayln "this is test3/test2"))

Reproduced on
Welcome to DrRacket, version 8.12 [cs].
Language: at-exp racket, with debugging and profiling [custom]; memory limit: 128 MB.
8.12 (macOS 14.4.1 / M1)

Demonstration on 8.11 (win10)
open-defining-file

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 navigation behavior with test/test1.rkt, test/test2.rkt, test3/test1.rkt, and test3/test2.rkt in separate tabs. Start with the Jump to Definition (in Other File) action and verify that selecting show-me from each test1.rkt opens the matching sibling test2.rkt file.

Written by the indexing model from the issue text.

Assessment

Domain
desktop, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.