From 23e05b240b1a2977d6e0452bd099b6f760870cae Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Wed, 17 Jul 2019 19:34:09 +0200 Subject: [PATCH 1/7] Comma helpers --- .idea/codeStyles/codeStyleConfig.xml | 5 +++ .idea/misc.xml | 4 +++ .idea/vcs.xml | 6 ++++ META6.json | 53 ++++++++++++++-------------- pod-cached.iml | 10 ++++++ 5 files changed, 52 insertions(+), 26 deletions(-) create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/vcs.xml create mode 100644 pod-cached.iml diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..1a52d03 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/META6.json b/META6.json index 8fd866f..92bdea2 100644 --- a/META6.json +++ b/META6.json @@ -1,27 +1,28 @@ { - "perl" : "6.*", - "name" : "Pod::To::Cached", - "version" : "0.3.0", - "authors" : "Richard Hainsworth", - "description" : "Precompile a collection of pod files into a cache.", - "license" : "Artistic-2.0", - "provides" : { - "Pod::To::Cached" : "lib/Pod/To/Cached.pm6", - "CompUnit::PrecompilationRepository::Document": "lib/CompUnit/PrecompilationRepository/Document.pm6" - }, - "support" : { - "source" : "https://github.com/finanalyst/pod-cached/issues" - }, - "depends" : [ - "File::Directory::Tree", - "JSON::Fast" - ], - "test-depends" : [ - "Test", - "Test::Output", - "JSON::Fast", - "File::Directory::Tree" - ], - "source-type" : "git", - "source-url" : "https://github.com/finanalyst/pod-cached.git" -} + "name": "Pod::To::Cached", + "description": "Precompile a collection of pod files into a cache.", + "version": "0.3.0", + "perl": "6.*", + "authors": [ + "Richard Hainsworth" + ], + "auth": "finanalyst", + "depends": [ + "File::Directory::Tree", + "JSON::Fast" + ], + "test-depends": [ + "Test", + "Test::Output" + ], + "provides": { + "CompUnit::PrecompilationRepository::Document": "lib/CompUnit/PrecompilationRepository/Document.pm6", + "Pod::To::Cached": "lib/Pod/To/Cached.pm6" + }, + "support": { + "source": "https://github.com/finanalyst/pod-cached/issues" + }, + "license": "Artistic-2.0", + "source-url": "https://github.com/finanalyst/pod-cached.git", + "source-type": "git" +} \ No newline at end of file diff --git a/pod-cached.iml b/pod-cached.iml new file mode 100644 index 0000000..8b2e557 --- /dev/null +++ b/pod-cached.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file From 1da04d73445bd1ebc9e8fdd3f06bd6d614318d65 Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Wed, 17 Jul 2019 19:34:32 +0200 Subject: [PATCH 2/7] More comma helpers --- .idea/modules.xml | 8 +++ .idea/workspace.xml | 131 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 .idea/modules.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b2dda38 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..8e03cd2 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1563384602711 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 680f5bb70bff0887e79ed5ad2f3cf1fbef6a584a Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Wed, 17 Jul 2019 19:53:09 +0200 Subject: [PATCH 3/7] Update workspace --- .idea/workspace.xml | 105 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 95 insertions(+), 10 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8e03cd2..6a48084 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,11 +1,7 @@ - - - - - + - + @@ -24,6 +20,24 @@ + + + + + + + + + + + + + + + + + + @@ -47,7 +61,22 @@ - + + + + + + + + + + + + + + - - - - - - - - - - - - - - 1 - - - - - - - - - 1563384602711 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - file://$PROJECT_DIR$/t/020-source.t - 133 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 20f473e85ecd09be74497536b16de1836076ef0c Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Thu, 18 Jul 2019 14:03:06 +0200 Subject: [PATCH 5/7] Specifies version of JSON::Fast --- META6.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/META6.json b/META6.json index 92bdea2..b5f4004 100644 --- a/META6.json +++ b/META6.json @@ -9,7 +9,7 @@ "auth": "finanalyst", "depends": [ "File::Directory::Tree", - "JSON::Fast" + "JSON::Fast:ver<0.9.18+>" ], "test-depends": [ "Test", @@ -25,4 +25,4 @@ "license": "Artistic-2.0", "source-url": "https://github.com/finanalyst/pod-cached.git", "source-type": "git" -} \ No newline at end of file +} From de644e3f27e342148fbe596e6789b90fac630a3b Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Sun, 4 Aug 2019 13:37:56 +0200 Subject: [PATCH 6/7] Refactors to constant --- lib/Pod/To/Cached.pm6 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Pod/To/Cached.pm6 b/lib/Pod/To/Cached.pm6 index 1ba96d6..951e3e7 100644 --- a/lib/Pod/To/Cached.pm6 +++ b/lib/Pod/To/Cached.pm6 @@ -5,6 +5,8 @@ use nqp; use JSON::Fast; use CompUnit::PrecompilationRepository::Document; +constant @extensions = ; + =begin pod =TITLE Pod::To::Cached @@ -54,7 +56,7 @@ $cache.freeze; path to the collection of pod files ignored if cache frozen -=item @!extensions = +=item constant @extensions = the possible extensions for a POD file =item verbose = False @@ -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 = C. To froze a cache, all files must have Current status =item Status is an enum with the following elements and semantics @@ -124,7 +126,6 @@ enum Status is export ; # New is internally used, has Str $.path = '.pod6-cache'; has Str $.source = 'doc'; -has @.extensions = ; has Bool $.verbose is rw; has $.precomp; has %.files; @@ -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 From e2134341cc10b255497ced954882646e9f970528 Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Sun, 4 Aug 2019 13:43:46 +0200 Subject: [PATCH 7/7] TODO proposal (to turn into issues) --- TODO.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 TODO.md diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..67bc904 --- /dev/null +++ b/TODO.md @@ -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.