Skip to content

Commit

Permalink
Merge pull request #3866 from rakudo/release-2020.08
Browse files Browse the repository at this point in the history
Release 2020.08
  • Loading branch information
Altai-man committed Aug 22, 2020
2 parents ee96b37 + ecdbdcd commit 0e7f426
Show file tree
Hide file tree
Showing 6 changed files with 149 additions and 85 deletions.
40 changes: 40 additions & 0 deletions docs/ChangeLog
@@ -1,3 +1,43 @@
New in 2020.08:
+ Changes:
+ Methods `name` and `usage-name` of `Parameter` now return an empty `Str`,
when there is no name, instead of `Nil`. Method `default` returns `Code` type object,
when no default was provided instead of `Any` type object [c11f4b18]
+ Remove redundant `(())` from `Map.new.raku` [491e1def]
+ Routine `done-testing` of `Test` module returns `Bool` now,
indicating if the tests passed or not [337848fe]
+ Deprecations:
+ Deprecate `--nqp-lib` command line option,
which had no effect for more than a year [9071653e]
+ Fixes:
+ Make `X::Method::NotFound` exception more user-friendly
[b36afcb3][760034ef][eb0ca2a3][66adb771][acc5e64d][4546a603]
+ Fix false positive typechecking exceptions for some generic types
[3d5fba7b][973b83de][8d40691d][1db17c46][1eb712d5]
+ Ensure `Routine` subtypes are composed before performing mixins with
their instances [7f2ae26c][e3c2646e]
+ Fix mixing in a role with attributes into a NQP class [1b5f6b98][9e51d01b]
+ Make exceptions thrown by supply iterators don't claim to have
originally been thrown within the iterator itself [fcfc60b6]
+ Fix `Baggy.pickpairs` called with a `Callable` [08f81f24]
+ Fix a rare, yet possible data race [9d6d8dd7]
+ Additions:
+ Add `set_parameterizer`, `parameterize_type`, `type_parameterized`,
`type_parameters` and `type_parameter_at` methods for `Metamodel::Primitives` [2ab94429]
+ Internal:
+ Type `Parameter` methods [c11f4b18]
+ Fix release pipeline to not delete the GNU/Linux build [4ad4bd30]
+ Make `Rakudo::Internals::JSON` up to 4.4x as fast [b60e1636][43bd739f]
+ Do roast-related cleanup, add `quicktest` make target
[1e20dfca][6fd09811][333ce78c][dd8cd411]
+ Rework `tools/update-passing-test-data.pl` to support backends [ea0c98cf]
+ Make `main-version.nqp` a backend-specific configuration file [80b0747a]
+ Add a `Perl6::SysConfig` class [ace5e22f]
+ Simplify binary release instructions a little [27eb5ea9]
+ Add tests to make sure profilers can be invoked [d7aa7e66]
+ Remove an outdated workaround from `Cool` implementation [a3af5833]
+ Fix incorrect method call [02a83442]

New in 2020.07:
+ Fixes:
+ Improve "Method not found" error message for some rare cases [0a86798f]
Expand Down
92 changes: 92 additions & 0 deletions docs/announce/2020.08.md
@@ -0,0 +1,92 @@
# Announce: Rakudo compiler, Release #138 (2020.08)

On behalf of the Rakudo development team, I’m very happy to announce the
August 2020 release of Rakudo #138. Rakudo is an implementation of
the Raku[^1] language.

The source tarball for this release is available from
<https://rakudo.org/files/rakudo>.
Pre-compiled archives will be available shortly.

New in 2020.08:
+ Changes:
+ Methods `name` and `usage-name` of `Parameter` now return an empty `Str`,
when there is no name, instead of `Nil`. Method `default` returns `Code` type object,
when no default was provided instead of `Any` type object [c11f4b18]
+ Remove redundant `(())` from `Map.new.raku` [491e1def]
+ Routine `done-testing` of `Test` module returns `Bool` now,
indicating if the tests passed or not [337848fe]
+ Deprecations:
+ Deprecate `--nqp-lib` command line option,
which had no effect for more than a year [9071653e]
+ Fixes:
+ Make `X::Method::NotFound` exception more user-friendly
[b36afcb3][760034ef][eb0ca2a3][66adb771][acc5e64d][4546a603]
+ Fix false positive typechecking exceptions for some generic types
[3d5fba7b][973b83de][8d40691d][1db17c46][1eb712d5]
+ Ensure `Routine` subtypes are composed before performing mixins with
their instances [7f2ae26c][e3c2646e]
+ Fix mixing in a role with attributes into a NQP class [1b5f6b98][9e51d01b]
+ Make exceptions thrown by supply iterators don't claim to have
originally been thrown within the iterator itself [fcfc60b6]
+ Fix `Baggy.pickpairs` called with a `Callable` [08f81f24]
+ Fix a rare, yet possible data race [9d6d8dd7]
+ Additions:
+ Add `set_parameterizer`, `parameterize_type`, `type_parameterized`,
`type_parameters` and `type_parameter_at` methods for `Metamodel::Primitives` [2ab94429]
+ Internal:
+ Type `Parameter` methods [c11f4b18]
+ Fix release pipeline to not delete the GNU/Linux build [4ad4bd30]
+ Make `Rakudo::Internals::JSON` up to 4.4x as fast [b60e1636][43bd739f]
+ Do roast-related cleanup, add `quicktest` make target
[1e20dfca][6fd09811][333ce78c][dd8cd411]
+ Rework `tools/update-passing-test-data.pl` to support backends [ea0c98cf]
+ Make `main-version.nqp` a backend-specific configuration file [80b0747a]
+ Add a `Perl6::SysConfig` class [ace5e22f]
+ Simplify binary release instructions a little [27eb5ea9]
+ Add tests to make sure profilers can be invoked [d7aa7e66]
+ Remove an outdated workaround from `Cool` implementation [a3af5833]
+ Fix incorrect method call [02a83442]


The following people contributed to this release:

Vadim Belman, Juan Julián Merelo Guervós, Will "Coke" Coleda, Patrick Böker,
Elizabeth Mattijsen, Alexander Kiryuhin, stoned, Daniel Lathrop, Timo Paulssen,
Stoned Elipot, Christian Bartolomäus, Tom Browder, rir, Ben Davies,
Daniel Green, Jonathan Worthington, Paul Cochrane, Stefan Seifert,
Daniel Sockwell, Nicholas Clark, Antonio, Tobias Boege

This release implements 6.c and 6.d versions of the Raku specification.
6.c version of the language is available if you use the `use v6.c`
version pragma, otherwise 6.d is the default.

Upcoming releases in 2020 will include new functionality that is not
part of 6.c or 6.d specifications, available with a lexically scoped
pragma. Our goal is to ensure that anything that is tested as part of
6.c and 6.d specifications will continue to work unchanged. There may
be incremental spec releases this year as well.

If you would like to contribute or get more information, visit
<https://raku.org>, <https://rakudo.org/community>, ask on the
<perl6-compiler@perl.org> mailing list, or ask on IRC #raku on freenode.

Additionally, we invite you to make a donation to The Perl Foundation
to sponsor Raku development: <https://donate.perlfoundation.org/>
(put “Raku Core Development Fund” in the ‘Purpose’ text field)

The next release of Rakudo (#139), is tentatively scheduled for 2020-09-19.

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 <https://raku.org/>
3 changes: 2 additions & 1 deletion docs/release_guide.pod
Expand Up @@ -18,7 +18,7 @@ Note that we are trying very hard to ensure there are no backward
compatibility issues post version 6.c. As such, we may end up delaying
some releases to ensure any compatibility issues are resolved.

2020-08-22 Rakudo #138 (Altai-man + Releasable)
2020-09-19 Rakudo #139 (Altai-man + Releasable)

(More planned dates can be generated with F<tools/release-dates.p6>).

Expand Down Expand Up @@ -515,6 +515,7 @@ Previous releases were bundled as part of monthly Parrot releases.
2020-05-10 2020.05.1 (Altai-man)
2020-06-21 Rakudo #136 (Altai-man + Releasable)
2020-07-20 Rakudo #137 (Altai-man + Releasable)
2020-08-22 Rakudo #138 (Altai-man + Releasable)

=head1 COPYRIGHT

Expand Down
25 changes: 6 additions & 19 deletions src/core.c/CompUnit/PrecompilationRepository.pm6
Expand Up @@ -230,19 +230,10 @@ Need to re-check dependencies.")
}

if $resolve {
# cw: Will return false if the file is already locked. This now
# implies that the Store must cache its created locking objects
# so that existing objects can be returned, or new ones
# created, upon this check.
#
# Actually, this implies two things:
# 1) Creation
# 2) Lock state check.
if self.store.destination(
$compiler-id,
$precomp-unit.id,
:extension<.repo-id>,
:lock-full
:extension<.repo-id>
) {
self.store.store-repo-id(
$compiler-id,
Expand Down Expand Up @@ -348,7 +339,7 @@ Need to re-check dependencies.")
:$precomp-stores,
--> Bool:D) {

# obtain destination, lock the file for other processes
# obtain destination, lock the store for other processes
my $store := self.store;
my $io := $store.destination($compiler-id, $id);
return False unless $io;
Expand Down Expand Up @@ -395,14 +386,10 @@ Need to re-check dependencies.")
nqp::bindkey($env,'RAKUDO_PRECOMP_DIST',
$distribution ?? $distribution.serialize !! '{}');

my $bc := "$io.bc";
my $bc-lock := $store.initiate-lock($bc);
$bc := $bc.IO;
my $bc := "$io.bc".IO;
$!RMD("Precompiling $path into $bc ($lle $profile $optimize $stagestats)")
if $!RMD;

LEAVE { $bc-lock.unlock if $bc-lock; }

my $raku := $*EXECUTABLE.absolute
.subst('perl6-debug', 'perl6') # debugger would try to precompile it's UI
.subst('perl6-gdb', 'perl6')
Expand Down Expand Up @@ -459,7 +446,7 @@ Need to re-check dependencies.")
}

if $status { # something wrong
#$store.unlock;
$store.unlock;
$!RMD("Precompiling $path failed: $status")
if $!RMD;

Expand All @@ -477,7 +464,7 @@ Need to re-check dependencies.")
$!RMD("$path aborted precompilation without failure")
if $!RMD;

#$store.unlock;
$store.unlock;
return False;
}

Expand Down Expand Up @@ -531,7 +518,7 @@ Need to re-check dependencies.")
);
$bc.unlink;
$store.store-repo-id($compiler-id, $id, :repo-id($REPO.id));
#$store.unlock;
$store.unlock;
True
}
}
Expand Down
11 changes: 1 addition & 10 deletions src/core.c/CompUnit/PrecompilationStore.pm6
Expand Up @@ -3,10 +3,6 @@ role CompUnit::PrecompilationStore {
method new-unit(| --> CompUnit::PrecompilationUnit:D)
{ ... }

# Initiates the item-level lock
method initiate-lock(Str $location)
{ ... }

# Load the precompilation identified by the pairing of the specified
# compiler and precompilation ID.
method load-unit(CompUnit::PrecompilationId $compiler-id,
Expand Down Expand Up @@ -51,9 +47,4 @@ role CompUnit::PrecompilationStore {
{ ... }
}

role CompUnit::PrecompilationStore::Item {
# Unlock the precomp-item
method unlock { ... }
}

# vim: ft=perl6 expandtab sw=4
# vim: expandtab shiftwidth=4
63 changes: 8 additions & 55 deletions src/core.c/CompUnit/PrecompilationStore/File.pm6
@@ -1,19 +1,6 @@
class CompUnit::PrecompilationStore::File
does CompUnit::PrecompilationStore
{
my class Compunit::PrecompilationStore::File::Item
does CompUnit::PrecompilationStore::Item
{
has IO::Handle $!item;

submethod BUILD (:$!item) { }

method unlock {
$!item.close;
$!item.path.unlink;
}
}

my class CompUnit::PrecompilationUnit::File
does CompUnit::PrecompilationUnit
{
Expand Down Expand Up @@ -109,10 +96,6 @@ class CompUnit::PrecompilationStore::File

method save-to(IO::Path $precomp-file) {
my $handle := $precomp-file.open(:w);
# cw: There may be an urge to just perform the file locking, here.
# it should be resisted. Much of the work that requires the
# locking starts from the moment !file() is called. So a lock
# here would be too late.
$handle.print($!checksum ~ "\n");
$handle.print($!source-checksum ~ "\n");
$handle.print($_.serialize ~ "\n") for @!dependencies;
Expand Down Expand Up @@ -185,17 +168,17 @@ class CompUnit::PrecompilationStore::File
self!dir($compiler-id, $precomp-id).add($precomp-id ~ $extension)
}

method !lock(IO::Path $to-lock --> Nil) {
method !lock(--> Nil) {
unless $!wont-lock {
$!update-lock.lock;
$!lock := $to-lock.add('.lock').open(:create, :rw)
$!lock := $.prefix.add('.lock').open(:create, :rw)
unless $!lock;
$!lock.lock if $!lock-count++ == 0;
}
}

method unlock() {
if $!wont-lock || $!lock-count == 0 {
if $!wont-lock {
Nil
}
else {
Expand Down Expand Up @@ -245,20 +228,18 @@ class CompUnit::PrecompilationStore::File
method remove-from-cache(CompUnit::PrecompilationId:D $precomp-id) {
$!update-lock.protect: {
nqp::deletekey($!loaded,$precomp-id.Str);
# cw: Remove file lock object?
}
}

method destination(
CompUnit::PrecompilationId:D $compiler-id,
CompUnit::PrecompilationId:D $precomp-id,
Str:D :$extension = '',
Bool:D :$lock-full = False
Str:D :$extension = ''
--> IO::Path:D) {

# have a writable prefix, assume it's a directory
if $!prefix.w {
self!lock($.prefix) if $lock-full;
self!lock();
self!file($compiler-id, $precomp-id, :$extension);
}

Expand Down Expand Up @@ -293,23 +274,6 @@ class CompUnit::PrecompilationStore::File
my $dest := self!dir($compiler-id, $precomp-id);
$dest.mkdir unless $dest.e;

# cw: <strikethru>Create lock object, here?</strikethru>
# cw: Create STOREUNIT object, here?
# A mutant chicken and egg problem. The "lock" object is really something
# that wraps an IO::Handle so that .lock can be called upon it. What is
# created here is an IO::Path. Should we create the handle here, or
# wait until it is created later in this process.
#
# Object wants to be an IO::Path, but proper ITEM-LEVEL lock handling
# also needs control of .lock and .unlock, which is an IO::Handle
# method.
#
# Frankensteining an amalgamation might be an answer but it could cause
# developer confusion down the road.
#
# A new object that wraps both IO::Handle and IO::Path may be the
# better way.

$dest.add($precomp-id ~ $extension)
}

Expand All @@ -319,8 +283,7 @@ class CompUnit::PrecompilationStore::File
IO::Path:D $path,
Str:D :$extension = ''
) {
my $file := self!file($compiler-id, $precomp-id, :$extension);
try $path.rename($file);
$path.rename(self!file($compiler-id, $precomp-id, :$extension));
}

method store-unit(
Expand All @@ -330,7 +293,7 @@ class CompUnit::PrecompilationStore::File
) {
my $precomp-file := self!file($compiler-id, $precomp-id, :extension<.tmp>);
$unit.save-to($precomp-file);
try $precomp-file.rename(self!file($compiler-id, $precomp-id));
$precomp-file.rename(self!file($compiler-id, $precomp-id));
self.remove-from-cache($precomp-id);
}

Expand All @@ -341,7 +304,7 @@ class CompUnit::PrecompilationStore::File
) {
my $repo-id-file := self!file($compiler-id, $precomp-id, :extension<.repo-id.tmp>);
$repo-id-file.spurt($repo-id);
try $repo-id-file.rename(self!file($compiler-id, $precomp-id, :extension<.repo-id>));
$repo-id-file.rename(self!file($compiler-id, $precomp-id, :extension<.repo-id>));
}

method delete(
Expand All @@ -360,16 +323,6 @@ class CompUnit::PrecompilationStore::File
}
$compiler-dir.rmdir;
}

method initiate-lock (
Str:D $location is copy
--> Compunit::PrecompilationStore::File::Item:D
) {
my $item = $location.IO.extension('lock').open(:create, :rw);
$item.lock;

Compunit::PrecompilationStore::File::Item.new(:$item)
}
}

# vim: expandtab shiftwidth=4

0 comments on commit 0e7f426

Please sign in to comment.