Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
spdegabrielle opened this issue Apr 23, 2024 · 3 comments

Comments

@spdegabrielle
Copy link
Sponsor Member

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

@jbclements
Copy link
Contributor

So many thanks for filing this issue! I've been experiencing this for several months, and never had time to put together a good issue or see how reproducible it is.

@spdegabrielle
Copy link
Sponsor Member Author

. I’m still confused because if I right click on the ‘require’d filename it opens the correct file.

@jbclements
Copy link
Contributor

Yep, that was my observation as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants