Skip to content

Instantly share code, notes, and snippets.

@donaldh
Created January 29, 2016 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donaldh/4de32ce051b18491242e to your computer and use it in GitHub Desktop.
Save donaldh/4de32ce051b18491242e to your computer and use it in GitHub Desktop.
Candidate fix for "Missing serialize function for REPR ContextRef"
diff --git a/src/core/CompUnit/Repository/Locally.pm b/src/core/CompUnit/Repository/Locally.pm
index bab6b34..5a8d6f1 100644
--- a/src/core/CompUnit/Repository/Locally.pm
+++ b/src/core/CompUnit/Repository/Locally.pm
@@ -9,8 +9,12 @@ role CompUnit::Repository::Locally {
my $abspath := $*SPEC.rel2abs($prefix);
my $IO := IO::Path.new-from-absolute-path($abspath);
+ nqp::scwbdisable();
%instances{$abspath} //=
self.bless(:prefix($IO), :lock(Lock.new), :WHICH(self.^name ~ '|' ~ $abspath), :$next-repo);
+ nqp::scwbenable();
+
+ %instances{$abspath};
}
multi method Str(CompUnit::Repository::Locally:D:) { $!prefix.abspath }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment