setup/setup: expose package-dependency functionality

Closes #2512
This commit is contained in:
Matthew Flatt 2019-03-05 20:43:09 -07:00
parent 828dc1f276
commit f68248ee3b
2 changed files with 38 additions and 4 deletions

View File

@ -921,6 +921,7 @@ normal dependency counts as a build-time dependency, too).
@defproc[(setup [#:file file (or/c #f path-string?) #f]
[#:collections collections (or/c #f (listof (listof path-string?))) #f]
[#:pkgs pkgs (or/c #f (listof string?)) #f]
[#:planet-specs planet-specs (or/c #f
(listof (list/c string?
string?
@ -932,6 +933,9 @@ normal dependency counts as a build-time dependency, too).
[#:make-docs? make-docs? any/c #t]
[#:make-doc-index? make-doc-index? any/c #f]
[#:force-user-docs? force-user-docs? any/c #f]
[#:check-pkg-deps? check-pkg-deps? any/c #f]
[#:fix-pkg-deps? fix-pkg-deps? any/c #f]
[#:unused-pkg-deps? unused-pkg-deps? any/c #f]
[#:clean? clean? any/c #f]
[#:tidy? tidy? any/c #f]
[#:jobs jobs exact-nonnegative-integer? #f]
@ -946,10 +950,16 @@ Runs @exec{raco setup} with various options:
a @filepath{.plt} archive.}
@item{@racket[collections] --- if not @racket[#f], constrains setup to
the named collections, along with @racket[planet-specs], if any}
the named collections (along with @racket[pkgs] and
@racket[planet-specs], if any)}
@item{@racket[pkgs] --- if not @racket[#f], constrains setup to the
named packages (along with @racket[collections] and
@racket[planet-specs], if any)}
@item{@racket[planet-spec] --- if not @racket[#f], constrains setup to
the named @|PLaneT| packages, along with @racket[collections], if any}
the named @|PLaneT| packages (along with @racket[collections] and
@racket[pkgs], if any)}
@item{@racket[make-user?] --- if @racket[#f], disables any
user-specific setup actions}
@ -968,6 +978,18 @@ Runs @exec{raco setup} with various options:
documentation, creates a user-specific documentation entry point
even if it has the same content as the installation}
@item{@racket[check-pkg-deps?] --- if true, enables
package-dependency checking even when @racket[collections],
@racket[pkgs], or @racket[planet-specs] is non-@racket[#f].}
@item{@racket[fix-pkg-deps?] --- if true, implies
@racket[check-pkg-deps?] and attempts to automatically correct
discovered package-dependency problems}
@item{@racket[unused-pkg-deps?] --- if true, implies
@racket[check-pkg-deps?] and also reports dependencies that
appear to be unused}
@item{@racket[clean?] --- if true, enables cleaning mode instead of setup mode}
@item{@racket[tidy?] --- if true, enables global tidying of
@ -992,7 +1014,10 @@ Instead of using @envvar{PLT_COMPILED_FILE_CHECK}, @racket[setup] is
sensitive to the @racket[use-compiled-file-check] parameter.
@history[#:changed "6.1" @elem{Added the @racket[fail-fast?] argument.}
#:changed "6.1.1" @elem{Added the @racket[force-user-docs?] argument.}]}
#:changed "6.1.1" @elem{Added the @racket[force-user-docs?] argument.}
#:changed "7.2.0.7" @elem{Added the @racket[check-pkg-deps?],
@racket[fix-pkg-deps?], and @racket[unused-pkg-deps?]
arguments.}]}

View File

@ -19,7 +19,10 @@
#:avoid-main? [avoid-main? #f]
#:force-user-docs? [force-user-docs? #f]
#:jobs [parallel #f]
#:fail-fast? [fail-fast? #f])
#:fail-fast? [fail-fast? #f]
#:check-pkg-deps? [always-check-dependencies? #f]
#:fix-pkg-deps? [fix-dependencies? #f]
#:unused-pkg-deps? [check-unused-dependencies? #f])
(parameterize
(;; Here's where we tell setup the archive file:
[archives (if (or clean? (not file)) (archives) (list file))]
@ -57,6 +60,12 @@
[make-launchers (if clean? #f (make-launchers))]
[make-info-domain (if clean? #t (make-info-domain))]
[call-install (if clean? #f (call-install))]
[fix-dependencies fix-dependencies?]
[check-unused-dependencies check-unused-dependencies?]
[always-check-dependencies (or fix-dependencies?
check-unused-dependencies?
always-check-dependencies?)]
[setup-program-name "raco setup"]