Commit Graph

51 Commits

Author SHA1 Message Date
Matthew Flatt
70caf5f509 raco pkg create, raco setup: add support for built (source+binary) packages
This change removes `rendered-scribblings' as a recognized "info.rkt"
definition (which was added for binary packages, but now `scribblings'
serves both roles).

The `raco setup' changes involve support for moving pre-rendered
documentation into place (where "moving" may actually mean
leaving it in place but updating the "local-redirect.js" path),
but also allowing documentation to be re-rendered.
2013-05-24 14:55:39 -06:00
Matthew Flatt
198a65a5fc raco pkg create: support "source" and "binary" bundling
Adds `--from-dir' and `--from-install' flags to select the interpretation
of the argument as a directory or as the name of an installed package.
Relevant to PR 13669

Adds `--as-is' (the default), `--source', and `--binary' flags to
select a pruning mode.

The `raco setup' tool recognizes a `rendered-scribblings' specification
in "info.rkt" to trigger moving rendered documentation into place,
registering its tags in the cross-reference database, and fixing up
references to "local-redirect.js"; the presence of a "synced.rktd"
indicates when those fixups have been performed (since, if the package
is installed in a user-specific scope, the documentation doesn't actually
move anywhere). Finally, "out<n>.sxref" needs to report paths relative to
the documentation's directory, and then the relative-directory references
need to be suitably resolved at derserialization; some support for such
relative paths was in place, but it wasn't quite general enough before.
2013-05-16 11:50:04 -06:00
Matthew Flatt
9361b1e709 render non-installaction-scoped package docs with an indirection
The indirection uses a "local-redirect.js" script to rewrite
the document links to local links within the browser. This mechanism
is a step towards distributing compiled packages that include
already-built documentation, where paths to other documentation
can be different than in the build environment.

If the links are not rewritten, they are queries to
"pkg-docs.racket-lang.org", with the idea tha such a server will exist
for reading all package documentation online. Also, a package's
documentation that refer to documentation for uninstalled packages,
in which case the corresponding links will not get rewritten and
will continue to point to the server.

Rendering the "local-redirect.js" script spends a lot of time just
converting among different path formats. Various library changes in
this commit are aimed at speed up those conversions, but the big
improvement came from a `path->url-string' that shortcuts conversion
os simple Unix paths.
2013-05-08 09:54:30 -04:00
Matthew Flatt
f60803c300 make scribble' (and raco scribble') use a `doc' submodule when present 2013-05-07 08:31:16 -04:00
Matthew Flatt
147d490f24 setup/scribble: avoid top-level state 2013-04-23 13:48:15 -06:00
Matthew Flatt
51d48f3ab4 raco setup: --tidy mode (as needed by `raco pkg remove') and more
When a collection disappears, then documentation and metadata
cross-references need fixing up based on everything that remains
available, even though other setup actions are confined to
collections that are specifically relevant to the packages. The
new `--tidy' mode takes care of that.

Package installation now also provides `--avoid-main' when working
with packages in a scope other than installation scope, and `raco
setup' now better respects `--avoid-main' to avoid creating
executables or re-running documentation.

Also, revise the `raco' documentation to better orient it toward the
package manager.
2013-04-17 12:28:50 -06:00
Matthew Flatt
bcb05bc8cf raco setup: protect against bad info-domain cache 2013-04-17 12:28:49 -06:00
Matthew Flatt
ff324f9270 raco setup: remove any extra documentation dirs in installation
After uninstalling a package in installation scope, its documentation
should be removed. A new `raco setup' step takes care of that.

Merge to v5.3.4
2013-04-11 09:54:17 -06:00
Matthew Flatt
2295d16074 fix `raco setup -j' for a non-places build
When places are not enabled, then `raco setup' uses multiple
Racket processes that commuincate via pipes. Don't try to send
a place channel over a pipe.

Merge to v5.3.4
2013-04-09 12:20:13 -06:00
Robby Findler
15abd8f9dd remove unused require 2013-04-03 22:23:26 -05:00
Matthew Flatt
0a482b6159 raco setup: fix doc dependency check for PLTCOMPILEDROOTS
A doc build depends on its source's ".zo" file, which might
not be next to the source due to a PLTCOMPILEDROOTS setting.

Closes PR 13640
2013-03-30 17:28:25 -06:00
Matthew Flatt
31e644e5e1 raco setup: add a layer of db write locking, db read fallback
Change `raco setup' to guard database writes in different places
by an explicit lock that is implemented by place channels. Change
corss-reference reading to fall back to just loading ".sxref"
files if the database seems to be too contended at that point.

These changes are aimed at avoiding distaerous performance when
SQLite seems not to behave well.

Also, fix break and other exception handling near the "fast abort"
path for both reads and writes.
2012-11-25 17:55:23 -07:00
Matthew Flatt
4b094f8ec8 raco setup: fix for non-parallel doc build in a fresh installation 2012-11-24 11:33:07 -07:00
Matthew Flatt
9888fac99e raco setup: move doc dependency and duplicate checking to database
This change makes document building --- and specially incremental
document building --- more scalable. The global duplicate-definition
check is handled by a database query, for example.
2012-11-23 20:07:49 -07:00
Matthew Flatt
a73dc50224 break cross-reference info for document into pieces
For example, the cross-reference information for the
Reference is now broken into about 16 pieces, so that
resolving a cross-reference into the Reference doesn't
require loading all cross-reference information for
the Reference.

Every document is split into two pieces, so that the title
of a document is roughly in its own piece. That way,
re-building the page of all installed documentation can be more
scalable (after some further changes).
2012-11-23 18:44:51 -07:00
Matthew Flatt
8c1b5db815 raco setup: build database mapping doc tags to "out.sxref"s
The `xref' produced by `setup/xref' uses the database to delay
loading "out.sxref"s, which cuts 64-bit DrRacket's initial
footprint by around 50MB (i.e., about 20%).
2012-11-23 18:44:50 -07:00
Robby Findler
0c6734f782 Add the contents of the "blue boxes" in the docs to the upper-right
corner of the definitions window, based on the information that check
syntax computes

This commit contains two separate changes to make this work:

  - adding a new renderer, based on the text renderer, that
    pulls out the contents of the blue boxes and saves them
    in the doc/ directories (specifically in the files named
    contract-blueboxes.rktd)

  - extend check syntax to use and display the information
    build by the new renderer
2012-08-12 08:41:46 -05:00
Robby Findler
6588493810 adjust a bunch of error printfs in raco setup so they include the
stacktrace (by calling error-display-handler). Not sure if this is
always safe, so including it in a separate commit for easy reversion.
2012-06-22 21:38:09 -05:00
Robby Findler
a5d9520274 Revert "a start on getting text rendering running automatically via 'raco setup'"
This reverts commit 6b5cd10670.
2012-06-18 11:27:42 -05:00
Robby Findler
6b5cd10670 a start on getting text rendering running automatically via 'raco setup' 2012-06-18 11:26:27 -05:00
Eli Barzilay
17090fca4f A bunch of fprintf' -> eprintf' conversions (and a few related things). 2012-05-06 12:06:00 -04:00
Matthew Flatt
8c2dc5ccb7 parallel `raco setup': print "running" before insead of after
That is, before actually running the document, so that the
"running" message is a useful indicator of what is happening
now.
2011-10-11 17:17:58 -06:00
Eli Barzilay
623c7493ed Some selective #:when (not ...)' -> #:unless ...'. 2011-09-16 10:48:18 -04:00
Matthew Flatt
5de2ea9547 fix absolute paths in cross-reference info
The absolute paths were introduced by support for parallel build,
which piggy-backs information in "in.sxref" to communicate among
processes. Since the information is persistent beyond that
cooperation, the information needs to be in relative form.

[Sorry for the reformatting noise, but the file's indentation was
 especially mangled.]
2011-09-04 09:53:36 -06:00
Matthew Flatt
43dd4c7ab9 path normalization in setup/scribble
Needed so that `raco setup' doesn't rebuild documents as it
decides, say, that the "games/cards" document depends on
"games/scribblings\\games.scrbl" instead of
"games/scribblings/games.scrbl".

Has this been needed for a while, or did it somehow
become needed with recent changes to `raco setup' to
support `raco link'?
2011-08-28 19:20:19 -06:00
Matthew Flatt
a7855e20a8 add `raco link'
includes a rewrite the "Module Basics" section of the Guide
2011-08-24 09:07:14 -06:00
Matthew Flatt
853e47f05e fix broken-link reporting by `scribble' 2011-08-22 07:58:05 -06:00
Matthew Flatt
3f447b39e2 refactor some parallel-build code
- simpler and more reliable break protocol
- use logging instead of `eprintf' for non-exception errors
- avoid runtime code duplication in parallel-do macro
- fix some non-tail calls that should be tail calls
- print relevant place in "making" lines
- minor source formatting
2011-08-19 12:56:27 -06:00
Kevin Tew
8aca195b35 fix class names 2011-07-14 10:14:33 -06:00
Eli Barzilay
3157955d40 ".ss" -> ".rkt" scan done. 2011-07-02 10:37:53 -04:00
Eli Barzilay
4da4a2759b New setup/path-to-relative' that supersedes unstable/dirs' and most of
`setup/private/path-utils'.

The API is a little different: instead of getting the alist and the
path, there's a curried function that gets the alist and produces a
function to do the substitutions.
2011-07-02 01:10:38 -04:00
Kevin Tew
3f1a6ee94a [Places] clean up parallel-do, docs now build with places 2011-04-18 16:25:03 -06:00
Matthew Flatt
1c60499923 fix nit: "running 2nd time" instead of "re-running 2nd time"
because "re-running 2nd time" should mean the 3rd run
2011-04-14 13:20:23 -06:00
Matthew Flatt
192c566294 fix temp file names when building PDFs of installed docs
Closes PR 11830
2011-04-14 12:40:18 -06:00
Kevin Tew
a42ea71113 Scribble with-compile-output fix 2011-01-20 15:57:39 -07:00
Kevin Tew
e5cc1dec84 Readable parallel doc errors following mflatt's suggestion 2011-01-17 17:39:47 -07:00
Kevin Tew
7b9cd25527 Fix doc making hang on error 2011-01-14 10:27:23 -07:00
Kevin Tew
264e7f2c15 Use worker-count for doc build 2011-01-11 12:44:09 -07:00
Kevin Tew
aa42f4a582 Fixed Warning output in parallel scribble build 2010-12-27 14:30:10 -07:00
Matthew Flatt
6ac33a62be set `read-accept-lang' to #t by default, plus related adjustments
including adding some uses of `with-module-read-parameterization'
 so that `read-accept-lang' is set right anyway; still, so many
 many places just set `read-accept-reader' to #t that making
 `read-accept-lang' #f by default looks like too big of an
 incompatibility
2010-10-08 19:01:33 -06:00
Kevin Tew
2c9f8cebbd Parallel Build: fix make-directory race condition 2010-09-10 11:52:24 -06:00
Eli Barzilay
7dc4d2e5a6 Change a bunch of "~%" and "~n" in format strings to "\n". 2010-08-25 17:17:01 -04:00
Matthew Flatt
5f1aa418f3 add collection-file-path and splace collection trees at the file level 2010-07-25 11:01:09 -05:00
Kevin Tew
81c4275220 Fix cross references 2010-07-24 23:06:43 -06:00
Kevin Tew
1111c48fdb Fix latex doc generation 2010-07-24 09:57:36 -06:00
Kevin Tew
5bb2e148de Parallel docs build 2010-07-22 02:39:57 -06:00
Sam Tobin-Hochstadt
ab70fed8a8 Scheme -> Racket in styles
Scribble style names.
 .tex and .css files
2010-06-08 16:40:47 -04:00
Eli Barzilay
d0ecc73df5 More plt-scheme -> racket-lang, specifically for planet and bugs urls. 2010-05-31 15:11:27 -04:00
Matthew Flatt
8b7c8d08bd add fix-point finding traverse pass to Scribble 2010-05-21 19:40:33 -06:00
Matthew Flatt
17c1dc1ab9 SHA-1-based checking of doc dependencies 2010-04-30 16:30:11 -06:00