Commit Graph

40882 Commits

Author SHA1 Message Date
Sam Tobin-Hochstadt
b476f39f67 Suffix distributions properly 2020-05-09 15:55:08 -04:00
Paulo Matos
2195db7233
Add future tests to CI (#3169) 2020-05-09 21:46:46 +02:00
Matthew Flatt
7a95ff3dd4 bc: fix log-message handling of prefix-message? argument
Closes #3168
2020-05-09 09:39:00 -06:00
Matthew Flatt
fae20b4b89 3m: add missing lock in write barrier
When a future triggers a write barrier, a lock is needed to prevent a
race between the future thread and other threads in the same place (on
most platforms).

Thanks to Dominik Pantůček for tracking down this bug.
2020-05-09 07:43:15 -06:00
Ben Greenman
567fd9e866 style: revert formatting for 2nd textual example
The 2nd example on the page is about end-parethesis position too,
 and cannot use racketmod

sorawee points out, this racketmod behavior is related to:
 https://github.com/racket/racket/issues/3071
2020-05-09 08:19:03 -04:00
Ben Greenman
b804936db0 style: revert 1st example formatting
Revert a change from #3060

The first example is now offset to the top-right, but makes the point
it's supposed to make.

Something is wrong is Scribble to make racketmod and fileblock look
different. Once that's fixed, this example will be at peace.
2020-05-08 22:53:46 -04:00
Sam Tobin-Hochstadt
dd93f9c0f2 Build main-distribution in GHA snapshots. 2020-05-08 22:12:31 -04:00
Sam Tobin-Hochstadt
e8c7b0b6f0 Improve GHA Snapshots, including minimal versions. 2020-05-08 17:46:58 -04:00
Ben Greenman
6a1328cd77 ^ regression tests 2020-05-08 08:27:33 -04:00
Ben Greenman
098d4c789a file->x: ignore file-size errors 2020-05-08 08:27:33 -04:00
Ben Greenman
d52c845454 racket/file: check file-exists?
Check `file-exists?` before passing the file on to `file-size` and/or
`open-input-file`. The latter led to confusing error messages, e.g.:

```
(file->string "DNE")
;; file-size: cannot get size
```

affects: `file->value` `file->list` `file->string` `file->bytes`
 `file->lines` `file->bytes-lines`
2020-05-08 08:27:33 -04:00
Marc
c75881096a
Switch /replacement and /our-replacement names (#3103)
The call to `random-sample/replacement` gets called when `(not
replacement?)` holds, while `random-sample/out-replacement` gets called
otherwise.

This is probably because the algorithm for the without replacement case
actually replaces parts of the sample, but that is different from the
meaning of a sample with and without replacement, which means with
possible duplicates or without.
2020-05-08 12:58:27 +02:00
Stephen De Gabrielle
6c72b04c1a
add link to https://racket-lang.org/friendly.html (#3164) 2020-05-08 12:57:53 +02:00
Matthew Flatt
b8f5216376 bc: fix potential GC problem with continuation invocation
Avoid updating the continuation-mark pointer until after the set of
mark segments is allocated when more segments are needed.
2020-05-07 16:18:25 -06:00
Matthew Flatt
aeb32081db cs: repair for raco decompile 2020-05-07 16:18:25 -06:00
Paulo Matos
bc97c65bb8
Fail when ubsan finds failures (#3166)
This is enabled for CS since ChezScheme has no ubsan warnings since: 65e05772a1
2020-05-07 20:13:50 +02:00
Sorawee Porncharoenwase
52b5f1864f Fix #1399: fix struct-copy bugs by exploiting struct-info
This PR fixes four bugs:

1. Accessors are required at use-site in order to use `struct-copy`.
This PR removes that requirement since the information is already available in
struct-info. The following program used to fail prior the PR but will now pass.

```

(module a racket
  (provide a)
  (struct a (b)))

(require 'a)
(struct-copy a (a 1) [b 2])
```

2. `struct-copy` fails if the structure type transformer binding is renamed
(#1399). The following program used to fail prior the PR but will now pass.

```

(module struct racket/base
  (provide (struct-out point))
  (struct point (x y) #:transparent))

(require (rename-in 'struct [point point2d]))

(struct-copy point2d (point2d 1 2) [x 3])
```

3. With supertype, it's possible to construct colliding accessors,
causing `struct-copy` to update an incorrect field. The following program
produced incorrect outputs prior this PR but will now be correct.

```

(module a racket
  (provide a)
  (struct a (b-c) #:transparent))

(require 'a)
(struct a-b a (c) #:transparent)

(struct-copy a-b (a-b 1 2) [b-c #:parent a 10])
;; before the PR: (a-b 1 10), after the PR: (a-b 10 2)
(struct-copy a-b (a-b 1 2) [c 10])
;; before the PR: (a-b 1 10), after the PR: (a-b 1 10)
```

4. Similar to 3., prior this commit, it's possible to refer to a bogus field
name when supertype is present. The following program doesn't result in
a syntax error which is wrong. This commit fixes that.

```
(module a racket/base
  (provide (all-defined-out))
  (struct a (b-c) #:transparent))

(require 'a)
(struct a-b a (d) #:transparent)
(struct-copy a-b (a-b 1 2) [c 10])
```

The key idea is that the actual struct name (if the struct is created via
`struct` or `define-struct`) can be extracted from the name of struct predicate.
The actual field names then can be precisely extracted from accessors.

Note that struct-infos that are created manually by `make-struct-info`
didn't work with `struct-copy`. This PR didn't attempt to fix that because
it requires a significant change that would not be backward compatible with
the current struct info.
2020-05-07 11:46:34 -04:00
Sorawee Porncharoenwase
219f9c0846 Remove a contract: gen:name is not an identifier value 2020-05-07 07:53:30 -04:00
Paulo Matos
bcdfa42000
Add workflow to test racket with sanitizers (#3159) 2020-05-07 13:20:25 +02:00
Sorawee Porncharoenwase
6e6166ef95 Fixes #2264: remove incorrect description of the body metavariable 2020-05-07 07:20:14 -04:00
Sorawee Porncharoenwase
b0cb1adda6 Fixes #2219: correct the contract for rem
I didn't use the suggested fix by either @Syntacticlosure or @mfelleisen
because there's another usage of `not-has?` which is correct already, so
changing `not-has?` would break it.
2020-05-07 07:19:10 -04:00
Sorawee Porncharoenwase
f6f5cafed1 Fixes #1858: document list* as an alias of list-rest 2020-05-07 07:16:15 -04:00
Sam Tobin-Hochstadt
74600748d9 Specify log file location 2020-05-07 06:45:08 -04:00
Sam Tobin-Hochstadt
97e66c86f5 Don't use Racket as installed by setup-racket in building 2020-05-07 06:43:50 -04:00
Sam Tobin-Hochstadt
5befc7f2ec Build RacketCS Snapshots on GHA. 2020-05-06 22:18:37 -04:00
Sam Tobin-Hochstadt
2ae63d957d
Update README.md 2020-05-06 10:20:25 -04:00
yurkobb
76d8a0ef44
docs: for/stream: mention multiple values (#3147)
* docs: for/stream: mention multiple values

A minimal improvement to the for/stream docs mentioning it doesn't support multiple values per iteration.

* docs: for/stream: mention stream/values package

* docs: for/stream: remove mention of external packages

* docs: for/stream: improve spelling, fix link to multiple values
2020-05-06 10:17:28 -04:00
Paulo Matos
ec93652cf9
Remove gitlab CI (#3160)
After #3159 is merged, gitlab CI files can be removed.
2020-05-06 14:24:28 +02:00
Matthew Flatt
1bef5a6927 openssl: defer erorr logging when no x509 root sources are not found
Instead of logging an error when the `openssl` module is loaded, defer
a complaint until procedures that would depend on the configuration is
called. Otherwise, errors can get printed in programs that depend on
the `openssl` library but do not always need OpenSSL support at run
time.
2020-05-05 07:05:28 -06:00
Matthew Flatt
83f27f637b openssl: ssl-dh4096-param-path -> ssl-dh4096-param-bytes
This is a backward-incompatible changed, but no packages currently
registered at pkgs.racket-lang.org refer to `ssl-dh4096-param-path`.

Providing `ssl-dh4096-param-bytes`, instead, avoids carrying along an
extra file with any stand-alone executable that depends on `openssl`.
2020-05-05 07:05:15 -06:00
Paulo Matos
5f6269cb19
Do not run static analysis on PRs 2020-05-05 14:42:02 +02:00
Paulo Matos
e64c680b60
Move static analysis jobs to their own CI file to split workflows (#3157)
Move jobs doing static analysis to its own workflow. 

RacketCGC is needed so perform a speed build (takes 3mins) before the static analysis on each job that requires it.
2020-05-05 14:40:01 +02:00
Matthew Turland
3934dfd760 Fix typo in quote example from section 2.4.1 2020-05-05 07:42:13 -04:00
Paulo Matos
65a1aa9cb3
Only create snapshots when action is ran from main repo (#3152) 2020-05-05 11:14:04 +02:00
Matthew Flatt
f57aa0b90f improve docs and raco distribute about stand-alone executables
The `--orig-exe` flag is more useful than the documentation suggested,
and `raco distribute` now treats those executables better.
2020-05-04 15:10:15 -06:00
Sam Tobin-Hochstadt
850aefe8fe Add more packages to testing Docker image. 2020-05-04 16:43:38 -04:00
Matthew Flatt
126e8dacb5 add regression test for futures
Tries to provoke the crash fixed by c59f72f101.

Related to #3145
2020-05-04 08:22:39 -06:00
Matthew Flatt
cf4691ee87 cs: fix allocation mode for _string/utf-16
Closes #3153
2020-05-04 07:18:05 -06:00
Matthew Flatt
6feb9c1095 makefile: add SERVER_URL_SCHEME to support https 2020-05-03 16:09:55 -06:00
Matthew Flatt
cdc32cdfeb cs: repair build via source distribution 2020-05-03 13:41:04 -06:00
Matthew Flatt
17a5711dbb makefile: fix addition of --disable-lib
When potentially adding the `--disable-lib` flag, don't drop existing
extra configure flags. Specifically, the `--enable-crossany` flag
from distro-build could get lost, which breaks a soutrce distribution
with built packages.
2020-05-03 09:40:36 -06:00
Sorawee Porncharoenwase
9465cbd7e6 Update documentation contribution guide 2020-05-03 07:57:22 -06:00
Matthew Flatt
c59f72f101 bc: reserve GC parking spaces for place-main thread
Don't try to park values when allocating a weak box or pair in a
future thread, since that creates a race on the parking spaces. A
future thread can't run a GC, so it's doesn't need to park.

Touching a future in a future allocates a weak box, so this bug could
have been responsible for many crahses.

Related to #3145
2020-05-02 08:45:14 -06:00
Sam Tobin-Hochstadt
303b410bc7 Recent GMP is under LGPL v3.
Update GMP license statment following 392dc33ceb which comes from
a recent GMP version.

This does not affect the overall license situation of Racket BC,
which includes other LGPL v3 code, or of Racket CS, which does not
use GMP.
2020-05-01 22:26:25 -04:00
Matthew Flatt
61cefe693a cs: support raco exe --embed-dlls on Windows
Uses a MemoryModule PR by @DaLynX to fix a setjmp/longjmp
interaction with embedded DLLs.
2020-05-01 20:07:24 -06:00
Matthew Flatt
fffdeeddd2 move known-done subprocess from custodian
The `call-with-deep-time-limit` function in `racket/sandbox` expects a
subprocess to be removed from its custodian when the subprocess is
done. CS wasn't doing that at all, leaving custodian removal to a
finalizer. BC was doing delaying a remove until `subprocess-status` is
used (which happened to work for existing uses of
`call-with-deep-time-limit`, apparently.)

Relevant to #3140
2020-05-01 11:17:49 -06:00
Sam Tobin-Hochstadt
ea43027252 actions/checkout v2 avoids the detached head problem 2020-04-30 10:18:15 -04:00
Sam Tobin-Hochstadt
49153de07d Update .github/workflows/ci-snapshot.yml 2020-04-30 10:10:05 -04:00
Paulo Matos
8c8c41e379 Move snapshot generation to different workflow
Only run snapshot generation on push events to master.
2020-04-30 10:10:05 -04:00
Paulo Matos
c724cd130e
Remove pull_request from on tag for ci-push
For debug reasons I added pull_request to the on tag in #3119 but forgot to remove it and it went in cd096e0e6b
2020-04-30 14:43:03 +02:00