Commit Graph

39327 Commits

Author SHA1 Message Date
Matthew Flatt
16347b434d cs: fix raise-result-arity-error 2018-10-11 06:01:07 -06:00
Matthew Flatt
191d17461f hash-ref: adjust error message for bad failure thunk
Refines 2ef8d60cc6 to avoid characterizing the failure as a `(-> any)`
contract on `hash-ref`, since `hash-ref` doesn't enforce that contract
in general. Go back to an `exn:fail:contract:arity` error, but keep
the specialization of the error message to clarify that it's from
`hash-ref`. Also, bring RacketCS into sync.
2018-10-11 06:01:07 -06:00
Alexis King
15280640d4 Track disappeared define-syntaxes in internal definition contexts 2018-10-10 11:54:44 -05:00
Jordan Johnson
5376a4b409 Clarify match's app pattern behavior (#2306)
If I have understood the behavior of ```app``` correctly, the documentation needs to be clarified. Currently it implies that match expects a single result, and one could reasonably infer that the matcher will require that single result to satisfy all ```_pat```s given. The error message resulting from a reasonable-but-wrong pattern like ```(app string->number (? number?) x)``` is inscrutable, so a doc fix is important here.

I have also added an example that illustrates the use case that led me to submit this PR.
2018-10-10 09:27:21 -04:00
Matthew Flatt
2b9c0c4689 avoid using directory-exists? as part of a contract
Although a `directory-exists?` check is useful for providing better
error messages, it's fundentally a race condition, since an external
process can always remove a directory between the check and a use of
the directory. Because of that limitation of `directory-exists?`, we
normally avoid making it part of a contract. This commit adjust
937aa3cdb1 to follow that convention while preserving the helpful
check and documentation improvements.
2018-10-10 06:26:57 -06:00
Alexander McLin
6c0d193132 Fix references to raco setup and raco make in generate-stripped-directory doc. 2018-10-10 05:51:20 -06:00
Alexander McLin
af9cf01ea3 pkg: add missing option to documentation 2018-10-10 05:51:20 -06:00
Alexander McLin
937aa3cdb1 pkg: fix check-strip-compatible and generate-stripped-directory
Their semantics assume all directory `path-string?` arguments point
to existing directories in the filesystem but they do not actually
check to verify resulting in unhelpful inner exceptions
breaking the functions' semantic abstractions.

Fixed by adding appropriate checks.

Test cases included too.

Documentation updated to reflect the requirement for paths to
refer to existing directories.

Also added note that `generate-stripped-directory` does not
compile or render source files.
2018-10-10 05:51:20 -06:00
Alexander McLin
aecc786b7f pkg: repair file:// URL handling for strip modes
When catalog is specified via file:// URL to a local directory with local
package directories that have been stripped in various modes, `raco pkg install`
will incorrectly error out with an incompatible package content error when
a binary strip mode is selected and a file-system error when source strip
mode is selected.

The cause is due to the file:// URL's resolved file path not being passed
along to the helper functions in the various code paths handling the different
strip modes; instead the full original file:// URL is passed along and is
misinterpreted as an actual filesystem path resulting in the observed failure
modes.

The repair is simple; change the relevant argument so the resolved filesystem path
is used instead of the original file:// URL.

Test cases added to test various combinations of strip modes when using
`raco pkg install` and local catalog directory.
2018-10-10 05:51:20 -06:00
Matthew Flatt
ec837e8eb1 places: fix serialization of hash tables as place messages
I'm not sure why thinsg seemed to work before, but an existing
test fails after recent chages.
2018-10-09 15:51:54 -06:00
Matthew Flatt
de753399b6 racketcs: add support for -m flag 2018-10-09 15:07:49 -06:00
Matthew Flatt
238e2c7861 places: fix handling of OS-level errors during serialization
When a file descriptor cannot be `dup`ed for a place message, the
error message has to be delayed until the partially copied message is
cleaned up. Various problems with the message-serialization code
caused that delay to work incorrectly or incompletely.

Closes #2305
2018-10-09 15:07:49 -06:00
Matthew Flatt
fcf080cf93 fix typo in comment 2018-10-09 15:07:49 -06:00
Stephen Chang
a9e0dc525e
define-struct doc: linkify syntax-procedure-alias-property 2018-10-09 12:59:26 -04:00
Matthew Flatt
3acb1a5162 cs: fix build with non-threaded scheme 2018-10-08 15:27:53 -06:00
Matthew Flatt
076684b123 bytecode compiler: fix mishandling of export names
The repair in 4396b841c0 for internal names exposed a problem with the
way `linklet` handled renaming on export, where it mixed up the names
that should be used internally and externally in errors.

Merge to v7.1
2018-10-08 15:05:39 -06:00
Matthew Flatt
70bfd55696 schemify: add a missing unwrap
Anothe repair related to the 'source-name property.
2018-10-08 12:57:12 -06:00
Matthew Flatt
c102673339 thread: add some reminders to the implementation
These comments were meant to be part of e60a78aad9.
2018-10-08 12:57:12 -06:00
Paulo Matos
62c63de7a2 Remove unused modpath->string 2018-10-08 12:56:15 -06:00
Leif Andersen
04a2c54d56
Clean up the documentation on cross phase persistent modules (#2275) 2018-10-08 13:29:53 -04:00
Vincent St-Amour
1d8806e0bb Post-release version for the v7.1 release 2018-10-07 10:23:13 -05:00
Matthew Flatt
e60a78aad9 thread: custodian shutdown of current suspend-to-kill thread 2018-10-05 20:55:21 -06:00
Matthew Flatt
b57b9be2f8 schemify: repair after adding 'source-name property 2018-10-05 20:55:21 -06:00
Ben Greenman
64e12d8965 doc: add 'set-subset?' to search index 2018-10-05 14:26:35 -04:00
Matthew Flatt
e94a519d44 cs: fix integer->integer-bytes
Closes #2277
2018-10-04 19:20:34 -06:00
Matthew Flatt
4396b841c0 fix expander+compiler to report source name for use-before-init
Lots of plumbling was in place to preserve the source name (instead of
the symbol generated to avoid collisions for macro-introduced
definitions), but some small pieces were missing.

Closes #2288
2018-10-04 18:52:05 -06:00
Matthew Flatt
daba4f518b places: repair detection of mutable prefabs 2018-10-04 15:37:06 -06:00
Matthew Flatt
c2b5e4404a rumble: fix hash-set error message 2018-10-04 15:36:51 -06:00
Matthew Flatt
ed3f9bfd6b Inside: remove unclear and unhelpful paragraph
Prompted by and relevant to #2295
2018-10-03 11:58:41 -06:00
Alexis King
d5fbd47a80 Fix an issue with the documentation for local-apply-transformer 2018-10-03 10:53:29 -05:00
Matthew Flatt
adfe862a0b cs: make make expander-demo work in a fresh checkout 2018-10-03 08:58:44 -06:00
Matthew Flatt
8a5de6c27f reader: remove some broken tests 2018-10-03 08:58:44 -06:00
Paulo Matos
5bbbe44a7b Fix ubsan runtime error due to large shift 2018-10-02 14:14:04 -06:00
Paulo Matos
15523f68ec Fix sizeof argument 2018-10-01 10:56:36 -05:00
Paulo Matos
5834a4b938 Remove unused code
Fixes #2290.
2018-10-01 10:56:12 -05:00
Paulo Matos
bc3777792d Only copy argv if not NULL
Fixes #2283.
2018-09-24 05:28:47 -06:00
Matthew Flatt
e83ca7a9e5 native-libs: merge Pango repair for emoji iteration 2018-09-22 20:37:34 -06:00
Matthew Flatt
27bb075113 native-libs: restore a Cairo patch
When upgrading native-library versions, a still-relevant
patch got lost. The patch corrects a problem with empty
glyphs getting treated as missing glyphs.

Closes racket/pict#42
2018-09-22 20:28:13 -06:00
Matthew Flatt
45af149fc0 dynamic-place: fix use of expanders module-predefined?
Closes #2278
2018-09-22 18:34:43 -06:00
Matthew Flatt
d06f6e7c4e cs: offer compiler-pass statistics
When `PLT_LINKLET_TIMES` is set, enable pass timing and report
a simple summary along with other times.
2018-09-22 18:34:43 -06:00
Paulo Matos
48302284a8 Avoid shift by negative number by turning condition around
Avoid undefined behaviour in condition which could shift by negative i. By checking first if `i >= 0` we avoid that case.
2018-09-22 14:19:10 -06:00
Paulo Matos
49d31414b7 Fix condition to avoid undef behaviour
Coverity scan uncovered an issue where by if `p == 31`, the following shift `1 << (p + 1)` will cause undefined behaviour.
2018-09-21 09:02:25 -06:00
Ryan Culpepper
0ceb67ebc6 openssl: guard default cert location setup with libcrypto check
Commit dc8a2ca6 removed the check, which caused problems
when libcrypto.so is not found.
2018-09-17 15:51:58 +02:00
Ben Greenman
710cbd25bf stream*: allow 1 argument 2018-09-16 21:21:06 -04:00
Ryan Culpepper
2670a932f8 fix bugs caught by optimizer etc warnings 2018-09-15 21:05:04 +02:00
Sam Tobin-Hochstadt
4eceeb5be4
Add mac tests on Azure. 2018-09-15 12:43:54 -04:00
Sam Tobin-Hochstadt
1eb31964a8
Set up CI with Azure Pipelines (#2260)
Includes windows testing. Many thanks to @chrisrpatterson for help with setting this up.
2018-09-15 12:07:36 -04:00
Alexis King
c0788127ae Make cond track disappeared-uses for => and else 2018-09-13 13:15:34 -05:00
Matthew Flatt
d5aa191fb2 custom-hash: fix ephemeron race
The pattern

  (ephemeron-value
   (hash-ref! intern key
     (lambda ()
       (make-ephemeron key (wrap key)))))

is wrong, because a GC might happen between the time that the
epehemeron is found in the table (or the time that the key was just
added to the table) and the time that `ephemeron-value` is called to
extract the value. If the key is not otherwise accessible, the value
may no longer be in the ephemeron.
2018-09-13 11:11:27 -06:00
Matthew Flatt
9772c05040 cs: fix more problems with GC in an arbitrary Scheme thread 2018-09-13 10:48:26 -06:00