make collection xref for git help
This commit is contained in:
@@ -49,8 +49,9 @@ documentation cross-reference index:
|
||||
```
|
||||
|
||||
`raco setup git` builds and indexes the package documentation. The help command
|
||||
uses the indexed path and anchor instead of assuming a particular documentation
|
||||
directory.
|
||||
builds a fresh cross-reference view for each request, so documentation generated
|
||||
during the current DrRacket session is visible immediately. It uses the indexed
|
||||
path and anchor instead of assuming a particular documentation directory.
|
||||
|
||||
## HTTPS credentials
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
(define collection "git")
|
||||
(define pkg-desc "Command-line-like Git operations for Racket, implemented with libgit2")
|
||||
(define version "0.2.15")
|
||||
(define version "0.2.16")
|
||||
(define pkg-authors '("Hans Dijkema"))
|
||||
(define license 'MIT)
|
||||
|
||||
|
||||
@@ -123,9 +123,10 @@
|
||||
(lambda ()
|
||||
(error 'git-help "unknown help topic: ~a" topic)))
|
||||
'git))
|
||||
;; Use Racket's installed-documentation cross-reference database instead of
|
||||
;; guessing where raco setup placed this package's generated HTML.
|
||||
(define xref (load-collections-xref))
|
||||
;; Build a fresh installed-documentation cross-reference database instead of
|
||||
;; using load-collections-xref's process-local cache. This makes help notice
|
||||
;; documentation generated by raco setup during the current DrRacket session.
|
||||
(define xref (make-collections-xref))
|
||||
(define tag
|
||||
(xref-binding->definition-tag xref (list 'git binding) #f))
|
||||
(unless tag
|
||||
|
||||
@@ -48,14 +48,14 @@ Calls @racket[git], displays its result in a compact human-readable form, and re
|
||||
(git 'help 'restore)
|
||||
]
|
||||
|
||||
Help uses Racket's installed-documentation cross-reference database. It resolves the documented binding for the requested command through @racketmodname[setup/xref] and @racketmodname[scribble/xref], then opens the path and anchor recorded by @exec{raco setup}. No documentation directory is guessed or constructed by @racketmodname[git]. If the binding is not indexed, @racket[git-help] reports that @exec{raco setup git} should be run.
|
||||
Help uses Racket's installed-documentation cross-reference database. It builds a fresh collection xref for each help request, resolves the documented binding through @racketmodname[setup/xref] and @racketmodname[scribble/xref], then opens the path and anchor recorded by @exec{raco setup}. This means a newly run @exec{raco setup git} is visible immediately in the same DrRacket session. No documentation directory is guessed or constructed by @racketmodname[git]. If the binding is not indexed, @racket[git-help] reports that @exec{raco setup git} should be run.
|
||||
|
||||
@section[#:tag "version"]{Version}
|
||||
|
||||
@defproc[(git-version) string?]{Returns the package version from @tt{info.rkt}. The command form is @racket[(git 'version)]. The version is not duplicated in @tt{main.rkt}; @tt{info.rkt} is the single source of truth.}
|
||||
|
||||
@racketblock[
|
||||
(git 'version) ; => "0.2.15"
|
||||
(git 'version) ; => "0.2.16"
|
||||
]
|
||||
|
||||
@section[#:tag "repository"]{Repository}
|
||||
|
||||
Reference in New Issue
Block a user