Commit Graph

6065 Commits

Author SHA1 Message Date
Matthew Flatt
4e89fc638f cs & io: fix rktio_shell_execute binding to cooperate with the FFI
ShellExecute can dispatch Windows events, which means that it needs to
be called in a way that's consistent with the environment expected by
event-handling callbacks.

Relevant to #3832
2021-06-01 15:49:29 -06:00
Stephen Chang
d8d9255c2a hash fns: use bad-pos raise-argument-error arg 2021-06-01 16:49:07 -04:00
Matthew Flatt
9736595c7b cs: avoid promoting unknown OS thread to known
Related to changes in 18a95c3ae6, but shouldn't affect the problem
that commit addressed, since Racket-level callbacks need to be
involved.
2021-06-01 10:46:47 -06:00
Matthew Flatt
d4dc2683aa cs & regexp: report unmatched )
Closes #3854
2021-05-29 07:27:07 -05:00
Matthew Flatt
c7eb001be3 cs configure: avoid unneecssary copies of asan and ubsan flags 2021-05-28 06:59:38 -05:00
Robby Findler
bf768e1093 actually make parameter/c use impersonate-procedure and not just chaperone-procedure
fixes 114a4f89a1

closes #3852
2021-05-27 18:42:15 -05:00
Robby Findler
114a4f89a1 make parameter/c return impersonator contracts by default (but have an option to
return chaperones if the arguments are chaperones)

possibly related to racket/racket#3852
2021-05-27 10:13:22 -05:00
Robby Findler
a7a1f526a1 adjust parameter/c to use chaperone-procedure and fix a performance bug in contract-stronger
closes #3840
2021-05-25 07:56:46 -05:00
Matthew Flatt
095937b324 raco pkg remove: check for all named packages before removing any
Closes #3846
2021-05-24 09:44:47 -06:00
Matthew Flatt
18a95c3ae6 cs: fix glib logging from a foreign thread
When a glib message is logged in an OS thread not created by Racket,
then the current-future and async-callback-queue thread-local
variables were not initialized. The failure mode tended to be an
unending and memory-consuming cycle of triggering an error while
attempting to report an error.

Although there was a test for proper handling of logging calls from
foreign threads, the test previously created the "foreign" thread with
`call-in-os-thread`, which is not foreign enough.

Related to #3832
2021-05-23 10:01:39 -06:00
Matthew Flatt
5f63632f8a ffi/unsafe/custodian: add success callback to receive unregister function
Also, correct some information in the documentation of
`register-custodian-shutdown`.

Closes #3841
2021-05-23 10:01:39 -06:00
Ryan Culpepper
64f0c8a7ed db: fix sqlite3 custodian/finalizer registration
See racket/racket#3841.
2021-05-23 03:46:40 +02:00
Matthew Flatt
64b834c9c0 cs: fix call-in-os-thread to not retain the current Racket thread
Closes #3843
2021-05-22 18:11:14 -06:00
Matthew Flatt
0b8ea67bb3 Chez Scheme: use an ordered finalizer for mutexes and condition variables
That way, a mutex or conditional variable can be referenced by
something else that has a finalizer and that might use the mutex or
condition variable.

Closes #3842
2021-05-22 17:52:02 -06:00
Matthew Flatt
87fd43b1e5 Chez Scheme: unbreak for x86_64
Commit 4140627ed8 was broken.
2021-05-21 15:50:18 -06:00
Matthew Flatt
30effc9490 makefile: avoid adding cross-compile helper to a distribution 2021-05-21 11:48:52 -06:00
Matthew Flatt
61fa681aaf Chez Scheme: add test-some and test-more makefile targets
Expose more the underlying `partialx` and `bullyx` options.
2021-05-21 11:48:52 -06:00
Oscar Waddell
85de26c459 Chez Scheme: makefile updates
escape $(MAKE) to fix parallel mat issue observed with GNU Make 4.2.1:
"make[1]: warning: jobserver unavailable: using -j1."
  mats/Mf-base
2021-05-21 11:48:52 -06:00
Matthew Flatt
9adba4c82f cs: fix configure script for initial install
The initial install's `raco setup` step should use `--no-user`.
2021-05-21 11:48:52 -06:00
Matthew Flatt
4140627ed8 Chez Scheme: fix offset constraints on backend cas and related 2021-05-21 11:48:52 -06:00
Matthew Flatt
35bce0ac20 Chez Scheme: move ptr-tagging assumption out of rktboot
Add `record-ptr-offset` so that rktboot can use that instead of
assuming an offest of 1.

Also, introduce `type-untyped` and use it instead of `typemod` when
the intent is to leave an address unchanged by tagging. That makes the
implementation a little clearer, and it reduces the code that would
have to be changed to modify the tagging discipline (e.g., to tag by
adding instead of subtracting from an address).
2021-05-21 11:48:52 -06:00
Robby Findler
a6ada06ae2 better error message if there aren't any parens the superclass position of class* 2021-05-21 10:49:50 -05:00
Sam Tobin-Hochstadt
022066530e bc: improve complex sin/cos by using sinh/cosh() from the c library.
Related to #3822.
2021-05-20 16:31:56 -04:00
Sam Tobin-Hochstadt
7084b617c4 bc: repair (sqrt x-0.0i).
Related to #3822.
2021-05-20 16:31:56 -04:00
Sam Tobin-Hochstadt
4880bfe916 Ignore sinh/cosh/tanh in xform. 2021-05-20 16:31:56 -04:00
Sam Tobin-Hochstadt
b68f5d33f3 Chez tests for both cs & bc numeric bugs found by Gambit tests.
Closes #3822.
2021-05-20 16:31:56 -04:00
Sam Tobin-Hochstadt
d7149c2e9e Improve tanh and sinh using code from Gambit.
Related to #3822.
2021-05-20 16:31:56 -04:00
Sam Tobin-Hochstadt
abfa49d7d9 Chez Scheme: Avoid division by 0 in complex /.
Closes #3821.
2021-05-20 16:31:56 -04:00
Sam Tobin-Hochstadt
0bad9d5d8c Chez Scheme: improve rational arithmetic by using code from Gambit.
Also add special cases for (/ 1 x) and (/ -1 x) where x is a ratum.

Closes #3816.
2021-05-20 16:31:56 -04:00
Matthew Flatt
50ac429e6d launcher: repair user-scope Mac OS GUI launcher creation 2021-05-20 10:38:13 -06:00
Matthew Flatt
5e4670fc4d Chez Scheme: enable C library asinh on Windows 2021-05-20 09:24:41 -06:00
Matthew Flatt
70f44d9a6c raco pkg: adjust setup for scope other than installation or user
Previously, the `raco setup` step would use `--user` and
`--avoid-main` when the scope was not specifically `installation`.
Change it to instead use those when the scop is specifically `user`.
That makes additional scopes treated more like an installation scope
than a user scope, which is consistent with how `raco setup` treats
things (i.e., link paths that are in the search path).

Overall, it seems that the idea of just layering packages in extra
scopes does not work out, and the layering needs to be built in more
deeply. That's what recent improvements for layering do. But this
change at least makes `raco pkg` and `raco setup` more consistent.

Thanks to Nate Griswold for drawing out this issue.
2021-05-20 06:36:55 -06:00
Cameron Moy
30cebe621a Fix error formatting for non-empty-listof contract 2021-05-19 20:02:29 -05:00
Matthew Flatt
e586797164 raco setup: skip creation of redundant untethered executables
When tethering is configured for an installation layer, skip creating
untethered executables.
2021-05-19 13:12:35 -06:00
Matthew Flatt
3f5db8270e bc: add missing dependencies to makefile 2021-05-19 13:12:35 -06:00
Gustavo Massaccesi
aa7a5b9509 fix in-inclusive-range when last bound is not an explicit number 2021-05-19 16:07:04 -03:00
Stephen Chang
f2933d5ab8
hash-keys-subset? err msg typo 2021-05-19 13:56:12 -04:00
Matthew Flatt
5b163e3152 launcher: fix use of variant suffix
Repairs builds where only "racketbc" is installed (not "racket"), for
example.
2021-05-19 09:07:18 -06:00
Matthew Flatt
dfbb7040aa improve support for layered and tethered installations
Various "config.rktd" options are meant to support creating layers of
installation that builds existing layers. Configuration options also
supports a "tethering" mode that makes `raco setup` create launchers
that bind to the configration (so an environment variant doesn't have
to be set). While several pieces of this idea were in place in commit
6369e56709, it wasn't really finished, and there was no documentation
to explain how things are intended to work.

There's definitely still room for tools that automate the steps for
setting up a layer and tethering.

Along the way, this commit cleans up the `(find-system-path
'exec-file)` aspect of embedding executables as launchers to make them
consistent across platforms and work right as tethered launchers.
2021-05-18 09:38:35 -06:00
Matthew Flatt
0a9c70e95a raco dist: unbreak ELF size update 2021-05-15 15:20:28 -06:00
Matthew Flatt
304904da50 raco setup: make --clean respect --avoid-main and --no-user
Closes #1611
2021-05-15 11:13:44 -06:00
Matthew Flatt
5dc5bd7ae9 racket/class: fix serialization with class contracts
Closes #1589
2021-05-15 10:42:38 -06:00
Matthew Flatt
82789a760b solaris: make processor-count work
Related to #1572
2021-05-15 09:47:42 -06:00
Matthew Flatt
cc4b956f84 cs: fix relative-path -S argument to racket 2021-05-15 08:47:15 -06:00
Matthew Flatt
0f743800e4 clean up self-path and ELF handling for embedding executables
Clean up tangled and partly repeated code, and normalize ELF use for
boot files and embedded modules. Also, repair Unix-style Mac OS
builds.

With these changes, `raco exe` should always produce a well-formed
ELF, Mach-O, or PE excutable. The mode that just appends to the end of
the executable should happen only platforms that don't use one of
those three --- which are very rare and unlikely supported, anyway.

Closes #3831
2021-05-15 06:22:02 -06:00
Robby Findler
e032be434e clean up some low-level details of read-json
- avoid blocking once we are committed to an error

- consume eof exactly when there is an error or eof is the only thing in the stream

Also to improve the testing of these two, the new test suite support
lets us carefully control what's coming out of the port, including
situations where there are eof objects with data that comes afterwards
(so we can test if an eof is consumed or not)
2021-05-13 18:33:14 -05:00
Matthew Flatt
0063d2b06a Chez Scheme: repair new tests that need eqv? instead of eq? 2021-05-13 12:05:47 -06:00
Matthew Flatt
227d48e732 Revert "try to avoid blocking once we are committed to an error"
This reverts commit 40cd1ea083,
which as added accidentally.
2021-05-13 09:21:04 -06:00
Matthew Flatt
97e9a17dac raco exe and dist: repairs for cross-bundling runtime files 2021-05-13 09:14:04 -06:00
Robby Findler
40cd1ea083 try to avoid blocking once we are committed to an error 2021-05-12 19:01:46 -06:00