Skip to content

Commit

Permalink
Renaming of perl6 to rakudo
Browse files Browse the repository at this point in the history
- `rakudo` binaries become the default, `perl6` are aliases.

- Changed config and makefile variable names where possible from perl6
(case considered) to Raku or rakudo, depending on context. I.e.  where
it goes about binaries – we say `rakudo`; `Raku` where it's about the
language.

- Some variables in scripts were renamed too.

- `harness6` `--perlpath` changed to `--rakupath`.

- `perl6.jar` became `rakudo.jar` though Java class is still `perl6`

- Switching over from `PERL6LIB` to `RAKUDOLIB`
  • Loading branch information
vrurg committed Feb 14, 2020
1 parent fbeb3e3 commit f5f6f76
Show file tree
Hide file tree
Showing 17 changed files with 190 additions and 181 deletions.
25 changes: 15 additions & 10 deletions .gitignore
Expand Up @@ -71,8 +71,7 @@ perl6.rc
/perl6-js
/perl6-js.bat
/rakudo-m.c
/perl6-m
/perl6-m.exe
/rakudo-m.exe
/perl6-debug-m
/perl6-debug-m.bat
/perl6-gdb-m
Expand All @@ -81,6 +80,8 @@ perl6.rc
/perl6-lldb-m.bat
/perl6-valgrind-m
/perl6-valgrind-m.bat
/rakudo
/rakudo-m
/rakudo-debug-m
/rakudo-debug-m.bat
/rakudo-gdb-m
Expand All @@ -89,14 +90,18 @@ perl6.rc
/rakudo-lldb-m.bat
/rakudo-valgrind-m
/rakudo-valgrind-m.bat
/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
/rakudo-j
/rakudo-debug-j
/rakudo-eval-server
/rakudo-jdb-server
/inst-rakudo
/inst-rakudo-debug
/inst-rakudo-m
/inst-rakudo-debug-m
/inst-rakudo.exe
/inst-rakudo-debug.exe
/inst-rakudo-m.exe
/inst-rakudo-debug-m.exe
t/localtest.data
t/spec
t/packages/tap-harness6
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/vm/jvm/runtime/org/perl6/rakudo/RakudoEvalServer.java
Expand Up @@ -27,13 +27,13 @@ public String run(String[] argv) throws Exception {
public RakudoEvalServer() {
String[] cps = System.getProperty("java.class.path").split("[;:]");
for(String cfile : cps) {
if(cfile.endsWith("perl6.jar")) {
if(cfile.endsWith("rakudo.jar")) {
appname = cfile;
break;
}
}
if(appname == null) {
throw new RuntimeException("CLASSPATH not set properly, couldn't find perl6.jar");
throw new RuntimeException("CLASSPATH not set properly, couldn't find rakudo.jar");
}

System.setProperty("perl6.prefix", appname.substring(0, appname.indexOf("/share")));
Expand Down
5 changes: 3 additions & 2 deletions src/vm/moar/runner/main.c
Expand Up @@ -309,6 +309,7 @@ int wmain(int argc, wchar_t *wargv[])
#ifdef STATIC_RAKUDO_HOME
rakudo_home = STRINGIFY(STATIC_RAKUDO_HOME);
#else
/* XXX Isn't it time to move RAKUDO_HOME in front of PERL6_HOME?? */
if (getenv("PERL6_HOME")) {
if (!retrieve_home(&rakudo_home, perl6_rel_path, perl6_rel_path_size, "PERL6_HOME",
exec_dir_path, exec_dir_path_size, perl6_check_path, perl6_check_path_size)) {
Expand Down Expand Up @@ -342,7 +343,7 @@ int wmain(int argc, wchar_t *wargv[])
strcpy(lib_path[0] + nqp_home_size, "\\lib");
strcpy(lib_path[1] + rakudo_home_size, "\\lib");
strcpy(lib_path[2] + rakudo_home_size, "\\runtime");
#ifdef MOAR_PERL6_RUNNER_DEBUG
#ifdef MOAR_RAKUDO_RUNNER_DEBUG
strcpy(perl6_file + rakudo_home_size, "\\runtime\\perl6-debug.moarvm");
#else
strcpy(perl6_file + rakudo_home_size, "\\runtime\\perl6.moarvm");
Expand All @@ -351,7 +352,7 @@ int wmain(int argc, wchar_t *wargv[])
strcpy(lib_path[0] + nqp_home_size, "/lib");
strcpy(lib_path[1] + rakudo_home_size, "/lib");
strcpy(lib_path[2] + rakudo_home_size, "/runtime");
#ifdef MOAR_PERL6_RUNNER_DEBUG
#ifdef MOAR_RAKUDO_RUNNER_DEBUG
strcpy(perl6_file + rakudo_home_size, "/runtime/perl6-debug.moarvm");
#else
strcpy(perl6_file + rakudo_home_size, "/runtime/perl6.moarvm");
Expand Down
6 changes: 3 additions & 3 deletions t/harness5
Expand Up @@ -41,8 +41,8 @@ GetOptions(
my @pass_through_options = grep m/^--?[^-]/, @ARGV;
my @files = grep m/^[^-]/, @ARGV;

$ENV{'HARNESS_PERL'} = ".${slash}perl6-" . ($js ? "js" : $moar ? "m" : $jvm ? "j" : "m");
$ENV{'PERL6LIB'} = "./lib";
$ENV{'HARNESS_PERL'} = ".${slash}rakudo-" . ($js ? "js" : $moar ? "m" : $jvm ? "j" : "m");
$ENV{'RAKUDOLIB'} = "./lib";

my @slow;
if ($list_file) {
Expand Down Expand Up @@ -141,7 +141,7 @@ if ($jvm) {

no warnings 'once';
# leak the filehandle; it will be closed at exit, robustly telling the server to terminate
open JVMSERVER, "| .${slash}perl6-eval-server -bind-stdin -cookie TESTTOKEN -app .${slash}perl6.jar" or die "cannot fork eval server: $!\n";
open JVMSERVER, "| .${slash}rakudo-eval-server -bind-stdin -cookie TESTTOKEN -app .${slash}rakudo.jar" or die "cannot fork eval server: $!\n";
sleep 1;
}

Expand Down
16 changes: 8 additions & 8 deletions t/harness6
@@ -1,4 +1,4 @@
#!/usr/bin/env perl6
#!/usr/bin/env rakudo

# note: Due to a limitation in argument parsing options that should be passed
# through to fudgeall have to come after all other options
Expand Down Expand Up @@ -34,15 +34,15 @@ sub MAIN(
Bool :$stress = False,
Bool :$randomize = False,
Bool :$no-mix-slow = $*DISTRO.is-win || $jobs == 1,
Str :$perlpath = ~$*EXECUTABLE,
Str :$rakupath = ~$*EXECUTABLE,
Str :$perl5path = 'perl',
*@files,
) {
my @slow;
with $tests-from-file {
$tests-from-file .= &convert-to-versioned-file;
my $inline-perl5-is-installed = run(
$perlpath, '-e', 'exit 1 if (try require Inline::Perl5) === Nil'
$rakupath, '-e', 'exit 1 if (try require Inline::Perl5) === Nil'
).exitcode == 0;

unless $inline-perl5-is-installed {
Expand Down Expand Up @@ -91,7 +91,7 @@ sub MAIN(
}

my $harness = ::('TAP::Harness').new(
:handlers[get-handler($vm, :$perlpath)],
:handlers[get-handler($vm, :$rakupath)],
:ignore-exit,
# :trap,
:$jobs,
Expand Down Expand Up @@ -139,12 +139,12 @@ sub MAIN(

# multi sub get-handler('jvm') {
# unlink 'TESTTOKEN';
# state $server = run ".".IO.child("perl6-eval-server"), <-bind-stdin -cookie TESTTOKEN -app perl6.jar>, :in;
# state $server = run ".".IO.child("rakudo-eval-server"), <-bind-stdin -cookie TESTTOKEN -app rakudo.jar>, :in;
# sleep 1;
# ::('TAP::Harness::SourceHandler::Exec').new($perl5path, './eval-client.pl', 'TESTTOKEN', 'run');
# }
multi sub get-handler(Any, :$perlpath) {
::('TAP::Harness::SourceHandler::Perl6').new(:incdirs['lib'], :path($perlpath));
multi sub get-handler(Any, :$rakupath) {
::('TAP::Harness::SourceHandler::Perl6').new(:incdirs['lib'], :path($rakupath));
}
}

Expand Down Expand Up @@ -196,7 +196,7 @@ Options:
--stress - run tests marked as stress tests
--randomize randomize the order in which test-files are processed.
--no-mixslow - don't spread tests marked "slow" equally over the run (on non-Win)
--perlpath - path to perl6 (defaults to $*EXECUTABLE)
--rakupath - path to raku (defaults to $*EXECUTABLE)
--perl5path - path to Perl executable for various helper utilities (defaults to 'perl')
=end pod
8 changes: 4 additions & 4 deletions tools/autounfudge.pl
Expand Up @@ -88,7 +88,7 @@ =head1 MISCELLANEA

my $path_sep = $^O eq 'MSWin32' ? ';' : ':';
my $slash = $^O eq 'MSWin32' ? '\\' : '/';
$ENV{PERL6LIB} = join($path_sep, qw/lib ./) unless $keep_env;
$ENV{RAKUDOLIB} = join($path_sep, qw/lib ./) unless $keep_env;
my $impl_re = quotemeta $impl;

if ($impl eq 'rakudo') {
Expand All @@ -103,7 +103,7 @@ sub eval_server {
return unless $jvm;
my $token = int(100_000 * rand);

open my $pipe, "| .${slash}perl6-eval-server -bind-stdin -cookie $token -app .${slash}perl6.jar" or die "cannot fork eval server: $!\n";
open my $pipe, "| .${slash}rakudo-eval-server -bind-stdin -cookie $token -app .${slash}rakudo.jar" or die "cannot fork eval server: $!\n";
$fh{$token} = $pipe;
sleep 1;
return $token;
Expand Down Expand Up @@ -241,7 +241,7 @@ sub usage {
--impl impl Specify a different implementation
--specfile file Specification file to read filenames from
--auto use t/spectest.data for --specfile
--keep-env Keep PERL6LIB environment variable.
--keep-env Keep RAKUDOLIB environment variable.
--exclude regex Don't run the tests that match regex
--section number Run only on tests belonging to section <number>
--unskip Try to change 'skip' to 'todo' markers
Expand Down Expand Up @@ -296,7 +296,7 @@ sub get_harness {
my $token = shift;
return TAP::Harness->new({
verbosity => -2,
exec => $jvm ? [$^X, "./eval-client.pl", $token, "run"] : [$^X, 'tools/perl6-limited.pl'],
exec => $jvm ? [$^X, "./eval-client.pl", $token, "run"] : [$^X, 'tools/rakudo-limited.pl'],
merge => 1,
});
}
Expand Down
18 changes: 9 additions & 9 deletions tools/build/create-jvm-runner.pl
Expand Up @@ -31,10 +31,10 @@
my $sharedir = File::Spec->catfile(
($type eq 'install' && $^O ne 'MSWin32' ? '${RAKUDO_HOME}' : File::Spec->catfile($prefix, 'share', 'perl6') ),
'site', 'lib');
my $perl6jars = join( $cpsep,
my $rakudo_jars = join( $cpsep,
$^O eq 'MSWin32' ? $nqpjars : '${NQP_JARS}',
File::Spec->catfile($jardir, 'rakudo-runtime.jar'),
File::Spec->catfile($jardir, $debugger ? 'perl6-debug.jar' : 'perl6.jar'));
File::Spec->catfile($jardir, $debugger ? 'rakudo-debug.jar' : 'rakudo.jar'));

my $NQP_LIB = $blib ? ': ${NQP_LIB:="blib"}' : '';

Expand Down Expand Up @@ -79,13 +79,13 @@
? $preamble_unix . ": \${NQP_HOME=\"\$DIR/../share/nqp\"}
: \${NQP_JARS:=\"$nqpjars\"}
: \${RAKUDO_HOME:=\"\$DIR/../share/perl6\"}
: \${PERL6_JARS:=\"$perl6jars\"}
: \${RAKUDO_JARS:=\"$rakudo_jars\"}
exec "
: $preamble_unix . "$NQP_LIB
: \${NQP_HOME:=\"$nqp_home\"}
: \${NQP_JARS:=\"$nqpjars\"}
: \${RAKUDO_HOME:=\"$prefix\"}
: \${PERL6_JARS:=\"$perl6jars\"}
: \${RAKUDO_JARS:=\"$rakudo_jars\"}
exec ";
my $postamble = $^O eq 'MSWin32' ? ' %*' : ' "$@"';

Expand All @@ -104,7 +104,7 @@ sub install {
chmod 0755, $install_to if $^O ne 'MSWin32';
}

my $classpath = join($cpsep, ($perl6jars, $jardir, $libdir, $nqplibdir));
my $classpath = join($cpsep, ($rakudo_jars, $jardir, $libdir, $nqplibdir));
my $jopts = '-noverify -Xms100m'
. ' -cp ' . ($^O eq 'MSWin32' ? '"%CLASSPATH%";' : '$CLASSPATH:') . $classpath
. ' -Dperl6.prefix=' . ($type eq 'install' && $^O ne 'MSWin32' ? '$DIR/..' : $prefix)
Expand All @@ -115,10 +115,10 @@ sub install {
. ',server=y,suspend=y';

if ($debugger) {
install "perl6-debug-j", "java $jopts perl6-debug";
install "rakudo-debug-j", "java $jopts rakudo-debug";
}
else {
install "perl6-j", "java $jopts perl6 $blib";
install "perl6-jdb-server", "java $jdbopts $jopts perl6 $blib";
install "perl6-eval-server", "java -Xmx3000m $jopts org.perl6.nqp.tools.EvalServer";
install "rakudo-j", "java $jopts perl6 $blib";
install "rakudo-jdb-server", "java $jdbopts $jopts perl6 $blib";
install "rakudo-eval-server", "java -Xmx3000m $jopts org.perl6.nqp.tools.EvalServer";
}
20 changes: 10 additions & 10 deletions tools/lib/NQP/Config/Rakudo.pm
Expand Up @@ -166,7 +166,7 @@ sub parse_lang_specs {
my $self = shift;

my $config = $self->{config};
my $tmpl = 'PERL6_SPECS';
my $tmpl = 'RAKU_SPECS';
open my $sh, "<", $self->template_file_path( $tmpl, required => 1 )
or self->sorry("Can't open $tmpl: $!");

Expand Down Expand Up @@ -213,7 +213,7 @@ sub parse_lang_specs {
}
}

$self->{perl6_specs} = \@specs;
$self->{raku_specs} = \@specs;

close $sh;
}
Expand All @@ -239,12 +239,12 @@ sub configure_misc {
# return \@elems;
#};

#$self->{perl6_specs} = [
#$self->{raku_specs} = [
# map { $spec_line->($_) }
# grep { s/\s*#.*$//; length }
# split(
# /\n/s,
# slurp( $self->template_file_path( 'PERL6_SPECS', required => 1, ) )
# slurp( $self->template_file_path( 'RAKU_SPECS', required => 1, ) )
# )
#];

Expand Down Expand Up @@ -319,7 +319,7 @@ sub configure_jvm_backend {
);
$config->{'nqp_classpath'} = $nqp_config->{'jvm::runtime.classpath'};
$config->{'nqp::libdir'} = $nqp_config->{'nqp::libdir'};
$config->{'j_runner'} = $self->batch_file('perl6-j');
$config->{'j_runner'} = $self->batch_file('rakudo-j');
}
}

Expand Down Expand Up @@ -436,8 +436,8 @@ sub configure_js_backend {
$config->{js_nqp} = $ijs->{bin};
$config->{'perl6_runtime'} =
File::Spec->rel2abs( $self->nfp('src/vm/js/perl6-runtime') );
$config->{'perl6_js_runner'} =
$self->batch_file( File::Spec->rel2abs('perl6-js') );
$config->{'rakudo_js_runner'} =
$self->batch_file( File::Spec->rel2abs('rakudo-js') );

if ( $ijs->{ok} ) {
$nqp_config = $ijs->{config};
Expand Down Expand Up @@ -532,9 +532,9 @@ sub clean_old_p6_libs {
}

# Returns all active language specification entries except for .c
sub perl6_specs {
sub raku_specs {
my $self = shift;
return @{ $self->{perl6_specs} };
return @{ $self->{raku_specs} };
}

sub post_active_backends {
Expand Down Expand Up @@ -720,7 +720,7 @@ sub _specs_iterate {

$self->not_in_context( specs => 'spec' );

for my $spec ( $cfg->perl6_specs ) {
for my $spec ( $cfg->raku_specs ) {
my $spec_char = $spec->[0];
my $spec_subdir = "6.$spec_char";
my %config = (
Expand Down
3 changes: 0 additions & 3 deletions tools/perl6-limited.pl

This file was deleted.

3 changes: 3 additions & 0 deletions tools/rakudo-limited.pl
@@ -0,0 +1,3 @@
#!/usr/bin/env perl

exec "ulimit -t 45; ulimit -v 2048576; ./rakudo @ARGV";

0 comments on commit f5f6f76

Please sign in to comment.