Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win: zef sometimes starts erroring with 'No such method subst' #213

Closed
holli-holzer opened this issue Nov 11, 2017 · 2 comments
Closed

win: zef sometimes starts erroring with 'No such method subst' #213

holli-holzer opened this issue Nov 11, 2017 · 2 comments
Labels

Comments

@holli-holzer
Copy link

When trying to install something zef will throw this error at me:

C:\rakudo>zef --debug install Pluggable
===> Searching for: Pluggable
No such method 'subst' for invocant of type 'Any'
  in method ver at C:\rakudo\share\perl6\site\sources\8E608EE960F95FEE2C36E6AFF89046ACA3634254 (Zef::Distribution) line 125
  in method hash at C:\rakudo\share\perl6\site\sources\8E608EE960F95FEE2C36E6AFF89046ACA3634254 (Zef::Distribution) line 21
  in method hash at C:\rakudo\share\perl6\site\sources\8E608EE960F95FEE2C36E6AFF89046ACA3634254 (Zef::Distribution) line 112
  in code  at C:\rakudo\share\perl6\site\sources\8E608EE960F95FEE2C36E6AFF89046ACA3634254 (Zef::Distribution) line 91
  in method provides-spec-matcher at C:\rakudo\share\perl6\site\sources\8E608EE960F95FEE2C36E6AFF89046ACA3634254 (Zef::Distribution) line 102
  in method contains-spec at C:\rakudo\share\perl6\site\sources\8E608EE960F95FEE2C36E6AFF89046ACA3634254 (Zef::Distribution) line 107
  in block  at C:\rakudo\share\perl6\site\sources\17AF88D1C554286D84D50F63AB2A71D6264F5811 (Zef::Repository::Ecosystems) line 65
  in code  at C:\rakudo\share\perl6\site\sources\17AF88D1C554286D84D50F63AB2A71D6264F5811 (Zef::Repository::Ecosystems) line 64
  in code  at C:\rakudo\share\perl6\site\sources\9AE76818BE9E9F67C06E13D02D55D192843B06A3 (Zef::Repository) line 13
  in method candidates at C:\rakudo\share\perl6\site\sources\9AE76818BE9E9F67C06E13D02D55D192843B06A3 (Zef::Repository) line 10
  in method find-candidates at C:\rakudo\share\perl6\site\sources\0061125F96D1E60B6E3B0001A4CB4D4188DF4869 (Zef::Client) line 108
  in method find-candidates at C:\rakudo\share\perl6\site\sources\0061125F96D1E60B6E3B0001A4CB4D4188DF4869 (Zef::Client) line 91
  in sub MAIN at C:\rakudo\share\perl6\site\sources\C360CEB3AF792C33F65155FA82FDB7AB4467EC82 (Zef::CLI) line 132
  in block <unit> at C:\rakudo\share\perl6\site\resources\94EA132075BAD926331B1EEE92A28712C70F6F78 line 1
  in sub MAIN at c:\rakudo\share\perl6\site\bin\zef line 2
  in block <unit> at c:\rakudo\share\perl6\site\bin\zef line 2

Steps to Reproduce

install current rakudo on win8
install zef
try to install something via zef

Your Environment

Win 8.1

This is Rakudo Star version 2017.10 built on MoarVM version 2017.10
implementing Perl 6.c.

no modules installed

@ugexe ugexe changed the title zef won't install things win: zef sometimes starts erroring with 'No such method subst' Nov 11, 2017
@ugexe
Copy link
Owner

ugexe commented Nov 11, 2017

This can be worked around with zef nuke StoreDir, which will delete the project lists inside of ~/.zef/store, until this issue is resolved.


This ended up being a result of the difference in code paths here:

if ( -not (Test-Path $FilePath) ) {
$client = New-Object System.Net.WebClient;
$client.Headers['User-Agent'] = $UserAgent;
$client.DownloadFile($uri.ToString(), $FilePath)
} else {
try {
$webRequest = [System.Net.HttpWebRequest]::Create($uri);
$webRequest.IfModifiedSince = ([System.IO.FileInfo]$FilePath).LastWriteTime
$webRequest.UserAgent = $UserAgent;
$webRequest.Method = "GET";
[System.Net.HttpWebResponse]$webResponse = $webRequest.GetResponse()
$stream = New-Object System.IO.StreamReader($webResponse.GetResponseStream())
$stream.ReadToEnd() | Set-Content -Path $FilePath -Force
} catch [System.Net.WebException] {
# If content isn't modified according to the output file timestamp then ignore the exception
if ($_.Exception.Response.StatusCode -ne [System.Net.HttpStatusCode]::NotModified) {
throw $_
}
}
}

e.g. the difference between the project file existing and when it already exists and changes occur to the project list.

@ugexe ugexe added the bug label Nov 11, 2017
@ugexe
Copy link
Owner

ugexe commented Nov 22, 2017

resolved in 222c626

@ugexe ugexe closed this as completed Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants