move setup/xref from "scribble-lib" to "racket-index"

The `setup/xref` library conceptually belongs in "racket-index",
and moving the library avoids a cross-package use of a private
module.

Merge to v6.0
(cherry picked from commit d37e910169)
This commit is contained in:
Matthew Flatt 2013-12-01 08:09:07 -07:00 committed by Ryan Culpepper
parent 562abdbc6f
commit 2cf4a03d4e
10 changed files with 26 additions and 13 deletions

View File

@ -14,6 +14,7 @@
"htdp-lib"
"math-lib"
"scribble-lib"
"racket-index"
"sgl"
"srfi-lib"
"string-constants-lib"))

View File

@ -16,8 +16,7 @@
"coroutine.rkt"
data/queue)
(require setup/xref
scribble/xref
(require scribble/xref
scribble/manual-struct)
(import mred^
@ -4024,8 +4023,15 @@ designates the character that triggers autocompletion
(let* ([sym->mpi (λ (mp) (module-path-index-resolve (module-path-index-join mp #f)))]
[manual-mpis (and manuals (map sym->mpi manuals))])
(unless xref
(set! xref (load-collections-xref)))
(unless xref
(let ([load-collections-xref
;; Make the dependency on `setup/xref' indirect, so that a
;; GUI does not depend on having documentation installed:
(with-handlers ([exn:missing-module? (lambda (exn)
(lambda ()
(load-xref null)))])
(dynamic-require 'setup/xref 'load-collections-xref))])
(set! xref (load-collections-xref))))
(let ([ht (make-hash)])
(for-each

View File

@ -6,7 +6,8 @@
(define collection 'multi)
(define deps '(;; "Fake" dependencies to make them included
(define deps '("racket-index"
;; "Fake" dependencies to make them included
;; in a default build:
"main-distribution-test"
"distro-build"

View File

@ -3,7 +3,7 @@
(require setup/getinfo
setup/dirs
setup/path-to-relative
setup/private/path-utils
"private/doc-path.rkt"
setup/collects
setup/main-doc
setup/parallel-do

View File

@ -1,12 +1,12 @@
#lang scheme/base
#lang racket/base
(require scribble/xref
scheme/fasl
scheme/path
racket/fasl
racket/path
racket/promise
setup/dirs
setup/getinfo
setup/private/path-utils
"private/doc-path.rkt"
setup/doc-db)
(provide load-collections-xref

View File

@ -27,7 +27,8 @@
;; for random testing:
"redex-lib"))
(define build-deps '("scheme-lib"
(define build-deps '("racket-index"
"scheme-lib"
"srfi-lite-lib"
"base"
"data-lib"))

View File

@ -2,7 +2,8 @@
(define collection 'multi)
(define build-deps '("mzscheme-doc"
(define build-deps '("racket-index"
"mzscheme-doc"
"net-doc"
"scheme-lib"
"draw-doc"

View File

@ -126,6 +126,8 @@ information for all installed documentation, so
renders @filepath{mine.scrbl} to @filepath{mine.html} with
cross-reference links to the Racket installation's documentation.
(The @filepath{racket-index} package must be installed to use
@PFlag{m}/@DPFlag{main-xref-in}.)
The @DPFlag{xref-in} flag loads cross-reference information by calling
a specified module's function. The @racketmodname[setup/xref] module

View File

@ -2,7 +2,8 @@
(define collection 'multi)
(define deps '("scheme-lib"
(define deps '("racket-index"
"scheme-lib"
"base"
"compatibility-lib"
"scribble-text-lib"