Skip to content

Fix/new cache#112

Merged
antoniogamiz merged 7 commits intodevelopfrom
fix/new-cache
Jul 17, 2020
Merged

Fix/new cache#112
antoniogamiz merged 7 commits intodevelopfrom
fix/new-cache

Conversation

@antoniogamiz
Copy link
Collaborator

No description provided.

- `documentable update` is still broken due to
   finanalyst/raku-pod-from-cache/issues/4 Each update test will have
   to be done in a separate file or some similar hack
-  `use-cache` option has been deleted, so the use of the cache will
   be enforced.
Before this change we used "filename" attribute to look for the
Primary object updated. The problem is that, that "filename" is,
in general:

- Not unique, there could be two different pod6 files with the same
name, but in different subdirectories.
- No canonical. For instance, the filename of a Type is X::Something,
instead of X/Something.pod6.

To avoid these problems we use an absolute path for each pod6 file,
`source-path`. `Pod::From::Cache` returns paths relatives to the working
directory of the cache, so they need to be converted to `absolute`.
It always used the default (installed alongside Perl6::TypeGraph)
@antoniogamiz antoniogamiz merged commit 923a572 into develop Jul 17, 2020
Copy link
Contributor

@JJ JJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

If C<True>, L<Pod::To::Cached|https://github.com/Raku/Pod-To-Cached> will be used
to load the pods and create a cache (B<recommended>).

B<Default:> C<True>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the cache will always be used. Please make sure to bump versions accordingly, since it's a change in behavior.

:$topdir,
:dirs(DOCUMENTABLE-DIRS),
:verbose($verbose),
:$typegraph-file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unrelated to the cache, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, but after fixing the update option that error appeared.


use Documentable;
use Pod::Load;
use Documentable::Config;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check if it's no longer used to eliminate it from dependencies?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still used in the tests.

rmtree("t/.cache-test-doc");
rmtree("html");

done-testing;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool this.

@antoniogamiz antoniogamiz deleted the fix/new-cache branch July 19, 2020 14:27
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

Successfully merging this pull request may close these issues.

2 participants