Commit Graph

39518 Commits

Author SHA1 Message Date
Ben Greenman
88b165314a
fix pair accessor error messages (#2413)
Change the error message for some functions like `caddr` so they
describe pair structures that they expect
2018-12-04 16:04:01 -05:00
Ben Greenman
cbaa1b99d9
doc: logging, clarify 'none level and the level ordering (#2407)
add the `'none` log level to the intro paragraph,
 declare `'none` the level of "least detail",
 and change prose to say "subscribes to current level and lower"

+2 small rewordings
2018-12-04 16:03:38 -05:00
shhyou
8043768b4c Support unsyntax-splicing in vector quasisyntax
If the sub-template inside #(...) is unsyntax-splicing instead
of list, produce the template #((~@! . ????)) instead of calling
(datum->syntax o list->vector o syntax->list). Fixes #2402.
2018-12-04 12:00:01 -06:00
Matthew Flatt
5454b7d809 doc example repair
Fixes a typo in b3104a6acd.
2018-12-04 10:41:53 -07:00
Philip McGrath
b3104a6acd add #:result clause to for/lists and for*/lists 2018-12-04 10:12:43 -07:00
Matthew Flatt
6d8596bae3 raco setup: repair more problems with multi-cross mode
Fix some race conditions involving concurrent setup tasks that are
each trying to generate both machine-independent bytecode and
machine-specific bytecode.
2018-12-04 06:05:53 -07:00
Ben Greenman
b38ce36c92
glob: add 'glob-quote' (#2397)
add a function to escape any glob wildcards in a path or string

also add a private `glob-element->filename` function so that, e.g., the pattern
`a\*` matches the file named `a*` (previously, the match would fail and
I think it was impossible to match for only `a*`)
2018-12-04 00:21:14 -05:00
Matthew Flatt
e729d35915 bump version number
Should have bumped with 37929f2191.
2018-12-03 20:24:13 -07:00
Gustavo Massaccesi
d8d94b1549 Build cs variant on Travis, but allow failure.
With this script the "default" value of RACKETCS_SUFFIX is effectively ""
instead of "cs" as in the make file.
This is a minor incompatibility/unexpected behavior that will get eventually
solved when the real default changes to "".
2018-12-02 20:16:05 -05:00
Sam Tobin-Hochstadt
6e8f47788f Build cs variant on Travis, but allow failure. 2018-12-02 20:16:05 -05:00
Matthew Flatt
37929f2191 cs: make interp layer safe-for-space
Fix the fallback interpreter (which is used for the "outside" of a
module that is too big to compile) so that it's safe-for-space.

This change is unlikely to repair any immediate problems, but space
safety problems are difficult to detect and avoid when the underling
implementation is not safe-for-space so fixing the interpreter is
likely worthwhie in the long run.
2018-12-02 15:58:59 -07:00
Matthew Flatt
74abc61f03 cs: fix module-prompt handling in interpret mode 2018-12-01 09:33:23 -07:00
Matthew Flatt
0c6d22a04a hash-ref: guard against fixnum argument when JIT-inlined
Closes #2409
2018-12-01 06:22:08 -07:00
Matthew Flatt
3a19809268 compiler/cm: protect a ".dep" use against old versions 2018-12-01 06:00:49 -07:00
Matthew Flatt
b94f84a909 expander: load modules on demand for recompile 2018-11-30 22:54:10 -07:00
Matthew Flatt
68e105c0ed cs: prompts for module-body expressions
Module definitions and expression need to have a prompt around them to
delimit continuation capture, variable assignment needs to happen at
the right point to ensure that reassignment is guarded and
non-assignment is detected. But avoid the prompt when it's not needed,
such as around function definitions.

Closes #2398
2018-11-30 22:54:10 -07:00
Matthew Flatt
6f0748108c cs: fix module-variable initialization order
Similar to a255def019, but for side effects potentially
exposed by definition RHS expressions, instead of
expressions not in a definition. Improve that commit and
this one by only forcing variable assignments at non-simple
expressions.
2018-11-30 22:54:10 -07:00
Matthew Flatt
8b15ad971c cs: fix embedded modules in places 2018-11-30 22:54:10 -07:00
Matthew Flatt
f2fb2ebc55 racketcs: fix command-line handling after non-flag argument 2018-11-30 22:54:10 -07:00
Sam Tobin-Hochstadt
1bf17f7743 Don't set this up quite yet. 2018-11-29 21:49:16 -05:00
Sam Tobin-Hochstadt
28ba449102 Add issue templates 2018-11-29 21:46:20 -05:00
Philip McGrath
bd7de80d98 raco pkg new: Remove deprecated sudo: false from .travis.yml
Travis is eliminating its container-based infrastructure
and deprecating the `sudo` keyword.

This commit also updates the example build matrix to use
more recent Racket versions.

Corresponds to https://github.com/greghendershott/travis-racket/pull/29
2018-11-29 19:21:13 -05:00
Philip McGrath
4362e98b58 Clarify docs for filter-map (#2405)
See discussion on the mailing list: https://groups.google.com/d/topic/racket-users/8vyJX9MqMFY/discussion
2018-11-29 16:00:04 -08:00
Matthew Flatt
4d032bdd64 adjust raco exe tests to use racocs, etc. 2018-11-29 10:38:40 -07:00
Matthew Flatt
2e3b16f77c makefile: fix redundant path separators 2018-11-29 10:08:19 -07:00
Matthew Flatt
e607ae09de makefile: speed up make in "cs" build directory
Take advantage of ".d" files that are already generated to speed up a
`make` in the "cs" build dierctory when nothing needs to be done.
2018-11-29 09:41:49 -07:00
Matthew Flatt
50cb877184 makefile: fix SERVER_COMPILE_MACHINE handling
More targets need to support the `SERVER_COMPILE_MACHINE` option.
2018-11-29 06:23:01 -07:00
Philip McGrath
2798608ccd cs: fix error message from raise-argument-error
Closes https://github.com/racket/racket/issues/2400
2018-11-28 06:19:12 -07:00
Matthew Flatt
7823b6eecf raco decompile: support machine-independent bytecode 2018-11-27 20:59:52 -07:00
Matthew Flatt
a7499ab854 expander: more determinsitic machine-independent "bytecode"
Discard local-variable names to avoid `gensym` artifacts in the same
way that a more complete compilation would discard the names. This
change does not affect function names, which are preserved through
separate properties.
2018-11-27 20:01:43 -07:00
Matthew Flatt
8c6af1a234 expander: avoid format in common paths
Use `string-append`, `symbol->string`, etc., instead of `format` for
constructing some symbols.
2018-11-27 19:26:59 -07:00
Matthew Flatt
432dfcdb4a hash-{map,for-each}: strengthen try-order? guarantee
Promise a specific order for a hash table that uses only certain
primitive, non-compound datatypes for keys.
2018-11-27 17:50:48 -07:00
Matthew Flatt
da62067d8f maefile: adjust SERVER_COMPILE_MACHINE convention
The old way wasn't delivering needed information to
`distro-build/drive-clients`.
2018-11-27 10:34:52 -07:00
Matthew Flatt
5f940e462e call-with-atomic-output-file: option to make Windows moves more atomic
It most cases, it's more important for `compiler/cm` to reliably
replace a file that might be busy than to make the file update atomic.
To suport that kind of use, `call-with-atomic-output-file` implemented
a fairly reliable, multi-step, non-atomic process for replacing a file
on Windows.

For recompilation of bytecode in machine-independent form, however,
`compiler/cm` now really wants to atomically write a replacement
bytecode file. That's not generally possible on Windows (except on
NTFS with transactions, which are discouraged...), but MoveFileEx work
atomically in some cases and it's likely to work for the cases needed
by `compiler/cm`. Probably.

So, add a mode to `call-with-atomic-output-file` to get "more atomic"
updates on Windows. This mode is enabled by a callback that makes the
caller responsible for deciding what to do with the move fails, such
as waiting a while and trying again. And `compiler/cm` now waits a
while and tries again, up to a limit, which should be good enough for
recompilation.
2018-11-27 09:47:11 -07:00
Robby Findler
b68866db0f added object=-hash-code 2018-11-27 16:00:24 +01:00
Matthew Flatt
a001b5b231 raco setup: multi-machine cross-compile support
Enable `raco {setup|make}` to build two sets of compiled files: one
set that is suitable for the current machine, and another set that is
suitable for a different machine or for all machines (i.e.,
machine-independent bytecode).

In the long run, this new `raco setup` mode support cross compilation
where the build machine and target machine have different bytecode
formats --- unlike the current cross-compliation mode, which relies on
there being a single bytecode format in traditional Racket for all
platforms.

In the short run, the new mode enables the faster creation of
Racket-on-Chez distribution builds. The build server can send out
machine-independent bytecode to client machines while using
machine-specific bytecode for itself to drive the build process.

The new compilation mode relies on a somewhat delicate balance of the
`current-compile-target-machine` and `current-compiled-file-roots`
parameters (as reflected by the `-M` and `-R` command-line flags for
Racket) as well as cross-compilation mode (as enabled by the `-C`
command-line flag).
2018-11-26 19:49:33 -07:00
Matthew Flatt
4a080ada04 system-type: add 'target-machine
The 'target-machine result from `system-type` reports the
default value of `current-compile-target-machine`.

Also, fill in pieces to make `setup/cross-system` work
for RacketCS, although cross-compilation is still several
steps away.
2018-11-25 12:10:09 -07:00
Matthew Flatt
7cdf9f1c0b raco setup: remove -M/--compile-any
This commit mostly reverts 9441f7075f, because it looks like relying
on `racket`-level configuration is the right idea after all.
2018-11-25 12:10:09 -07:00
Matthew Flatt
695e270197 compiler/cm: avoid race in recompile
The new path for recompiling from machine-independent files
trues to read a ".zo" file without holding the recmopilation
lock and without an `exn:fail:filesystem` handler.
2018-11-25 08:11:21 -07:00
Matthew Flatt
3833a22f75 setup: leave cm trace handler alone in places
When `--vv` is not provided, leave the default `compiler/cm` trace
handler in place so that logging works as intended.
2018-11-25 08:06:28 -07:00
Matthew Flatt
055642a40a raco setup: less eager removal of ".zo" files
Wait until replacement is more assured before deleting an existing
".zo" file.

Also, don't delete a ".zo" file that is later in the
`current-compiled-file-roots` search path than the one being written.
This refinement supports setting up a search path to try
machine-specific compiled files and fall back to machine-independent
files, for example.
2018-11-24 19:39:01 -07:00
Matthew Flatt
f4a08af16b makefile: add setup step after unpack-collects
When unpacking a "collects" tree that is compiled in
machine-independent mode, an extra `raco setup` is needed
before `raco pkg`.
2018-11-24 13:59:56 -07:00
Matthew Flatt
a70c1b5242 compiler/cm: add missing version check 2018-11-24 12:02:41 -07:00
Matthew Flatt
1d2a7dec62 raco setup: show target machine in startup info 2018-11-24 11:46:36 -07:00
Matthew Flatt
e87d03cdc0 makefile: propagate SETUP_MACHINE_FLAGS to distro-build 2018-11-24 11:38:58 -07:00
Matthew Flatt
9441f7075f raco setup: add -M/--compile-any
Add `-M`/`--compile-any` to `raco setup`, `raco pkg install`, etc., to
build machine-independent bytecode, which is useful in the process of
building distributions.
2018-11-24 11:19:09 -07:00
Matthew Flatt
0bc010d972 raco setup: avoid recompilation in parallel mode
The `parallel-lock-client` protocol expects a #f back when a
file was meanwhile compiled by another process. So, don't
just forget about a file after it is compiled, in case there
is still a lock request on the way for that file.
2018-11-23 18:14:42 -07:00
Matthew Flatt
4946196c91 recompile-linklet: accept option argument
Add an options argument for consistency with `compile-linklet`.
2018-11-23 18:04:48 -07:00
Matthew Flatt
ac70e9a058 compiler/cm: detect and take recompilation shortcut
When a module is compiled to platform-independent form, recompile from
that form for the current platform, instead of recompiling from source.
2018-11-23 17:59:20 -07:00
Matthew Flatt
1c437793a6 expander: fix another recompilation problem
Fix merging of extra-inspector sets, which recompilation ignores
anyway.
2018-11-23 11:28:51 -07:00