Commit Graph

490 Commits

Author SHA1 Message Date
Kimball Germane
f4abd52fa7 Language-level demodularizer.
original commit: c9f4b96f88
2013-06-12 05:56:52 -06:00
Matthew Flatt
4cdad9dec2 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.

original commit: 198a65a5fc
2013-05-16 11:50:04 -06:00
Matthew Flatt
2837513428 fix `raco exe' test
original commit: b3e2d35be9
2013-05-08 12:31:34 -04:00
Matthew Flatt
8254cd3d98 add `configure-runtime' submodule support
A language can now introduce a `configure-runtime' submodule that
is `dynamic-require'd before the enclosing module.

This new submodule protocol provides a more general and
easier-to-understand way of configuring the run-time environment for
a module's language, as compared to the `module->language-info'
path (through a `get-info' function, via a 'configure-runtime value,
and finally loading the specified module).

The `module->language-info' path remains in place, and it is
checked after a `configure-runtime' submodule is run, since
that order is likely to be the most backward compatible.

original commit: 27f1b39294
2013-05-07 08:31:16 -04:00
Matthew Flatt
0416b4a5ff raco setup: allow foreign-lib and man-page installation
This change hopefully fills out the things that a distribution
can do and that packages should be able to extend.

original commit: 03b35cd846
2013-05-03 09:13:41 -06:00
Jay McCarthy
bd9cf60613 Adding summary mode, quiet program mode and changing tests/eli-tester to cooperate so it adds useful information in summary mode
original commit: ccf1119b68
2013-05-02 14:49:58 -06:00
Matthew Flatt
072bc1110c raco setup: add --doc-index; raco pkg: use --doc-index
This combination of changes moves the decision about rebuilding
"scribblings/main" and "scribblings/main/user" to `raco setup',
which is in a better position to know whether documentation should
be built at all.

original commit: 413ca68435
2013-05-02 12:18:40 -06:00
Eli Barzilay
45310eee82 raco test: make -r' and -x' mutually exclusive.
original commit: 02d7f58cc1
2013-04-20 02:04:42 -04:00
Matthew Flatt
58ce10c2ee demote some `raco' commands
The commands `link', `pack', and `unpack' are now
discouraged in favor of `pkg'.

original commit: 3e1ecc41b4
2013-04-17 12:28:50 -06:00
Matthew Flatt
cdbe3e0aaf 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.

original commit: 51d48f3ab4
2013-04-17 12:28:50 -06:00
Matthew Flatt
4af90112d0 pkg/lib: lock clean-up, and add `path->pkg'
Make the installed-package database lock reentrant, change some
functions to take the lock, and fix the documentation on when a
lock is expected to be taken outside of functions.

original commit: 10e53e3bf4
2013-04-16 08:58:19 -06:00
Matthew Flatt
77833ba35b pkg/lib: clean up names and package-scope parameter
More consistent exported names and parameters that better match the
three scope choices (installation, user, or shared) --- cleaning up
after myself.

original commit: 267ac03279
2013-04-16 08:58:19 -06:00
Jay McCarthy
ab3a963a1b Removing the planet2 name from the code
original commit: 9f337c632a
2013-03-22 07:45:14 -06:00
Jay McCarthy
8bde42b9d5 Adding test logging facility to rackunit and eli-tester, with its own test and docs
original commit: 804791b011
2013-03-21 07:02:50 -06:00
Eli Barzilay
caa7435c1a Fix lots of indentation mistakes.
(Found by my ayatollah script...)

original commit: af6be85ff5
2013-03-14 10:55:47 -04:00
Matthew Flatt
bd39158cab terminology change again: "cross-phases persistent" modules
original commit: 88a36a077c
2013-02-27 08:53:43 -07:00
Matthew Flatt
02fb754fac minor decompiler tweak
original commit: a46849f3b9
2013-02-27 08:53:43 -07:00
Matthew Flatt
d728e9118d try "phase-collapsing" instead of "phaseless"
original commit: 2646ff6895
2013-02-26 19:01:36 -07:00
Matthew Flatt
e97bb74005 add experimental support for "phaseless" modules
The intent is to support phase-crossing data such as the `exn:fail:syntax'
structure type that is instantiaed by macros and recognized by contexts
that use `eval' or `expand'. Phaseless modules are highly constrained,
however, to avoid new cross-phase channels, and a module is inferred to
be phaseless when it fits syntactic constraints.

I've adjusted `racket/kernel' and improved its documentation a little
so that it can be used to implement a phaseless module (which can
import only from other phaseless modules).

This change also adds a `flags' field to the `mod' structure type
from `compiler/zo-structs'.

original commit: 899a3279c2
2013-02-26 14:55:28 -07:00
Robby Findler
0deb045dde tweak raco test output, yet again
original commit: 86b1f276eb
2013-02-07 10:16:16 -06:00
Robby Findler
12592019cd change raco test's announcements to say "raco test"
original commit: 7750cf9800
2013-02-07 06:58:11 -06:00
Matthew Flatt
cde0a28779 make raco test' more like racket'
Instad of `(dynamic-require .. #f)', use `(dynamic-require .. 0)', which
has the effect of making compile-time code "available" (see docs) in
case the loaded module uses `eval' on syntax objects that refer to
non-kernel syntax.

original commit: 0aaf6b8086
2013-02-06 18:09:03 +01:00
Robby Findler
55edebebbd adjust raco test so it test the command-line
arguments to the empty vector before running anything

original commit: 2b7c6e32a9
2013-02-04 20:38:34 -06:00
Robby Findler
80dd8d58f7 change printouts from raco test to be slightly more informative
original commit: 44e91ea961
2013-02-03 15:31:40 -06:00
Robby Findler
81b3b34895 adjust raco test so that it accepts multiple -s arguments on the command-line
This is, afaict, a completely backwards compatible way to add this
functionality in the sense that any of the non-error command-line
arguments passed to raco test before still do precisely the same
things

original commit: 9fd4698be9
2013-02-03 13:14:55 -06:00
Matthew Flatt
06eb0e67e2 repairs to extflonum changes
original commit: 28493dcc88
2013-01-29 05:53:30 -07:00
Michael Filonenko
cb9baa4f4d extflonums
An extflonum is like a flonum, but with 80-bit precision and
not a number in the sense of `number?': only operations such as
`extfl+' work on extflonums, and only on platforms where extflonums
can be implemented by hardware without interefering with flonums
(i.e., on platforms where SSE instructions are used for
double-precision floats).

[Patch provided by Michael Filonenko and revised by Matthew.]

The compiler tracks information about bindings that are known to
hold extflonums, but the JIT does not yet exploit this information
to unbox them (except as intermediate results).

original commit: 17b8092641
2013-01-28 18:17:06 -07:00
Jay McCarthy
c13876971b Working with links in collection testing
original commit: 3312a8064d
2013-01-10 10:45:54 -07:00
Jay McCarthy
22acfa3cba test - Supporting packages in raco test
original commit: 9015c15eec
2013-01-09 08:12:56 -07:00
Jay McCarthy
ea00418cfe Extending raco test to work on collections
original commit: 3e0fff7dff
2013-01-09 07:59:47 -07:00
Matthew Flatt
3c01f128b9 raco exe: yet another submodule repair
Closes PR 13410

original commit: e66cd6f9c7
2013-01-05 09:12:47 -07:00
Matthew Flatt
3b9e13b38f fix to bytecode compiler's propoagation of local-type info
This is another old bug that could have caused validation failures
with flonums, but it showed up with fixnum tracking because fixnums
are more common (e.g., from `string-length').

There were really two bugs: information installed at the
wrong offet in one place, and a failure to detect that information
should be propagated in a different place. Fixing both avoids
a validation problem with `html/sgml-reader'.

original commit: afca33b78b
2012-11-18 10:31:20 -07:00
Matthew Flatt
bbc7d243e9 fix compiler/zo-marshal
Missed some updates for recent local-type changes. Also, fix up a
few field names in the demodularizer.

original commit: d7eddb91ef
2012-11-15 06:18:05 -07:00
Matthew Flatt
d003549257 bytecode compiler: generalize local-type tracking for unboxing
Track fixnum results in the same way as flonum results to enable
unboxing, if that turns out to be useful. The intent of the change,
though, is to support other types in the future, such as "extnums".

The output `raco decompile' no longer includes `#%in', `#%flonum',
etc., annotations, which are mostly obvious and difficult to
keep in sync with the implementation. A local-binding name now
reflects a known type, however.

The change includes a bug repair for he bytecode compiler that
is independent of the generalization (i.e., the new test case
triggered the old problem using flonums).

original commit: bdf1c3e165
2012-11-14 19:37:01 -07:00
Matthew Flatt
85715ca473 fix demod for submodules
original commit: 623265d1e8
2012-11-12 07:47:30 -07:00
Matthew Flatt
03c5a46331 fix `lazy-require' in phase levels other than 0
The `lazy-require' form expands to `define-runtime-module-path-index',
whch doesn't work right at phase levels other than 0. Work around the
problem by generating a submodule to hold the
`define-runtime-module-path-index' form.

This repair fixes `raco exe' on certain uses of `match', which in turn
uses `lazy-require' at compile time.

Also, use `register-external-module' to generate appropriate
dependencies on lazily loaded modules.

original commit: 6b16679b39
2012-11-11 09:38:16 -07:00
Eli Barzilay
0dd947ab15 #lang racket' -> #lang racket/base' conversions in demodularizer.
original commit: 4c8d1f67b2
2012-11-07 08:03:45 -05:00
Matthew Flatt
ad98dc0ddf track import "shapes" as procedure or structure type
Shape information allows the linker to check the importing
module's compile-time expectation against the run-time
value of its imports. The JIT, in turn, can rely on that
checking to better inline structure-type predicates, etc.,
and to more directy call JIT-generated code across
module boundaries.

In addition to checking the "shape" of an import, the import's
JITted vs. non-JITted state must be consistent. To prevent shifts
in JIT state, the `eval-jit-enabled' parameter is now restricted
in its effect to top-level bindings.

original commit: d7bf677645
2012-10-30 13:29:28 -06:00
Matthew Flatt
4807353e8d bytecode validator: check "constant" annotations on variable references
Bytecode changes in two small ways to help the validator:
 * a cross-module variable reference preserves the compiler's
   annotation on whether the reference is constant, fixed, or other
 * lifted procedures now appear in the module body just before the
   definitions that use them, instead of at the beginning of the
   module body

original commit: e59066debe
2012-10-19 11:27:52 -06:00
Matthew Flatt
5eaf286081 fix raco exe' for module+' submodules
Closes PR 13116

Merge to v5.3.1

original commit: e1a6d2b07d
2012-10-17 16:28:41 -06:00
Matthew Flatt
639af63b3f fix planet `raco exe' tests
Merge ot v5.3.1

original commit: bd146e2d8d
2012-10-17 16:28:41 -06:00
Matthew Flatt
f6441369d9 raco exe: handle failing submodule search correctly
An attempt to detect a submodule could trigger the original module
name resolver when the would-be enclosing module would be handled
by the embedding-specific resolver. When a submodule is not found
but its would-be enclosing module is embedded, then assume that
the default resolver wouldn't find the submodule, eithe --- and
therefore avoid a potential "collection not found" error.

original commit: 3fb12b4ff4
2012-09-23 10:47:24 -05:00
Matthew Flatt
841bbb465d compiler/zo-marshal: repair mashaling of import info in syntax
original commit: 0bd53a3549
2012-08-06 15:32:27 -06:00
Matthew Flatt
462f389bb2 normalize module rename info to vector in ".zo" format
This is related to the receent repairs for submodules and
`variable-reference->namespace'.

Merge to v5.3

original commit: 5a1bc5ad40
2012-07-24 07:22:57 -05:00
Matthew Flatt
3c46e5fdc6 fixes for submodules and `variable-reference->namespace'
Closes PR 12925

Merge to 5.3

original commit: d95ec4d454
2012-07-22 11:54:46 -05:00
Matthew Flatt
3fcc8dc945 more submodule repairs for `raco exe'
original commit: a605183a0a
2012-07-16 10:02:13 -06:00
Matthew Flatt
a8aec864b9 `raco decompile' fix
original commit: c69ea5569f
2012-07-01 09:25:12 -06:00
Matthew Flatt
4be962e720 fix problems with references to bindings at higher phases
original commit: 577cf4592e
2012-06-27 09:57:50 -06:00
Matthew Flatt
359eb87abb fix zo-parse, zo-struct, etc. for context in whole-module import
original commit: 6173b7eb05
2012-06-23 05:21:53 -07:00
Matthew Flatt
fd364dc2de raco exe: checks on source and destination paths
Disallow creating a launcher whose source is the launcher itself,
for example.

original commit: 2fcb635790
2012-05-28 20:30:58 -06:00