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" "htdp-lib"
"math-lib" "math-lib"
"scribble-lib" "scribble-lib"
"racket-index"
"sgl" "sgl"
"srfi-lib" "srfi-lib"
"string-constants-lib")) "string-constants-lib"))

View File

@ -16,8 +16,7 @@
"coroutine.rkt" "coroutine.rkt"
data/queue) data/queue)
(require setup/xref (require scribble/xref
scribble/xref
scribble/manual-struct) scribble/manual-struct)
(import mred^ (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)))] (let* ([sym->mpi (λ (mp) (module-path-index-resolve (module-path-index-join mp #f)))]
[manual-mpis (and manuals (map sym->mpi manuals))]) [manual-mpis (and manuals (map sym->mpi manuals))])
(unless xref (unless xref
(set! xref (load-collections-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)]) (let ([ht (make-hash)])
(for-each (for-each

View File

@ -6,7 +6,8 @@
(define collection 'multi) (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: ;; in a default build:
"main-distribution-test" "main-distribution-test"
"distro-build" "distro-build"

View File

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

View File

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

View File

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

View File

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

View File

@ -126,6 +126,8 @@ information for all installed documentation, so
renders @filepath{mine.scrbl} to @filepath{mine.html} with renders @filepath{mine.scrbl} to @filepath{mine.html} with
cross-reference links to the Racket installation's documentation. 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 The @DPFlag{xref-in} flag loads cross-reference information by calling
a specified module's function. The @racketmodname[setup/xref] module a specified module's function. The @racketmodname[setup/xref] module

View File

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