Re: perl6 with Rakudobrew

2020-06-12 Thread Vadim Belman

Not really sure about it, but don't you have to do 'rakudobrew switch 
moar-%TEST_MOAR%' after building? rakudobrew doesn't immediately activates a 
build.

Best regards,
Vadim Belman

> On Jun 12, 2020, at 4:03 PM, Richard Hainsworth  
> wrote:
> 
> I have tried two different strategies on appveyor. (I also run a travis test 
> for the same Module that passes without a problem).
> 
> a) Copying from OpenSSL, which uses rakudo.git (see script below)
> 
> b) Copying from GTK::Simple, which uses Rakudobrew (see below)
> 
> Both failed for reasons I can't work out. (The final lines are below)
> 
> 
> Could someone suggest an install stanza that would use the latest 
> `rakudo-star-***.msi` installation package?
> 
> It would be good to have some samples in the raku documentation.
> 
> I can provide my travis script (I use JJ's docker image).
> 
> [Rakudobrew]
> 
> os: Visual Studio 2017
> 
> platform: x64
> 
> install:
>   - '"C:\Program Files (x86)\Microsoft Visual 
> Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"'
>   - appveyor-retry choco install strawberryperl --allow-empty-checksums
>   - SET 
> PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
>   - git clone https://github.com/tadzik/rakudobrew 
>  %USERPROFILE%\rakudobrew
>   - SET PATH=%USERPROFILE%\rakudobrew\bin;%PATH%
>   - rakudobrew build moar %TEST_MOAR%
>   - rakudobrew build zef
>   - cd %APPVEYOR_BUILD_FOLDER%
>   - echo "installing SSL so we can download the dll files"
>   - zef install IO::Socket::SSL
>   - zef --depsonly install .
>   - zef build .
> 
> build: off
> 
> test_script:
>   - prove -v -e "raku -Ilib" t/
>   - zef --debug install .
> 
> shallow_clone: true
> [ response from appveyor fail - last lines]
> ...
> Generating code
> Finished generating code
> Microsoft (R) Program Maintenance Utility Version 14.16.27035.0
> Copyright (C) Microsoft Corporation.  All rights reserved.
> +++ Checking for moar NQP version
> +++ Creating installation directories
> +++ Removing old files
> +++ Installing files
> +++ Preparing installation
> Installed 13 core modules in 24.63815875 seconds!
> +++ MOAR BACKEND INSTALLED
> +++ Installing MOAR launchers
> +++ Creating Raku executable alias
> +++ Rakudo installed succesfully!
> Rakudo has been built and installed.
> Updating shims
> Done, moar-2020.05.1 built
> rakudobrew build zef
> Cloning into 'zef'...
> Your branch is up to date with 'origin/master'.
> rakudobrew: perl6: command not found
> Command exited with code 1
> 
> [Rakudo.git]
> os: Visual Studio 2017
> 
> platform: x64
> 
> install:
>   - '"C:\Program Files (x86)\Microsoft Visual 
> Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"'
>   - appveyor-retry choco install strawberryperl --allow-empty-checksums
>   - SET 
> PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
>   - appveyor-retry git clone https://github.com/rakudo/rakudo.git 
>  %APPVEYOR_BUILD_FOLDER%\..\rakudo
>   - cd %APPVEYOR_BUILD_FOLDER%\..\rakudo
>   - perl Configure.pl --gen-moar --gen-nqp --backends=moar
>   - nmake install
>   - SET PATH=%APPVEYOR_BUILD_FOLDER%\..\rakudo\install\bin;%PATH%
>   - SET 
> PATH=%APPVEYOR_BUILD_FOLDER%\..\rakudo\install\share\perl6\site\bin;%PATH%
>   - cd %APPVEYOR_BUILD_FOLDER%
>   - echo "installing SSL so we can download the dll files"
>   - zef install IO::Socket::SSL
>   - zef --depsonly install .
>   - zef build .
> 
> build: off
> 
> test_script:
>   - prove -v -e "raku -Ilib" t/
>   - zef --debug install .
> 
> shallow_clone: true
> [rakudo.git - avveyor failure. last lines]
> 
> +++ MOAR BACKEND INSTALLED
> +++ Installing MOAR launchers
> +++ Creating Raku executable alias
> +++ Rakudo installed succesfully!
> SET PATH=%APPVEYOR_BUILD_FOLDER%\..\rakudo\install\bin;%PATH%
> SET PATH=%APPVEYOR_BUILD_FOLDER%\..\rakudo\install\share\perl6\site\bin;%PATH%
> cd %APPVEYOR_BUILD_FOLDER%
> echo "installing SSL so we can download the dll files"
> "installing SSL so we can download the dll files"
> zef install IO::Socket::SSL
> 'zef' is not recognized as an internal or external command,
> operable program or batch file.
> Command exited with code 1
> [end]
> 
> On 12/06/2020 20:15, Vadim Belman wrote:
>> I'm still using rakudobrew for myself, it is not a problem. Besides, we 
>> still install perl6.
>> 
>> What I'd look for is if correct PATH is setup; and check if rakudobrew is 
>> been used properly. Note that different modes (env or shim) would need 
>> different handling. To my understanding, in a container shims are preferable 
>> over env.
>> 
>> Best regards,
>> Vadim Belman
>> 
>>> On Jun 12, 2020, at 2:40 PM, Elizabeth Mattijsen  
>>>  wrote:
>>> 
>>> It is my understanding that rakudobrew has been renamed to rakubrew: 
>>> https://rakubrew.org   Could the be the issue?
>>> 
 On 12 Jun 2020, at 14:59, Richard Hainswort

Re: perl6 with Rakudobrew

2020-06-12 Thread Richard Hainsworth
I have tried two different strategies on appveyor. (I also run a travis 
test for the same Module that passes without a problem).


a) Copying from OpenSSL, which uses rakudo.git (see script below)

b) Copying from GTK::Simple, which uses Rakudobrew (see below)

Both failed for reasons I can't work out. (The final lines are below)

Could someone suggest an install stanza that would use the latest 
`rakudo-star-***.msi` installation package?


It would be good to have some samples in the raku documentation.

I can provide my travis script (I use JJ's docker image).

[Rakudobrew]

os: Visual Studio 2017

platform: x64

install:
  -'"C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"' - appveyor-retry choco install strawberryperl --allow-empty-checksums

  - SET 
PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
  - git clone https://github.com/tadzik/rakudobrew %USERPROFILE%\rakudobrew
  - SET PATH=%USERPROFILE%\rakudobrew\bin;%PATH%
  - rakudobrew build moar %TEST_MOAR%
  - rakudobrew build zef
  - cd %APPVEYOR_BUILD_FOLDER%
  - echo "installing SSL so we can download the dll files"
  - zef install IO::Socket::SSL
  - zef --depsonly install .
  - zef build .

build: off

test_script:
  - prove -v -e "raku -Ilib" t/
  - zef --debug install .

shallow_clone: true
[ response from appveyor fail - last lines]
...
Generating code
Finished generating code
Microsoft (R) Program Maintenance Utility Version 14.16.27035.0
Copyright (C) Microsoft Corporation.  All rights reserved.
+++ Checking for moar NQP version
+++ Creating installation directories
+++ Removing old files
+++ Installing files
+++ Preparing installation
Installed 13 core modules in 24.63815875 seconds!
+++ MOAR BACKEND INSTALLED
+++ Installing MOAR launchers
+++ Creating Raku executable alias
+++ Rakudo installed succesfully!
Rakudo has been built and installed.
Updating shims
Done, moar-2020.05.1 built
rakudobrew build zef
Cloning into 'zef'...
Your branch is up to date with 'origin/master'.
rakudobrew: perl6: command not found
Command exited with code 1

[Rakudo.git]
os: Visual Studio 2017

platform: x64

install:
  -'"C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"' - appveyor-retry choco install strawberryperl --allow-empty-checksums

  - SET 
PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
  - appveyor-retry git clone https://github.com/rakudo/rakudo.git 
%APPVEYOR_BUILD_FOLDER%\..\rakudo
  - cd %APPVEYOR_BUILD_FOLDER%\..\rakudo
  - perl Configure.pl --gen-moar --gen-nqp --backends=moar
  - nmake install
  - SET PATH=%APPVEYOR_BUILD_FOLDER%\..\rakudo\install\bin;%PATH%
  - SET 
PATH=%APPVEYOR_BUILD_FOLDER%\..\rakudo\install\share\perl6\site\bin;%PATH%
  - cd %APPVEYOR_BUILD_FOLDER%
  - echo "installing SSL so we can download the dll files"
  - zef install IO::Socket::SSL
  - zef --depsonly install .
  - zef build .

build: off

test_script:
  - prove -v -e "raku -Ilib" t/
  - zef --debug install .

shallow_clone: true
[rakudo.git - avveyor failure. last lines]

+++ MOAR BACKEND INSTALLED
+++ Installing MOAR launchers
+++ Creating Raku executable alias
+++ Rakudo installed succesfully!
SET PATH=%APPVEYOR_BUILD_FOLDER%\..\rakudo\install\bin;%PATH%
SET 
PATH=%APPVEYOR_BUILD_FOLDER%\..\rakudo\install\share\perl6\site\bin;%PATH%

cd %APPVEYOR_BUILD_FOLDER%
echo "installing SSL so we can download the dll files"
"installing SSL so we can download the dll files"
zef install IO::Socket::SSL
'zef' is not recognized as an internal or external command,
operable program or batch file.
Command exited with code 1

[end]

On 12/06/2020 20:15, Vadim Belman wrote:

I'm still using rakudobrew for myself, it is not a problem. Besides, we still 
install perl6.

What I'd look for is if correct PATH is setup; and check if rakudobrew is been 
used properly. Note that different modes (env or shim) would need different 
handling. To my understanding, in a container shims are preferable over env.

Best regards,
Vadim Belman


On Jun 12, 2020, at 2:40 PM, Elizabeth Mattijsen  wrote:

It is my understanding that rakudobrew has been renamed to rakubrew: 
https://rakubrew.org  Could the be the issue?


On 12 Jun 2020, at 14:59, Richard Hainsworth  wrote:

I ran into this error using Rakudobrew on appveyor (see after )

I'm new at using appveyor, so maybe my script is wrong. But I wonder whether 
its because of a name change to raku without a backward alias to perl6.



Rakudo has been built and installed.

Updating shims
Done, moar-2020.05.1 built
rakudobrew build zef
Cloning into 'zef'...
Your branch is up to date with 'origin/master'.
rakudobrew: perl6: command not found
Command exited with code 1


Re: perl6 with Rakudobrew

2020-06-12 Thread Vadim Belman


I'm still using rakudobrew for myself, it is not a problem. Besides, we still 
install perl6.

What I'd look for is if correct PATH is setup; and check if rakudobrew is been 
used properly. Note that different modes (env or shim) would need different 
handling. To my understanding, in a container shims are preferable over env.

Best regards,
Vadim Belman

> On Jun 12, 2020, at 2:40 PM, Elizabeth Mattijsen  wrote:
> 
> It is my understanding that rakudobrew has been renamed to rakubrew: 
> https://rakubrew.org  Could the be the issue?
> 
>> On 12 Jun 2020, at 14:59, Richard Hainsworth  wrote:
>> 
>> I ran into this error using Rakudobrew on appveyor (see after )
>> 
>> I'm new at using appveyor, so maybe my script is wrong. But I wonder whether 
>> its because of a name change to raku without a backward alias to perl6.
>> 
>> 
>> 
>> Rakudo has been built and installed.
>> 
>> Updating shims
>> Done, moar-2020.05.1 built
>> rakudobrew build zef
>> Cloning into 'zef'...
>> Your branch is up to date with 'origin/master'.
>> rakudobrew: perl6: command not found
>> Command exited with code 1
> 


Re: perl6 with Rakudobrew

2020-06-12 Thread Elizabeth Mattijsen
It is my understanding that rakudobrew has been renamed to rakubrew: 
https://rakubrew.org  Could the be the issue?

> On 12 Jun 2020, at 14:59, Richard Hainsworth  wrote:
> 
> I ran into this error using Rakudobrew on appveyor (see after )
> 
> I'm new at using appveyor, so maybe my script is wrong. But I wonder whether 
> its because of a name change to raku without a backward alias to perl6.
> 
> 
> 
> Rakudo has been built and installed.
> 
> Updating shims
> Done, moar-2020.05.1 built
> rakudobrew build zef
> Cloning into 'zef'...
> Your branch is up to date with 'origin/master'.
> rakudobrew: perl6: command not found
> Command exited with code 1


perl6 with Rakudobrew

2020-06-12 Thread Richard Hainsworth

I ran into this error using Rakudobrew on appveyor (see after )

I'm new at using appveyor, so maybe my script is wrong. But I wonder 
whether its because of a name change to raku without a backward alias to 
perl6.




Rakudo has been built and installed.

Updating shims
Done, moar-2020.05.1 built
rakudobrew build zef
Cloning into 'zef'...
Your branch is up to date with 'origin/master'.
rakudobrew: perl6: command not found
Command exited with code 1


Re: Is thre a way to do an "if" on "use lib"?

2020-06-12 Thread Todd Chester via perl6-users




On 2020-06-07 18:49, ToddAndMargo via perl6-users wrote:

~
#!/usr/bin/env raku

# Note: this has to be the first thing at the top

my @LibPath;

BEGIN {
    for ('K:/Windows/NtUtil', 'X:/NtUtil') -> $candidate {
  push @LibPath, $candidate if $candidate.IO.d;
   }
    push @LibPath, 'C:/NtUtil';
    push @LibPath, '.';
}


use lib @LibPath;

dd @LibPath;
dd $*REPO.repo-chain.lines;
~~

raku use.lib.test.pl6

Array @LibPath = ["K:/Windows/NtUtil", "C:/NtUtil", "."]

("K:\\Windows\\NtUtil C:\\NtUtil C:\\Users\\todd\\.raku 
C:\\rakudo\\share\\perl6\\site C:\\rakudo\\share\\perl6\\vendor 
C:\\rakudo\\share\\perl6\\core 
CompUnit::Repository::AbsolutePath<131860432> 
CompUnit::Repository::NQP<124427016> 
CompUnit::Repository::Perl5<124427056>",).Seq



AH 

The above worked fine on my W10 virtual machine
when called from Cobian, but on a customer's (native)
Windows 10, I had to go back to using to comment out
method.