Commit Graph

38582 Commits

Author SHA1 Message Date
Matthew Flatt
af7a520102 rktio: header and extraction improvements for FFI 2017-06-29 14:36:43 -06:00
Matthew Flatt
63146e5451 ffi/unsafe/custodian: handle already-shutdown custodians 2017-06-29 14:36:42 -06:00
Matthew Flatt
eb24c1e0b1 find-relative-path: correct contract in docs
Also, avoid a test on Windows that can't work there.
2017-06-29 13:26:24 -06:00
Matthew Flatt
7939e32a57 docs: fix {read,peek}-{byte,char}-or-special argument order 2017-06-29 13:20:57 -06:00
Daniel Feltey
e289750b03 Fix box/c typo/bug
Previously non-flat box/c contracts would always use the `write` contract to
check the contents of the box rather than the `read` contract.
2017-06-28 14:48:35 -05:00
Ben Greenman
04c1c15d89 bug: add guard against string-paths in 'find-relative-path'
Add guard, if first argument to `find-relative-path` is not a path,
 then don't call `path-convention-type` on it.

Thanks to Jack Firth for reporting:
https://github.com/racket/rackunit/pull/46
2017-06-28 10:19:50 -04:00
Sam Tobin-Hochstadt
f9a39531e9 Fix a very old race condition in this test.
Probably exposed by the rktio changes.
2017-06-26 17:56:23 -04:00
Matthew Flatt
76711dfb50 net/git-checkout: adjust ADLER32 check to work with streaming
Don't for an inflated stream to be held completely in memory.
2017-06-26 13:49:18 -06:00
Lehi Toskin
d7db2aff59 net/git-chckout: check ADLER32 after inflate
Check ADLER32 after inflate, instead of assuming that the inflated bytes
are correct.
2017-06-26 13:48:10 -06:00
Matthew Flatt
06a6d290fd rktio: fix bug merging fd sets when poll() is not available 2017-06-25 11:08:53 -06:00
Matthew Flatt
3e8ad02334 rktio: add some missing #includes in some configurations 2017-06-25 08:39:05 -06:00
catull
95ddfa4972 Typo: (fir l) was probably meant to be (fist l). 2017-06-25 01:18:50 -04:00
Matthew Flatt
7a8145875c rktio: configure adjustment intended to fix OpenIndiana build 2017-06-24 17:07:33 -06:00
Ryan Culpepper
44eb5532ad syntax/parse: add ~or* and ~alt, like ~or{S,H} and ~or{EH}, respectively 2017-06-24 17:07:55 -04:00
Alexander McLin
113049607a Changed the code to pass through the prep-status to the outer HANDLE so
error reporting is uniformly handled and any SQL_BUSY errors are properly identified.
2017-06-24 17:06:42 -04:00
Alexander McLin
ed481865cf Based on PR #1704 feedback, rename copy-buffer to trim-and-copy-buffer and
adjust `string-trim` to only perform right-wise trimming of the buffer.
2017-06-24 17:06:42 -04:00
Alexander McLin
dfd585db33 Any well-formed single statement query which is terminated by a semi-colon and has extra space after the semi-colon raises 'multiple statements given' error.
The cause is any extra space after a terminating semi-colon in a SQL string passed to sqlite3_prepare_v2 procedure in the prepare1* method of `db` Sqlite3 connection% implementation will result in non-false tail and zero prep-status values being returned. The checking code sees the non-false tail value and raises the "multiple statements given" exception.

The easy fix is to trim any trailing whitespace by calling string-trim on the buffer string before its converted to a byte string in the copy-buffer procedure used by sqlite3_prepare_v2 to initialize the sql-buffer.

See Issue #1702
2017-06-24 17:06:42 -04:00
Alexander McLin
31d7dd0317 Certain malformed queries such as "SELECT ,* FROM SomeTable" (which has an incorrect extra comma) raise "multiple statements given" error while Sqlite3 actually generates a syntax error that doesn't get returned as a raised exception.
The same problem is encountered when executing a DDL statement such as "Create Table" more than once after the table had already been created by the first execution.

The cause is when sqlite3_prepare_v2 encounters a bad statement, it aborts the preparation, sets prep-status flag to non-zero and also sets tail? to be non-false.

The previous code ignored the prep-status flag and only checked tail? and raises "multiple statements given" exception when tail? is non-false.

The new code takes prep-status into account and extracts the actual Sqlite3 error message by evaluating get-error-message and raising it as an exception.

See Issue #1702
2017-06-24 17:06:42 -04:00
Matthew Flatt
5dbeb39a01 rktio: fix configure detection of iconv 2017-06-24 07:37:40 -06:00
Matthew Flatt
c5022c5d4f rktio: fix small header problems 2017-06-24 07:35:07 -06:00
Matthew Flatt
990a1d7154 rktio: further improve header declarations
Also, add variants of `rktio_read` and `rktio_write` that can be more
convenient to use through an FFI.
2017-06-23 19:50:19 -06:00
Matthew Flatt
316df0af7a rktio: add standalone build mode
Also, add a script to extract the "rktio.h" header information to an
S-expression form suitable for FFI use, and refine the "rktio.h"
information to improve that output.
2017-06-23 13:08:02 -06:00
Matthew Flatt
81f1c90ee0 small corrections reader docs
Fixes inaccuracies discovered when reimplementing
the reader in Racket.
2017-06-22 15:00:00 -06:00
Matthew Flatt
3c07250db4 fix printer for (unquote @d)
Avoid printing `(unquote @d)` or `(unsyntax @d)` as `,@d` or `#,@d`,
which would mean `(unquote-splicing @d)` or `(unsyntax-splicing @d)`
to the reader, by adding an extra space before the `@`.
2017-06-22 15:00:00 -06:00
Matthew Flatt
4bbe7a241d doc clarification for parameterize-break 2017-06-22 12:59:02 -06:00
Matthew Flatt
8473c1d4a8 raco pkg install: error message improvement
When a package to be installed has a module that conflicts with an
existing installed module, but the existing module isn't in a package,
then say so explicitly in the error message. Also report the current
collection and links paths.

Error reporting could do even more work to figure out which path is
relevant, but reporting a list of paths is relatively easy. Listing
paths also seems likely to give a user enough hints for this rare
case, especially if the user just needs to be reminded that collection
links exist.
2017-06-22 12:40:09 -06:00
Matthew Flatt
0d2908f824 regexp docs: minor corrections
Fixes inaccuracies discovered when reimplementing
regexp matching in Racket.
2017-06-22 12:25:43 -06:00
Matthew Flatt
36e2155b91 tcp-addresses: fix docs to note that a UDP socket is accepted 2017-06-22 12:25:43 -06:00
Daniel Feltey
87e4bdbec8 Fix segfault on accessing non-present impersonator properties of property-only vector chaperones
Additionally this adds macros that distinguish between the chaperone redirects of prop-only vector
chaperones, function chaperones, and structure chaperones since each of these may store a vector
in the redirects field.
2017-06-22 12:46:58 -05:00
Sam Tobin-Hochstadt
d3787775f1 Disable pkg tests on Travis.
They take approximately 20 minutes, which causes regular timeouts.
Disabling them will make our testing much more predicatable, and
the number of issues found is very small.
2017-06-22 13:33:03 -04:00
Matthew Flatt
f8c7feaf88 fix problem with prefabs, auto fields, and construction via a key
Auto fields were incorrectly recorded as immutable in a structure type
that is first generated from the prefab struct key instead of
`make-struct-type`.

Thanks to Deren Dohoda for the report.
2017-06-22 10:46:49 -06:00
Matthew Flatt
31d82eb9a6 raco setup: add note in docs for --tidy
Related to #1718
2017-06-22 08:39:39 -06:00
Matthew Flatt
30e4e812ba raco test: doc and help tweaks
* Clarify shell context for `++args` note on quotes

 * Add `history` notes

 * Make the help output fit in 80 columns

 * Bump "compiler-lib" version
2017-06-22 08:36:30 -06:00
Conor Finegan
9852afe1b1 raco test: support ++arg <arg> and ++args <args>
Add a way for `raco test` to pass along arguments to the test program.
2017-06-22 08:09:22 -06:00
Matthew Flatt
a7d161cfac raco pkg update: fix --update-deps and cross-scope deps
When `--update-deps` (which is implied by `--all`) was used on
user-scope packages that depend on installation-scope packages, the
installation-scope dependencies were treated as missing, which forced
an update of the user-scope packages. Check both scopes for
dependencies.

Closes #1730
2017-06-22 07:33:08 -06:00
Matthew Flatt
cfa1d7c54c add more information to copy-file error message
The `file/cache` relies on matching the text of a message, and the
text had changed to have less information on Unix, including whether
the problem was with the source or destination file. Add a notion of
error step to rktio and use it to improve the `copy-file` message.
2017-06-21 16:51:02 -06:00
Matthew Flatt
7152cc1ba6 rktio: add <sys/types.h> to reliably get u_char 2017-06-21 16:22:46 -06:00
Matthew Flatt
58dea081c6 fix memory-management bugs in rktio on Windows 2017-06-21 16:19:14 -06:00
Matthew Flatt
a15b16cfd9 repair expand-user-path 2017-06-21 16:19:14 -06:00
Matthew Flatt
6a543f4783 rktio: add iconv 2017-06-21 16:19:14 -06:00
Matthew Flatt
db7c242983 rktio: add syslog 2017-06-21 15:01:45 -06:00
Matthew Flatt
4de2ff4cbd fix make-file-or-directory-link 2017-06-21 05:23:53 -06:00
Matthew Flatt
69a208eb21 rktio: add Windows path conversion functions 2017-06-21 05:23:53 -06:00
Matthew Flatt
898b9ffe10 rktio: add ShellExecute 2017-06-21 05:23:53 -06:00
Matthew Flatt
d70cb9aec0 use "errno" in error messages only for Posix errors
Use "win_err" for Windows errors, and so on. Otherwise, the error
number can be misleading, especially if it's a rktio-level error.
2017-06-21 05:23:53 -06:00
Matthew Flatt
c3da23209b rktio: replace Windows invalid-decoding hack
Report a proper error when path decoding fails, instead of
synthesizing a path hat shouldn't exist. The rktio conversion
made it much easier to report the error at the Racket level
like other filesystem errors.
2017-06-21 05:23:53 -06:00
Matthew Flatt
83cb1a0d00 repair and tests for Windows path handling
In the process of extracting minimal Windows path encoding for rktio,
I noticed a decoding issue with a path that ends with an unpaired
high-surrogate value. Add a suitable tests and fix the old decoder
(although it will probably go away).
2017-06-21 05:23:53 -06:00
Matthew Flatt
d4742a0618 fix bytes-convert-end
The `bytes-convert-end` function didn't set up a proper decoding.
Make sure that it at least does nothing for encodings where
there's nothing to do.
2017-06-21 05:23:53 -06:00
Ben Greenman
a915433b02 doc: add tech link for box in 'immutable?' description 2017-06-21 01:47:01 -04:00
Matthew Flatt
d90976f865 rktio: repair to listen failure handling 2017-06-20 12:33:09 -06:00