Commit e1c43a9e authored by Mo Zhou's avatar Mo Zhou

New upstream version 2019.07.1

parent fe2551c4
/gen/*
nqp/
/nqp/
repo/
install/
install-jvm/
......@@ -29,11 +29,6 @@ lib/lib.pir
CORE.setting.pbc
RESTRICTED.setting.pbc
SAFE.setting.pbc
/perl6
/perl6.exe
/perl6.bat
/perl6-p
/perl6-p.exe
perl6.class
perl6.pbc
perl6.moarvm
......@@ -54,17 +49,38 @@ perl6.ilk
perl6.opt
perl6.pdb
perl6.rc
perl6-j
perl6-j.bat
perl6-debug-j
perl6-debug-j.bat
/perl6
/perl6.exe
/perl6.bat
/perl6-p
/perl6-p.exe
/perl6-j
/perl6-j.bat
/perl6-debug-j
/perl6-debug-j.bat
/perl6-jdb-server
/perl6-jdb-server.bat
/perl6-eval-server
/perl6-eval-server.bat
/eval-client.pl
/rakudo.js
/perl6-js
/perl6-js.bat
/perl6-m
/perl6-m.bat
/perl6-debug-m
/perl6-debug-m.bat
/perl6-gdb-m
/perl6-lldb-m
perl6-m
perl6-m.bat
perl6-debug-m
perl6-debug-m.bat
perl6-js
perl6-js.bat
/perl6-valgrind-m
/inst-perl6
/inst-perl6-debug
/inst-perl6-m
/inst-perl6-debug-m
/inst-perl6.exe
/inst-perl6-debug.exe
/inst-perl6-m.exe
/inst-perl6-debug-m.exe
t/localtest.data
t/spec
t/packages/tap-harness6
......@@ -93,17 +109,10 @@ config.default
/bin
rakudo-runtime.jar
CORE.setting.class
perl6-jdb-server
perl6-jdb-server.bat
perl6-eval-server
perl6-eval-server.bat
eval-client.pl
perl6-gdb-m
perl6-valgrind-m
*.rakudo.moar
*.rakudo.jvm
.precomp
t/03-jvm/*.class
rakudo.js
/zef
.DS_Store
node_modules/*
[submodule "3rdparty/nqp-configure"]
path = 3rdparty/nqp-configure
url = https://github.com/perl6/nqp-configure.git
......@@ -9,19 +9,17 @@ sudo: false
fast_finish: true
install: "echo"
dist: trusty
dist: xenial
jdk: openjdk11
addons:
apt:
sources:
# add PPAs with more up-to-date toolchains
- ubuntu-toolchain-r-test
packages:
# install toolchains
- gcc-6
script:
- if [[ $TRAVIS_OS_NAME != osx && $RAKUDO_OPTIONS =~ jvm ]]; then sudo -E apt-get install oracle-java8-installer; fi
- perl Configure.pl $RAKUDO_OPTIONS --moar-option=--cc=$(command -v gcc-6 >/dev/null 2>&1; if [ $? -eq 1 ]; then printf "gcc"; else printf "gcc-6"; fi)
- "make install"
- (cd ~/build/rakudo/rakudo/ && prove -e ~/build/rakudo/rakudo/install/bin/perl6 -vlr t)
......
......@@ -465,6 +465,11 @@ U: jdv79
N: Kamil Kułaga
E: teodozjan@users.noreply.github.com
N: Kane Valentine
U: kawaii
E: kane@cute.im
W: https://cute.im
N: kboga
E: kristofbogaerts@gmail.com
......@@ -640,6 +645,10 @@ U: pmichaud
D: Perl 6 (Rakudo Perl) lead developer, initial pumpking
E: pmichaud@pobox.com
N: Patrick Böker
U: patzim
E: patrickz@cpan.org
N: Paul Cochrane
U: paultcochrane
E: paul@liekut.de
......@@ -882,4 +891,9 @@ N: Oleksii Varianyk
U: cono
E: q@cono.org.ua
N: Vadim Belman
U: vrurg
E: vrurg@cpan.org
D: Build subsystem, various code changes
=cut
This diff is collapsed.
......@@ -110,6 +110,40 @@ The format for the `--backends` flag is:
$ perl Configure.pl --backends=moar,jvm
$ perl Configure.pl --backends=ALL
### Testing
Run the full spectest:
$ make spectest # <== takes a LONG time!!
To run a single test, one must use `make` because of the tooling required to
run the spectests. For example:
$ make t/spec/S12-traits/parameterized.t
Run all tests in one S* directory with a sh script. One example:
$ cat run-tests.sh
#!/bin/sh
# specify the desired directory:
D='t/spec/S26-documentation'
# collect the individual files
F=$(ls $D/*t)
# and run them
for f in $F
do
echo "Testing file '$f'"
make $f
done
echo "All tests in dir '$D' have been run."
That can be written as a one-liner:
for f in $(ls t/spec/S26-documentation/*t); do make "$f"; done
## Where to get help or answers to questions
There are several mailing lists, IRC channels, and wikis available with
......
2019.03.1
2019.07.1
......@@ -54,5 +54,7 @@ install:
# Testing
test_script:
- perl Configure.pl %RAKUDO_OPTIONS%
- SET TEST_JOBS=1
- SET HARNESS_VERBOSE=1
- nmake test
- nmake install
# Things To Know About Rakudo Build
## SYNOPSIS
Start with:
```
cd <your Rakudo sources directory>
./Configure --gen-moar --gen-nqp
make install && make test
```
## Configure.pl
### Developing on own forks of repositories.
One of the best modes of development is to have the project you work with forked from the original repository into your
own. Often this is the only possible way if a developer doesn't have commit access. `Configure.pl` supports such mode of
development via following command line options:
- `--github-user=<user>` defines the GitHub account where cloned repositories of `MoarVM`, `NQP`, and `Rakudo` are all
located. With this option sources of `NQP` will be cloned from `git@github.com:<user>/nqp` instead of the default
`git@github.com:perl6/nqp`.
- `--[rakudo|moar|nqp|roast]-repo` command line options allow to define particular URL for each individual repository.
### nqp-configure submodule
`Configure.pl` is based on modules implemented by [nqp-configure](https://github.com/perl6/nqp-configure) repository.
This repo is included as a submodule into `rakudo` source repository. To set a user free of manual update of submodules
upon each update of `nqp-configure` `Configure.pl` does a few things under the hood upon startup:
- First is checks if the submodule has been checked out already. If not then it'll be automatically initialized and
pulled in.
- If local copy of `rakudo` repository hasn't been _initialized_ yet then `Configure.pl` sets `submodule.recurse` `git`
configuration variable to _true_. It is also set _initialized_ status by setting `rakudo.initialized` `git`
configuration variable.
Any consequent run of `Configure.pl` won't be trying to set `submodule.recurse` again unless _initialized_ state is
reset by deleting `rakudo.initialized`. This allows anyone who wants to update submodules manually to reset
`submodule.recurse` without worrying that it'll be overridden.
## Templates
_... needs documenting ..._
See documentation on macros in
[nqp-configure repository](https://github.com/perl6/nqp-configure/blob/master/doc/Macros.md).
## Language Revisions
Language revisions supported by current `Rakudo` version are defined in `tools/templates/PERL6_SPECS` file. At the
moment of writing this section it has the following look:
```
# [*]version [modifier]
# * defines the current spec
# modifiers can be prefixed with the following flags:
# ! required. Means that revision cannot be used without this modifier.
# - deprecated. Use of this modifier will result in a language warning.
c
# TEST and TESTDEPR modifiers are to be kept for roast.
*d -PREVIEW TEST -TESTDEPR # TODO: It's about time to drop PREVIEW
e !PREVIEW
```
The life cycle of a release modifier `PREVIEW` must follow these rules:
1. For a revision being developed it has to be marked as required. In this status use of the revision letter in a
language version is not possible without the modifier. With the file in the example if we try `use v6.e;` the
compiler must die with _'Perl v6.e requires modifier PREVIEW'_ message.
1. When revision gets released the modifier status changes into normal status for a couple of monthly releases of
`Rakudo` to allow graceful transition for modules which were built specifically for the just released revision.
_Note_ that at this stage corresponding changes are to be done to `roast` repository.
1. When the transiotion period is considered over the `PREVIEW` modifier must be marked as _deprecated_. With this
status it's still possible to use it. But the compiler will generate a warning message.
1. The _deprecation_ period should be over after another few releases and followed by complete removal of `PREVIEW`
modifier from `PERL6_SPECS` file. At this point its use is considered illegal and compiler will be dying whenever
find it in a code.
### Steps to add a new revision
1. Edit `PERL6_SPECS` to add a line containing the new revision letter similar to this:
```<revision letter> !PREVIEW```
_Note_ that here and below `<revision letter>` must be replaced with the next letter to be used.
1. Change the status of `PREVIEW` modifier of the previous release from _required_ to _normal_. Save `PERL6_SPECS`.
1. Create `src/core.<revision letter>` directory.
1. Create file `src/core.<revision letter>/core_prologue.pm6` with the following lines in it:
```
use nqp;
# This dynamic is purely for testing support.
PROCESS::<$CORE-SETTING-REV> := '<revision letter>';
# vim: ft=perl6 expandtab sw=4
```
1. Edit file `t/02-rakudo/14-revisions.t` to reflect all changes done in `PERL6_SPECS` on the previous steps: add one
more test for the new revision, remove `PREVIEW` from the previous revision, etc.
1. Change `VERSION` file in `roast` repository.
This diff is collapsed.
......@@ -8,7 +8,7 @@ This release is a point release in addition to the regular, monthly
releases. Rakudo 2019.03 (note: no .1) was discovered to have issues
on Windows where calling certain methods on `$*KERNEL`
(like `$*KERNEL.bits`) would throw instead of returning a proper
value. This release is for Windows users only: users on other system
value. This release is for Windows users only: users on other systems
do not need to update, but are of course welcome to.
The tarball for this release is available from <https://rakudo.org/files/rakudo>.
......
# Announce: Rakudo Perl 6 compiler, Release 2019.07.1
On behalf of the Rakudo development team, I'm announcing an
out-of-schedule release of the Rakudo Perl 6 compiler.
Rakudo is an implementation of Perl 6 on the Moar Virtual Machine[^1].
This release is a point release in addition to the regular
releases. Rakudo 2019.07 (note: no .1) was discovered to have some
issues with the build system that affected packaging. Moreover, this
release comes with a corresponding MoarVM point release which has some
important stability and reliability fixes.
The tarball for this release is available from <https://rakudo.org/files/rakudo>.
Please note: This announcement is not for the Rakudo Star
distribution[^2] — it’s announcing a new release of the compiler
only. For the latest Rakudo Star release, see
<https://rakudo.org/files/star>.
The changes in this release are outlined below:
New in 2019.07.1:
+ Build system:
+ Fixed issues when installing into `/usr` [f41db044]
+ Fixed unnecessary use of `git` in release tarballs [540926bf][e18b4f3b]
+ Fixed intermittent failures in one of the performance tests [bd29d3f6]
The following people contributed to this release:
Patrick Böker, Aleks-Daniel Jakimenko-Aleksejev, Timo Paulssen,
Jonathan Worthington, Stefan Seifert, Samantha McVey
If you would like to contribute or find out more information, visit
<https://perl6.org>, <https://rakudo.org/how-to-help>, ask on the
<perl6-compiler@perl.org> mailing list, or ask on IRC #perl6 on freenode.
Additionally, we invite you to make a donation to The Perl Foundation
to sponsor Perl 6 development: <https://donate.perlfoundation.org/>
(put “Perl 6 Core Development Fund” in the ‘Purpose’ text field)
The next release of Rakudo (#132), is tentatively scheduled for 2019-09-21.
A list of the other planned release dates is available in the
“docs/release_guide.pod” file.
The development team appreciates feedback! If you’re using Rakudo, do
get back to us. Questions, comments, suggestions for improvements, cool
discoveries, incredible hacks, or any other feedback – get in touch with
us through (the above-mentioned) mailing list or IRC channel. Enjoy!
Please note that recent releases have known issues running on the JVM.
We are working to get the JVM backend working again but do not yet have
an estimated delivery date.
[^1]: See <http://moarvm.org/>
[^2]: What’s the difference between the Rakudo compiler and the Rakudo
Star distribution?
The Rakudo compiler is a compiler for the Perl 6 language.
Not much more.
The Rakudo Star distribution is the Rakudo compiler plus a selection
of useful Perl 6 modules, a module installer, Perl 6 introductory
documentation, and other software that can be used with the Rakudo
compiler to enhance its utility.
This diff is collapsed.
......@@ -133,26 +133,6 @@ likely be kind enough to give deprecation cycles.
## Trying out the "next version"
To try out v6.d before the compiler officialy supports it, you can write:
To try out v6.e before the compiler officialy supports it, you can write:
use v6.d.PREVIEW;
## If anyone asks about 6.d and beyond...
About Perl 6.d, expect an incremental update.
* It'll focus heavily on broadening test coverage to tighten up the language
definition
* It will include various small things we wished we could have done in 6.c,
but just didn't have time: the missing regex backtracking controls, the
sub-byte int types, non-parameter cases of coercion types, things we
discover people miss especially in IO, etc.
* Goal is sometime in 2017; we'll judge it based upon what we see (like, if
there is a strong desire to get an incremental update out the door to cover
things people really block on not having, we can do so)
A lot of effort in 2016 was focused on performance engineering and making things
more robust. This work will continue until the eventual feature freeze and release.
Macros and slangs are the biggest post-6.c project language wise;
if they happen to be in great shape by 6.d then they can make it in, but if
not they'd be a reasonable target for 6.e.
use v6.e.PREVIEW;
......@@ -115,7 +115,7 @@ Complicating work with pod is that pod blocks can be nested, i.e., a
pod block can have pod blocks as children, to any depth. Necessarily
that applies, in general, to *delimited blocks*. (Other block types
may have single blocks as children, usually as one or two
**Pod::Block::Paras**.)
**Pod::Block::Para**s.)
One consequence of this is that a pod block with children cannot be
created until all its children have been created. Another consequence
......
......@@ -18,15 +18,7 @@ Note that we are trying very hard to ensure there are no backward
compatibility issues post Christmas. As such, we may end up delaying
some releases to ensure any compatibility issues are resolved.
2019-04-20 Rakudo #131
2019-05-18 Rakudo #132
2019-06-15 Rakudo #133
2019-07-20 Rakudo #134
2019-08-17 Rakudo #135
2019-09-21 Rakudo #136
2019-10-19 Rakudo #137
2019-11-16 Rakudo #138
2019-12-21 Rakudo #139
2019-09-21 Rakudo #132 (AlexDaniel + kawaii + Releasable)
(More planned dates can be generated with F<tools/release-dates.p6>).
......@@ -41,7 +33,8 @@ Currently there are two tools:
=over
=item *
Release Sakefile (not published yet) which is meant to be used together with
L<Release Sakefile|https://github.com/rakudo/rakudo/blob/master/tools/releasable/Sakefile>
which is meant to be used together with
L<Releasable|https://github.com/perl6/whateverable/wiki/Releasable> bot
=item *
......@@ -346,9 +339,9 @@ and L<https://rakudo.perl6.org/downloads/rakudo/>:
scp rakudo-YYYY.MM.tar.gz rakudo-YYYY.MM.tar.gz.asc \
rakudo@www.p6c.org:public_html/downloads/rakudo/
If you do not have permissions for that, ask one of (pmichaud, jnthn, FROGGS,
masak, tadzik, moritz, PerlJam/perlpilot, [Coke], lizmat, timotimo, fsergot,
hoelzro, Zoffix, AlexDaniel) on #perl6 or #perl6-dev to do it for you.
If you do not have permissions for that, ask one of (jnthn,
masak, tadzik, moritz, [Coke], lizmat, timotimo,
AlexDaniel) on #perl6 or #perl6-dev to do it for you.
=item 19.
......@@ -508,6 +501,8 @@ Previous releases were bundled as part of monthly Parrot releases.
2018-12-21 Rakudo #129 "2018.12" (AlexDaniel + Releasable)
2019-03-07 Rakudo #130 "2019.03" (AlexDaniel + Releasable)
2019-03-17 2019.03.1 (AlexDaniel + Releasable)
2019-07-17 Rakudo #131 "2019.07" (AlexDaniel + kawaii + Releasable)
2019-07-28 2019.07.1 (AlexDaniel + Releasable)
=head1 COPYRIGHT
......
......@@ -30,6 +30,11 @@ compiled code.
--profile write profile information as HTML file (MoarVM)
--profile-filename provide a different filename (also allows .json)
--doc=[module] Use Pod::To::[module] to render inline documentation.
--full-cleanup try to free all memory and exit cleanly (MoarVM)
--debug-port=port listen for incoming debugger connections (MoarVM)
--debug-suspend pause execution at the entry point (MoarVM)
--tracing output a line to stderr on every interpreter instr (only
if enabled in MoarVM)
Note that only boolean single-letter options may be bundled.
......@@ -139,6 +144,14 @@ C<IO::Spec::Cygwin> inherits this from C<IO::Spec::Unix>.
C<IO::Spec::Win32.path> will read the first defined of either C<%PATH%> or C<%Path%> as a
semicolon-delimited list.
=item C<PERL6_HOME>
Allows to override the Perl 6 installation path. Defaults to C<[perl6_executable_dir]/../share/perl6>.
=item C<NQP_HOME>
Allows to override the NQP installation path. Defaults to C<[perl6_executable_dir]/../share/nqp>.
=back
=head1 AUTHORS
......
This diff is collapsed.
......@@ -579,7 +579,7 @@ our role Native[Routine $r, $libname where Str|Callable|List|IO::Path|Distributi
if nqp::elems($args) != $!arity {
X::TypeCheck::Argument.new(
:objname($.name),
:arguments(args.list.map(*.^name))
:arguments(args.list.map(*.^name)),
:signature(try $r.signature.gist),
).throw
}
......
This diff is collapsed.
......@@ -2,6 +2,8 @@
use nqp;
use Perl6::Compiler:from<NQP>;
# the place where the default snaps are stored
my $snaps := nqp::create(IterationBuffer);
......@@ -565,8 +567,9 @@ INIT without $*SAMPLER {
# Telemetry --------------------------------------------------------------------
class Telemetry does Associative {
has $!sampler;
has $!samples;
has $!sampler;
has $!samples;
has Str $.message is rw;
multi method new(Telemetry:) {
my $self := nqp::create(self);
......@@ -658,6 +661,7 @@ multi sub infix:<->(
my $period := nqp::create(Telemetry::Period);
nqp::bindattr($period,Telemetry,'$!sampler',
nqp::getattr($a,Telemetry,'$!sampler'));
$period.message = $_ with $a.message;
my \samples-a := nqp::getattr($a,Telemetry,'$!samples');
my \samples-b := nqp::getattr($b,Telemetry,'$!samples');
......@@ -698,8 +702,43 @@ multi sub infix:<->(
# Making a Telemetry object procedurally ---------------------------------------
proto sub snap(|) is export {*}
multi sub snap(--> Nil) { $snaps.push(Telemetry.new) }
multi sub snap(@s --> Nil) { @s.push(Telemetry.new) }
multi sub snap(--> Nil) {
$snaps.push(Telemetry.new);
}
multi sub snap(Str:D $message --> Nil) {
my \T := Telemetry.new;
T.message = $message;
$snaps.push(T);
}
my $snapshot-idx = 1;
multi sub snap(Str $message = "taking heap snapshot...", :$heap! --> Nil) {
my $filename =
$heap eqv True
?? "heapsnapshot-$($*PID)-$($snapshot-idx++).mvmheap"
!! $heap ~~ Str:D
?? $heap.IO.e
?? "$heap-$($*PID)-$($snapshot-idx++).mvmheap"
!! $heap
!! $heap ~~ IO::Path:D
?? $heap.absolute
!! $heap eqv False
?? do { $message eq "taking heap snapshot..."
?? snap()
!! snap($message);
return }
!! die "heap argument to snap must be a Bool, Str, or IO::Path, not a $heap.WHAT()";
my \T1 := Telemetry.new;
T1.message = $message with $message;
$snaps.push(T1);
Perl6::Compiler.profiler-snapshot(kind => "heap", filename => $filename<>);
my \T2 := Telemetry.new;
T2.message = $filename;
$snaps.push(T2);
}
multi sub snap(@s --> Nil) {
@s.push(Telemetry.new);
}
# Starting the snapper / changing the period size
my int $snapper-running;
......@@ -858,6 +897,10 @@ HEADER
}
sub push-period($period --> Nil) {
with $period.message -> $message {
my $line = "#-- $message ";
nqp::push_s($text,$line ~ "-" x 80 - $line.chars);
}
nqp::push_s($text,
@formats.map( -> @info {
@info[DISPLAY]($period{@info[NAME]})
......
......@@ -62,6 +62,10 @@ our sub todo_output is rw {
$todo_output
}
proto sub plan ($?, Cool :$skip-all) {*}
my class X::SubtestsSkipped is Exception {}
multi sub plan (Cool:D :skip-all($reason)!) {
_init_io() unless $output;
$output.say: $indents ~ "1..0 # Skipped: $reason";
......@@ -79,7 +83,7 @@ multi sub plan (Cool:D :skip-all($reason)!) {
$done_testing_has_been_run = 1;
$num_of_tests_failed = $num_of_tests_planned = $num_of_tests_run = 0;
nqp::throwpayloadlexcaller(nqp::const::CONTROL_RETURN, True);
X::SubtestsSkipped.new.throw
}
# "plan 'no_plan';" is now "plan *;"
......@@ -412,7 +416,14 @@ multi sub subtest(&subtests, $desc = '') is export {
$subtest_callable_type = &subtests.WHAT;
$indents ~= " ";
$subtest_level++;
subtests();
{
subtests();
CATCH {
when X::SubtestsSkipped {
# Subtests all skipped
}
}
}
$subtest_level--;
done-testing() if nqp::iseq_i($done_testing_has_been_run,0);
my $status = $num_of_tests_failed == 0
......@@ -599,7 +610,7 @@ sub throws-like($code, $ex_type, $reason?, *%matcher) is export {
$code()
} else {
$msg = "'$code' died";
EVAL $code, context => CALLER::CALLER::CALLER::CALLER::;
EVAL $code, context => CALLER::CALLER::CALLER::CALLER::CALLER::;
}
flunk $msg;
skip 'Code did not die, can not check exception', 1 + %matcher.elems;
......@@ -743,12 +754,12 @@ sub done-testing() is export {
}
# Wrong quantity of tests
_diag("Looks like you planned $num_of_tests_planned test"
_diag("You planned $num_of_tests_planned test"
~ ($num_of_tests_planned == 1 ?? '' !! 's')
~ ", but ran $num_of_tests_run"
) if ($num_of_tests_planned or $num_of_tests_run) && ($num_of_tests_planned != $num_of_tests_run);
_diag("Looks like you failed $num_of_tests_failed test"
_diag("You failed $num_of_tests_failed test"
~ ($num_of_tests_failed == 1 ?? '' !! 's')
~ " of $num_of_tests_run"
) if $num_of_tests_failed && ! $subtest_todo_reason;
......
This diff is collapsed.
......@@ -3,8 +3,10 @@ use QRegex;
use Perl6::Optimizer;
class Perl6::Compiler is HLL::Compiler {
has $!language_version;
has $!can_language_versions;
has $!language_version; # Default language version in form 6.c
has $!language_modifier; # Active language modifier; PREVIEW mostly.
has $!language_revisions; # Hash of language revision letters. See gen/<vm>/main-version.nqp
has $!can_language_versions; # List of valid language version
method compilation-id() {
my class IDHolder { }
......@@ -16,10 +18,14 @@ class Perl6::Compiler is HLL::Compiler {
method language_name() { 'Perl' }
method reset_language_version() {
$!language_version := NQPMu;
$!language_modifier := NQPMu;
}
method set_language_version($version) {
$!language_version := $version;
}
method set_language_modifier($modifier) {
$!language_modifier := $modifier;
}
method language_version() {
if nqp::defined($!language_version) {
$!language_version
......@@ -28,11 +34,19 @@ class Perl6::Compiler is HLL::Compiler {
$!language_version := self.config<language-version>
}
}
method language_modifier() {
$!language_modifier
}
method can_language_versions() {
$!can_language_versions
?? $!can_language_versions
!! ($!can_language_versions := self.config<can-language-versions>)
}
method language_revisions() {
$!language_revisions
?? $!language_revisions
!! ($!language_revisions := self.config<language-revisions>)