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

Basically change minimum version of JSON::Fast #15

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lib/.precomp/*
.precomp/*
t/tmp/

workspace.xml
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Things to do

* [ ] File should probably be a distinct object. Right now it's a key and a config, and lots of things are done on it, but it's not clear how to add a new file, for instance. It would be much easier if cached files could be created, compiled and handled in an independent way; that way, it would be easier to add secondary files to the cache.

* [ ] Once file handling is done, it would be easier to add (or eliminate) files from the cache.
9 changes: 5 additions & 4 deletions lib/Pod/To/Cached.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use nqp;
use JSON::Fast;
use CompUnit::PrecompilationRepository::Document;

constant @extensions = <pod pod6>;

=begin pod

=TITLE Pod::To::Cached
Expand Down Expand Up @@ -54,7 +56,7 @@ $cache.freeze;
path to the collection of pod files
ignored if cache frozen

=item @!extensions = <pod pod6>
=item constant @extensions = <pod pod6>
the possible extensions for a POD file

=item verbose = False
Expand Down Expand Up @@ -102,7 +104,7 @@ $cache.freeze;
=item pod
method pod(Str $source)
Returns an array of POD Objects generated from the file associated with $source name.
When a doc-set is being actively updated, then pod files may have failed, in which case they have Status Valid.
When a doc-set is being actively updated, then pod files may have failed, in which case they have C<Status> = C<Valid>.
To froze a cache, all files must have Current status

=item Status is an enum with the following elements and semantics
Expand All @@ -124,7 +126,6 @@ enum Status is export <Current Valid Failed New Old>; # New is internally used,

has Str $.path = '.pod6-cache';
has Str $.source = 'doc';
has @.extensions = <pod pod6>;
has Bool $.verbose is rw;
has $.precomp;
has %.files;
Expand Down Expand Up @@ -333,7 +334,7 @@ method get-pods {
#| Recursively finds all pod files
@!pods = my sub recurse ($dir) {
gather for dir($dir) {
take .Str if .extension ~~ any( @!extensions );
take .Str if .extension ~~ any( @extensions );
take slip sort recurse $_ if .d;
}
}($!source); # is the first definition of $dir
Expand Down
10 changes: 10 additions & 0 deletions pod-cached.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PERL6_MODULE_TYPE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/t" isTestSource="true" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>