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

perl6 can't find file it just created #6111

Closed
p6rt opened this issue Feb 28, 2017 · 4 comments
Closed

perl6 can't find file it just created #6111

p6rt opened this issue Feb 28, 2017 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Feb 28, 2017

Migrated from rt.perl.org#130889 (status was 'resolved')

Searchable as RT130889$

@p6rt
Copy link
Author

p6rt commented Feb 28, 2017

From sinan@unur.com

This is on Windows 10 using MoarVM, NQP, and perl6 built using Visual
Studio 2015 tools. I am using development versions on this machine,
but I don't think the problem is caused by that.

Consider the following script​:

$ type cogito-ergo-sum.pl6
use v6.c;

my $test-file = 'sartre'.IO;
my $test-fh = $test-file.open :w;

die "Could not open $test-file" unless ?$test-fh;
$test-fh.put​: Q​:to/END/;
  Camus was right!
  END

$test-fh.close;

($test-file ~ ($test-file.e ?? ' exists' !! ' does not exist' )).say;

die "$test-file does not exist" unless $test-file.e;

Here is what I see​:

$ perl6 cogito-ergo-sum.pl6
sartre does not exist
sartre does not exist
  in block <unit> at cogito-ergo-sum.pl6 line 15

But, of course, the file was created​:

$ dir sartre
...
2017-02-28 09​:34 AM 20 sartre

On the second run, when the file 'sartre' already exists, it can find it​:

$ perl6 cogito-ergo-sum.pl6
sartre exists

This seems to be some kind of caching issue involving the file system,
but, of course, that could be wrong because I haven't examined what
actually happens.

-- Sinan

@p6rt
Copy link
Author

p6rt commented Feb 28, 2017

From @zoffixznet

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@76f71878da
Test​: Raku/roast@908348eef1

@p6rt
Copy link
Author

p6rt commented Feb 28, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt closed this as completed Feb 28, 2017
@p6rt
Copy link
Author

p6rt commented Feb 28, 2017

@zoffixznet - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant